From fcc4ef21df004dae5cec97938925cdeb2726adfd Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Fri, 2 May 2025 14:39:43 -0500 Subject: [PATCH] Ready to test. --- configure-gallium.sh | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/configure-gallium.sh b/configure-gallium.sh index 6bc93ce..a707e69 100644 --- a/configure-gallium.sh +++ b/configure-gallium.sh @@ -15,35 +15,47 @@ function configureMachine() { # Tools for us. apt-get -y install mc joe openssh-server - # Disable screensaver and blanking. + # Disable screensaver. sed -i 's/mode:[[:space:]]*blank/mode: off/' /home/${SUDO_USER}/.xscreensaver - cat <<- SCREEN > /home/${SUDO_USER}/.xsessionrc - xset -dpms - xset s off - xset s noblank - SCREEN - chown ${SUDO_USER}:${SUDO_USER} /home/${SUDO_USER}/.xsessionrc - # Set clock to 12 hour format. - # Install Moonlight. apt-get -y install flatpak flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo flatpak install -y flathub com.moonlight_stream.Moonlight - # Configure Moonlight keys. - flatpak run com.moonlight_stream.Moonlight quit # This generates the ~/.var/ structure for the config. + # Configure Moonlight. + sudo -i -u ${SUDO_USER} flatpak run com.moonlight_stream.Moonlight quit # This generates the ~/.var/ structure for the config. wget https://forge.duensing.digital/Duensing_Digital/chromebook-linux/raw/branch/master/Moonlight.conf chown ${SUDO_USER}:${SUDO_USER} Moonlight.conf mv Moonlight.conf "/home/${SUDO_USER}/.var/app/com.moonlight_stream.Moonlight/config/Moonlight Game Streaming Project/." + + # Add icon to desktop + cat <<- ICON > /home/${SUDO_USER/Desktop/Moonlight.desktop + [Desktop Entry] + Version 1.0 + Type Application + Name Moonlight + Comment Game Streaming Client + Exec /home/${SUDO_USER}/moonlight.sh + icon palemoon + Path /home/${SUDO_USER} + Terminal false + StartupNotify false + ICON # Make Moonlight run on startup. - echo "flatpak run com.moonlight_stream.Moonlight" > /home/${SUDO_USER}/moonlight.sh + cat <<- MOON > /home/${SUDO_USER}/moonlight.sh + #!/bin/bash + flatpak run com.moonlight_stream.Moonlight & + MOON chown ${SUDO_USER}:${SUDO_USER} /home/${SUDO_USER}/moonlight.sh chmod +x /home/${SUDO_USER}/moonlight.sh - cat <<- STARTUP >> .profile + cat <<- 'STARTUP' >> /home/${SUDO_USER}/.profile if [ -z "$SSH_CLIENT" ] ; then - ./moonlight.sh + xset -dpms + xset s off + xset s noblank + $HOME/moonlight.sh fi STARTUP