Recipe for MCP Lightboard Computer

  • base netinst install of stretch - deselect everything from tasksel
    • hostname lightboard – domain ds.mcp.lcl
    • 120 GB SSD - 110 GB root, 10 GB swap
    • ext4 root (discard, noatime)
  • > /etc/motd
  • apt-get --no-install-recommends install aptitude
  • aptitude install ssh (this will pull in xauth, but that's okay)
  • aptitude install net-tools man-db less fbset screen rsync psmisc file patch ethtool strace tcpdump vim bzip2 xz-utils
  • aptitude --without-recommends install dnsutils
  • adduser tdobes adm
  • adduser tdobes systemd-journal
  • aptitude install dbus
  • sed -i -e 's/^deb.* main$/& contrib non-free/g' /etc/apt/sources.list
  • aptitude update && aptitude forget-new
  • aptitude install intel-microcode
  • aptitude install firmware-realtek # for r8169 NIC's
  • aptitude install firmware-misc-nonfree # for intel GPU firmware
  • aptitude install firmware-iwlwifi # for intel wifi
  • aptitude install ifplugd
  • sed -i -e 's/^INTERFACES=""/INTERFACES="enp2s0"/g' /etc/default/ifplugd
  • sed -i -e 's/^allow-hotplug enp2s0/#allow-hotplug enp2s0/g' /etc/network/interfaces
  • echo >> /etc/network/interfaces
    echo 'allow-hotplug enp3s0' >> /etc/network/interfaces
    echo 'iface enp3s0 inet static' >> /etc/network/interfaces
    echo '  address 192.168.23.1' >> /etc/network/interfaces
    echo '  netmask 255.255.255.0' >> /etc/network/interfaces
  • mkdir -p /etc/systemd/system/ssh.socket.d
    echo '[Socket]' > /etc/systemd/system/ssh.socket.d/port-2222.conf
    echo 'ListenStream=2222' >> /etc/systemd/system/ssh.socket.d/port-2222.conf
    systemctl disable ssh.service && systemctl enable ssh.socket
  • mkdir -p /etc/systemd/system/getty\@tty1.service.d
    echo '[Service]' > /etc/systemd/system/getty\@tty1.service.d/noclear.conf
    echo 'TTYVTDisallocate=no' >> /etc/systemd/system/getty\@tty1.service.d/noclear.conf
  • sed -i -e 's/^GRUB_CMDLINE_LINUX_DEFAULT="quiet"$/GRUB_CMDLINE_LINUX_DEFAULT="quiet panic=5"/g' /etc/default/grub && update-grub
  • systemctl mask keyboard-setup.service
    systemctl mask console-setup.service
    systemctl mask rc-local.service
  • aptitude --without-recommends install irqbalance
  • aptitude install lsof memtest86+ parted time sysstat
  • aptitude install unattended-upgrades
  • dpkg-reconfigure -plow unattended-upgrades # select “Yes”, and select default at origin screen
  • aptitude install lm-sensors
  • aptitude install xserver-xorg-video-intel xserver-xorg-input-evdev
  • aptitude install xserver-xorg-video-intel xserver-xorg-video-modesetting xserver-xorg-input-libinput
  • aptitude install xinit xinput xdotool x11vnc x11-xserver-utils
  • aptitude markauto xserver-xorg-video-intel # we don't really need this anymore since modesetting replaces it, but it ends up being a dep of xinit
  • aptitude install libglu1-mesa libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxslt1.1 # prereqs for magicq
  • aptitude install pulseaudio # prereq for magicq; surprisingly, deps are reasonable under stretch (VA stuff might be useful for magichd)
  • aptitude install libarchive13 # another dep for magicq which frustratingly is not listed in the deb
  • aptitude install dbus-x11 # another dep for magichd which frustratingly is not listed in the deb
  • wget -q http://repo.magicq.co.uk/magicq.co.uk.gpg -O - | apt-key add -
  • echo deb http://repo.magicq.co.uk/magicq/ magicq main > /etc/apt/sources.list.d/magicq.list
  • aptitude update && aptitude forget-new
  • # uhm… WTF? Apparently, the MagicQ repo is just broken, and isn't being signed with the correct keys. We have to resort to wget and installing manually. This sucks the big one.
  • dpkg -i magicq_*_amd64.deb
  • aptitude markauto libglu1-mesa libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxslt1.1 pulseaudio # mark as auto-installed deps for magicq
  • aptitude install ffmpeg && ln -s /usr/bin/ffmpeg /opt/magicq/ffmpeg # I guess this is a dep for magichd? It seems to reference /opt/magicq/ffmpeg, but there's nothing there.
  • aptitude --without-recommends install icewm menu && aptitude markauto menu
  • aptitude install unzip
  • mkdir -p /opt/pathport && pushd /opt/pathport
  • unzip ~/PathportManager5.3-for-Linux.zip
  • cd firmware && unzip ~/Pathport-Firmware-3.7.0.zip
  • unzip ~/\*\ \*\ \*\ Pathport_3.7.3_ALL_Gateways.zip
  • popd
  • chgrp lightboard /opt/pathport/log && chmod g+w /opt/pathport/log
  • chgrp lightboard /opt/pathport/autobackup && chmod g+w /opt/pathport/autobackup
  • chgrp lightboard /opt/pathport/perspectives/user && chmod g+w /opt/pathport/perspectives/user
  • chgrp lightboard /opt/pathport/showfiles && chmod g+w /opt/pathport/showfiles
  • chgrp lightboard /opt/pathport/universes && chmod g+w /opt/pathport/universes
  • chgrp -R lightboard /opt/pathport/config && chmod -R g+w /opt/pathport/config
  • aptitude --without-recommends install default-jre # for pathport manager
  • echo '[Desktop Entry]' > /usr/share/applications/pathport_manager.desktop
    echo 'Name=Pathport Manager' >> /usr/share/applications/pathport_manager.desktop
    echo 'Comment=manage Pathport devices' >> /usr/share/applications/pathport_manager.desktop
    echo 'Exec=/bin/sh /opt/pathport/run.sh' >> /usr/share/applications/pathport_manager.desktop
    echo 'Icon=gnome-mines' >> /usr/share/applications/pathport_manager.desktop
    echo 'Terminal=false' >> /usr/share/applications/pathport_manager.desktop
    echo 'Type=Application' >> /usr/share/applications/pathport_manager.desktop
    echo 'Categories=Other;' >> /usr/share/applications/pathport_manager.desktop
  • adduser --shell /bin/bash --gecos "Lightboard" --disabled-password lightboard
  • adduser lightboard audio # allow magicq access to MIDI sequencer
  • echo '[Unit]' > /etc/systemd/system/startx\@.service
    echo 'Description=Start Xorg for %I' >> /etc/systemd/system/startx\@.service
    echo >> /etc/systemd/system/startx\@.service
    echo '[Service]' >> /etc/systemd/system/startx\@.service
    echo 'ExecStart=-/usr/bin/startx -- :0 -nolisten tcp vt2' >> /etc/systemd/system/startx\@.service
    echo 'User=%I' >> /etc/systemd/system/startx\@.service
    echo 'Type=simple' >> /etc/systemd/system/startx\@.service
    echo 'Restart=always' >> /etc/systemd/system/startx\@.service
    echo 'RestartSec=1' >> /etc/systemd/system/startx\@.service
    echo 'StartLimitInterval=10s' >> /etc/systemd/system/startx\@.service
    echo 'StartLimitBurst=10' >> /etc/systemd/system/startx\@.service
    echo >> /etc/systemd/system/startx\@.service
    echo '[Install]' >> /etc/systemd/system/startx\@.service
    echo 'WantedBy=multi-user.target' >> /etc/systemd/system/startx\@.service
    systemctl enable startx\@lightboard.service
  • echo '[Unit]' > /etc/systemd/system/magicq.service
    echo 'Description=magicq' >> /etc/systemd/system/magicq.service
    echo 'After=startx@lightboard.service' >> /etc/systemd/system/magicq.service
    echo 'Requires=startx@lightboard.service' >> /etc/systemd/system/magicq.service
    echo >> /etc/systemd/system/magicq.service
    echo '[Service]' >> /etc/systemd/system/magicq.service
    echo 'ExecStart=-/opt/magicq/runmagicq.sh' >> /etc/systemd/system/magicq.service
    echo 'User=lightboard' >> /etc/systemd/system/magicq.service
    echo 'Environment=DISPLAY=:0' >> /etc/systemd/system/magicq.service
    echo 'Restart=always' >> /etc/systemd/system/magicq.service
    echo 'RestartSec=1' >> /etc/systemd/system/magicq.service
    echo 'StartLimitInterval=10s' >> /etc/systemd/system/magicq.service
    echo 'StartLimitBurst=10' >> /etc/systemd/system/magicq.service
    echo >> /etc/systemd/system/magicq.service
    echo '[Install]' >> /etc/systemd/system/magicq.service
    echo 'WantedBy=multi-user.target' >> /etc/systemd/system/magicq.service
    
    systemctl enable magicq.service
  • sed -i -e 's/^allowed_users=console/allowed_users=anybody/g' /etc/X11/Xwrapper.config
  • sed -i -e 's/^use-ssh-agent$/#use-ssh-agent/g' /etc/X11/Xsession.options
  • mkdir ~lightboard/.vnc
    x11vnc -storepasswd **PASSWORD** ~lightboard/.vnc/passwd
    chown -R lightboard:lightboard ~lightboard/.vnc
    chmod 0600 ~lightboard/.vnc/passwd
    
    echo '#!/bin/sh' > /usr/local/bin/lightboard-xsession.sh
    echo >> /usr/local/bin/lightboard-xsession.sh
    echo 'pkill -9 x11vnc' >> /usr/local/bin/lightboard-xsession.sh
    echo >> /usr/local/bin/lightboard-xsession.sh
    echo 'x11vnc -q -usepw -N -ncache 0 -shared -forever &' >> /usr/local/bin/lightboard-xsession.sh
    echo >> /usr/local/bin/lightboard-xsession.sh
    echo 'xset s off #disable screensaver' >> /usr/local/bin/lightboard-xsession.sh
    echo 'xset dpms 0 0 0 #disable automatic power saving' >> /usr/local/bin/lightboard-xsession.sh
    echo >> /usr/local/bin/lightboard-xsession.sh
    echo '#SHELL=/bin/bash xterm &' >> /usr/local/bin/lightboard-xsession.sh
    echo >> /usr/local/bin/lightboard-xsession.sh
    echo "exec icewm" >> /usr/local/bin/lightboard-xsession.sh
    chmod +x /usr/local/bin/lightboard-xsession.sh
    ln -s /usr/local/bin/lightboard-xsession.sh /home/lightboard/.xsession
  • echo needs_root_rights=yes >> /etc/X11/Xwrapper.config # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=856351
  • mkdir /home/lightboard/Documents
    chown lightboard:lightboard /home/lightboard/Documents
  • scp -p tdobes@software.mcp.lcl:/mnt/software/ChamSys\\\ MagicQ/heads/*.hed /opt/magicq/update/show/heads/% # transfer over custom heads
  • mkdir -p /opt/magicq/update/show/media && scp -pr tdobes@software.mcp.lcl:/mnt/software/ChamSys\\\ MagicQ/demo_media/20131130/* /opt/magicq/update/show/media/ # transfer over demo media
  • # transfer over SSH keys and show file from old computer to /home/lightboard/Documents/MagicQ/show (be sure to chown to lightboard)
computer/lightboard_computer.txt · Last modified: 2018/03/12 12:56 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS