apt-get update
apt-get install -y zsh git build-essential cmake
libsdl2-dev libsdl2-2.0-0
libvulkan-dev vulkan-tools
libsdl2-mixer-dev # For audio
useradd -m -s /usr/bin/zsh game mkdir -p /opt/game/{assets,config} chown -R game:game /opt/game
echo "terminal" > /opt/game/config/mode chmod 644 /opt/game/config/mode
mkdir -p /etc/systemd/system/[email protected]/ cat > /etc/systemd/system/[email protected]/override.conf << EOF [Service] ExecStart= ExecStart=-/sbin/agetty --autologin game --noclear %I $TERM Type=idle EOF
cat > /opt/game/startup.sh << EOF #!/bin/bash GAME_MODE_FILE="/opt/game/config/mode" if [ -f "$GAME_MODE_FILE" ] && [ "$(cat $GAME_MODE_FILE)" == "terminal" ]; then exec /usr/bin/zsh else # This will be where the game goes - for now just another terminal exec /usr/bin/zsh fi EOF chmod +x /opt/game/startup.sh
cat > /home/game/.zprofile << EOF if [ "$(tty)" = "/dev/tty1" ]; then exec /opt/game/startup.sh fi EOF chown game:game /home/game/.zprofile