Start using Flatpaks as the main install method for any desktop apps

This commit is contained in:
Josh.5
2023-07-08 02:59:43 +12:00
committed by Josh Sunnex
parent df9423ccad
commit fc700e2200
21 changed files with 224 additions and 477 deletions

View File

@@ -70,10 +70,7 @@ mkdir -p ${XDG_RUNTIME_DIR}
chown -R ${PUID}:${PGID} ${XDG_RUNTIME_DIR}
# Ensure only the 'default' user can access this directory
chmod 700 ${XDG_RUNTIME_DIR}
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:/var/lib/flatpak/exports/share:/home/${USER}/.local/share/flatpak/exports/share"
# Ensure the start-desktop.sh script is executable
chmod +x /usr/bin/start-desktop.sh
# Set the default background for gnome based desktop
# Set the default background
mkdir -p /etc/alternatives
ln -sf /usr/share/backgrounds/steam.jpg /etc/alternatives/desktop-background
chmod a+r /etc/alternatives/desktop-background

View File

@@ -13,9 +13,9 @@ else
# Ensure pulseaudio directories have the correct permissions
mkdir -p \
${PULSE_SOCKET_DIR} \
/home/${USER}/.config/pulse
${USER_HOME:?}/.config/pulse
chmod -R a+rw ${PULSE_SOCKET_DIR}
chown -R ${PUID}:${PGID} /home/${USER}/.config/pulse
chown -R ${PUID}:${PGID} ${USER_HOME:?}/.config/pulse
# Configure the palse audio socket
sed -i "s|^; default-server.*$|default-server = ${PULSE_SERVER}|" /etc/pulse/client.conf
@@ -30,9 +30,6 @@ else
if [ "X${DEBUGGING:-}" == "X" ]; then
sed -i 's|^; log-level.*$|log-level = debug|' /etc/pulse/daemon.conf
fi
# Make startup script executable
chmod +x /usr/bin/start-pulseaudio.sh
fi
chown -R ${USER} /etc/pulse

View File

@@ -46,7 +46,7 @@ function configure_nvidia_x_server {
sed -i '/Driver\s\+"nvidia"/a\ Option "ModeValidation" "NoMaxPClkCheck, NoEdidMaxPClkCheck, NoMaxSizeCheck, NoHorizSyncCheck, NoVertRefreshCheck, NoVirtualSizeCheck, NoTotalSizeCheck, NoDualLinkDVICheck, NoDisplayPortBandwidthCheck, AllowNon3DVisionModes, AllowNonHDMI3DModes, AllowNonEdidModes, NoEdidHDMI2Check, AllowDpInterlaced"\n Option "HardDPMS" "False"' /etc/X11/xorg.conf
sed -i '/Section\s\+"Monitor"/a\ '"${MODELINE}" /etc/X11/xorg.conf
# Prevent interference between GPUs
echo -e "Section \"ServerFlags\"\n Option \"AutoAddGPU\" \"false\"\nEndSection" | sudo tee -a /etc/X11/xorg.conf > /dev/null
echo -e "Section \"ServerFlags\"\n Option \"AutoAddGPU\" \"false\"\nEndSection" | tee -a /etc/X11/xorg.conf > /dev/null
# Configure primary GPU
sed -i '/Driver\s\+"nvidia"/a\ Option "AllowEmptyInitialConfiguration"\n Option "PrimaryGPU" "yes"' /usr/share/X11/xorg.conf.d/nvidia-drm-outputclass.conf
}

View File

@@ -5,7 +5,6 @@ if ([ "${MODE}" != "s" ] && [ "${MODE}" != "secondary" ]); then
if [ ! -S /var/run/docker.sock ]; then
echo "Enable Dockerd daemon"
sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/dind.ini
chmod +x /usr/bin/start-dind.sh
else
echo "Docker socket has been passed in from host. Using that instead"
fi
@@ -14,9 +13,9 @@ if ([ "${MODE}" != "s" ] && [ "${MODE}" != "secondary" ]); then
echo "Add user '${USER}' to docker group for sudoless execution"
groupadd docker
usermod -aG docker ${USER}
mkdir -p /home/${USER}/.docker
chown -R ${PUID}:${PGID} /home/${USER}/.docker
chmod -R g+rwx /home/${USER}/.docker
mkdir -p ${USER_HOME:?}/.docker
chown -R ${PUID}:${PGID} ${USER_HOME:?}/.docker
chmod -R g+rwx ${USER_HOME:?}/.docker
fi
else
echo "Dockerd daemon not available when container is run in 'secondary' mode"

View File

@@ -5,7 +5,6 @@ if ([ "${MODE}" != "s" ] && [ "${MODE}" != "secondary" ]); then
if [ "${ENABLE_SUNSHINE:-}" = "true" ]; then
echo "Enable Sunshine server"
sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/sunshine.ini
chmod +x /usr/bin/start-sunshine.sh
else
echo "Disable Sunshine server"
fi

View File

@@ -12,5 +12,3 @@ PS1='[\u@\h \W]\$ '
PATH=$PATH:$HOME/.local/bin:$HOME/bin
# Export /usr/games
PATH=$PATH:/usr/games
# Export flatpak data directories
XDG_DATA_DIRS="${XDG_DATA_DIRS}:/var/lib/flatpak/exports/share:/home/${USER}/.local/share/flatpak/exports/share"

View File

@@ -4,11 +4,10 @@ Version=0.9.4
Type=Application
Name=Steam
Comment=launch steam on login
Exec=/usr/games/steam %U -silent
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/steam-wrapper --file-forwarding com.valvesoftware.Steam @@u %U @@ -silent
Icon=steam
OnlyShowIn=XFCE;
RunHook=0
StartupNotify=false
Terminal=false
Hidden=false