Ready to test.
This commit is contained in:
parent
36c01f7fb3
commit
fcc4ef21df
1 changed files with 26 additions and 14 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue