====== tuerschild ======
{{tag> IRRELEVANT software hardware infrastructure video computing}}
**Projekt tuerschild**
----
Auf einem Thin Client soll ein Linux übers Netzwerk starten und einen Pixelflut-Server nach dem Booten im Vollbild starten. Der Thin Client bespielt den Bilderrahmen-Monitor, der über der shack-Haupttür hängt.
Als Basis dient Ubuntu 16.04 LTS
Auf [[http://pxeboot.shack|pxeboot.shack]]:
cd /srv/nfs
debootstrap --arch=i386 xenial tuerschild2 http://de.archive.ubuntu.com/ubuntu/
chroot tuerschild2 /bin/bash
apt update
apt install nano linux-image-generic
passwd
echo tuerschild2 > /etc/hostname
Die ''/etc/fstab'' anlegen:
/dev/nfs / nfs tcp,nolock 0 0
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/cache tmpfs defaults 0 0
tmpfs /var/log tmpfs defaults 0 0
tmpfs /var/tmp tmpfs defaults 0 0
DNS einrichten in ''/etc/resolv.conf'':
nameserver 10.42.0.100
nameserver 10.42.0.200
Um den Nutzer automatisch anzumelden, folgende Einstellung vornehmen in '' /etc/lxdm/lxdm.conf'':
autologin=shack
timeout=30
session=/usr/bin/startlxde
Nach der Anleitung unter [[https://github.com/defnull/pixelflut|https://github.com/defnull/pixelflut]] folgendes installieren:\\
apt-get install build-essential libevent-dev libglew-dev libglfw3-dev unclutter openssh-server
su shack
cd ~
git clone https://github.com/defnull/pixelflut pixelflut
Nun muss im Quellcode von pixelnuke noch ein Detail geändert werden, damit es im Vollbildmodus startet: In ''canvas.c'' wird aus\\
Zeile 122 '' if (canvas_display >= 0) {''\\
wird\\
Zeile 122 '' if (canvas_display < 0) {''\\
Nun einfach mit ''make'' bauen.\\
Damit das ganze auch automatisch startet folgende Datei anlegen in ''~/.config/autostart/pixelflut.desktop'':
[Desktop Entry]
Type=Application
Exec=bash -c 'unclutter -idle 1 -root & /home/shack/pixelflut/pixelnuke/pixelnuke
''unclutter'' sorgt dafür dass der Mauscursor verschwindet.
Folgende Datei ist unter ''/srv/tftp/pxelinux.cfg/01-00-e0-c5-5c-3d-be'' (MAC-Adresse des Thin Client) anzulegen, damit dieser direkt als tuerschild startet:\\
# host: tuerschild
#
DEFAULT boot/tuerschild2/vmlinuz
append initrd=boot/tuerschild2/initrd.img root=/dev/nfs ip=dhcp nfsroot=10.42.2.14:/srv/nfs/tuerschild2 vga=792 ro
Aus Bequemlichkeit wird noch ein Link angelegt: ''ln -sv /srv/tftp/pxelinux.cfg/01-00-e0-c5-5c-3d-be /srv/tftp/pxelinux.cfg/tuerschild.cfg''\\
Als letztes sollte man noch im gebooteten tuerschild den Bildschirmschoner deaktivieren, damit man möglichst lange Freunde daran hat.
Fertig, der Server läuft auf Port 1337!
----
====== Alte Version ======
Einrichtung:
1. Als Grundlage dient ein Debian Buster. Dieses wird mit ''debootstrap'' auf pxeboot.shack aufgesetzt:\\
cd /srv/nfs
mkdir -pv tuerschild
debootstrap --arch=i386 buster tuerschild http://ftp.de.debian.org/debian/
cd tuerschild
mount -o bind /dev dev
mount -o bind /proc proc
mount -o bind /sys sys
chroot . /bin/bash
passwd
adduser shack
passwd shack
usermod -aG audio,video shack
echo tuerschild > /etc/hostname
apt update
apt install nano cmatrix build-essential git automake locales console-setup linux-image-686 openssh-server cifs-utils nfs-common bash-completion
localedef -i de_DE -c UTF-8 de_DE.UTF-8
systemctl disable apparmor
2. Als nächstes wird der Pixelflut-Server gebaut:\\
git clone https://github.com/entropia/entropieanzeige
cd entropiaanzeige
make
cp pixelflut /usr/local/bin/
3. Nun wird noch dafür gesorgt, dass auf tty1 pixelflut statt agetty läuft:\\
cd /etc/systemd/system
mkdir -pv "getty@tty1.service.d"
cd "getty@tty1.service.g"
Dort muss eine Datei namens ''override.conf'' angelegt werden:\\
[Service]
ExecStart=
ExecStart=-/usr/local/bin/pixelflut 1234
StandardInput=tty
StandardOutput=tty
4. Nun kann man das ''chroot'' wieder verlassen, es muss noch der Eintrag für pxelinux angelegt werden. Folgende Datei ist unter ''/srv/tftp/pxelinux.cfg/01-00-e0-c5-5c-3d-be'' (MAC-Adresse des Thin Client) anzulegen, damit dieser direkt als tuerschild startet:\\
# host: tuerschild
#
DEFAULT boot/tuerschild/vmlinuz
append initrd=boot/tuerschild/initrd.img root=/dev/nfs ip=dhcp nfsroot=10.42.2.14:/srv/nfs/tuerschild vga=792 ro
Aus Bequemlichkeit wird noch ein Link angelegt: ''ln -sv /srv/tftp/pxelinux.cfg/01-00-e0-c5-5c-3d-be /srv/tftp/pxelinux.cfg/tuerschild.cfg''\\
''vga=792'' laut [[https://www.pendrivelinux.com/vga-boot-modes-to-set-screen-resolution/|PenDriveLinux]] für 1024x768 als Bildschirmauflösung mit 24bit Farbtiefe, wie für Pixelflut benötigt.
----
**Fertig!** Nun läuft der Pixelflut-Server auf Port 1234.