Add Sunshine to initial desktop apps
This commit is contained in:
@@ -253,6 +253,7 @@ RUN \
|
||||
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/pavucontrol.desktop \
|
||||
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/debian-uxterm.desktop \
|
||||
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/debian-xterm.desktop \
|
||||
&& sed -i '/[Desktop Entry]/a\NoDisplay=true' /usr/share/applications/x11vnc.desktop \
|
||||
# Force these apps to be "System" Apps rather than "Categories=System;Utility;Core;GTK;Filesystem;"
|
||||
&& sed -i 's/^Categories=.*$/Categories=System;/' /usr/share/applications/xfce4-appfinder.desktop \
|
||||
&& sed -i 's/^Categories=.*$/Categories=System;/' /usr/share/applications/thunar-bulk-rename.desktop \
|
||||
|
||||
@@ -22,9 +22,9 @@ Name=org.mozilla.firefox
|
||||
X-XFCE-Commands=${USER_HOME:?}/.local/share/flatpak/exports/bin/org.mozilla.firefox
|
||||
EOF
|
||||
)"
|
||||
if [[ ! -f ${USER_HOME:?}/.local/share/xfce4/helpers/custom-WebBrowser.desktop ]]; then
|
||||
mkdir -p ${USER_HOME:?}/.local/share/xfce4/helpers
|
||||
echo "${custom_webbrowser}" > ${USER_HOME:?}/.local/share/xfce4/helpers/custom-WebBrowser.desktop
|
||||
if [[ ! -f "${USER_HOME:?}/.local/share/xfce4/helpers/custom-WebBrowser.desktop" ]]; then
|
||||
mkdir -p "${USER_HOME:?}/.local/share/xfce4/helpers"
|
||||
echo "${custom_webbrowser}" > "${USER_HOME:?}/.local/share/xfce4/helpers/custom-WebBrowser.desktop"
|
||||
gio mime x-scheme-handler/http org.mozilla.firefox.desktop
|
||||
fi
|
||||
|
||||
|
||||
68
overlay/opt/scripts/install_sunshine.sh
Executable file
68
overlay/opt/scripts/install_sunshine.sh
Executable file
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "**** Installing/upgrading Sunshine via flatpak ****"
|
||||
|
||||
# Install Sunshine
|
||||
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak --user install --assumeyes --or-update flathub dev.lizardbyte.app.Sunshine
|
||||
# Configure any required overrides
|
||||
flatpak --user override --talk-name=org.freedesktop.Flatpak dev.lizardbyte.app.Sunshine
|
||||
|
||||
# Configure Sunshine as the default browser
|
||||
echo "Configure Sunshine..."
|
||||
sunshine_autostart_desktop="$(cat <<EOF
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Name=Sunshine
|
||||
Comment=Launch sunshine on login
|
||||
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=dev.lizardbyte.app.Sunshine.sh dev.lizardbyte.app.Sunshine
|
||||
Icon=sunshine
|
||||
OnlyShowIn=XFCE;
|
||||
RunHook=0
|
||||
StartupNotify=false
|
||||
Terminal=false
|
||||
Hidden=false
|
||||
EOF
|
||||
)"
|
||||
if [[ ! -f "${USER_HOME:?}/.config/autostart/Sunshine.desktop" ]]; then
|
||||
echo "${sunshine_autostart_desktop:?}" > "${USER_HOME:?}/.config/autostart/Sunshine.desktop"
|
||||
fi
|
||||
# Configure default launchers:
|
||||
sunshine_apps_json="$(cat <<EOF
|
||||
{
|
||||
"env": {
|
||||
"PATH": "\$(PATH):\$(HOME)\/.local\/bin"
|
||||
},
|
||||
"apps": [
|
||||
{
|
||||
"name": "Desktop",
|
||||
"image-path": "desktop.png"
|
||||
},
|
||||
{
|
||||
"name": "Low Res Desktop",
|
||||
"image-path": "desktop.png",
|
||||
"prep-cmd": [
|
||||
{
|
||||
"do": "xrandr --output HDMI-1 --mode 1920x1080",
|
||||
"undo": "xrandr --output HDMI-1 --mode 1920x1200"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Steam Big Picture",
|
||||
"image-path": "steam.png",
|
||||
"exclude-global-prep-cmd": "false",
|
||||
"detached": [
|
||||
"flatpak-spawn --host \/usr\/bin\/flatpak run --branch=stable --arch=x86_64 --command=\/app\/bin\/steam-wrapper com.valvesoftware.Steam steam:\/\/open\/bigpicture"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
)"
|
||||
if [[ ! -f "${USER_HOME:?}/.config/sunshine/apps.json" ]]; then
|
||||
echo "${sunshine_apps_json:?}" > "${USER_HOME:?}/.config/sunshine/apps.json"
|
||||
fi
|
||||
|
||||
echo "DONE"
|
||||
@@ -5,7 +5,7 @@
|
||||
# File Created: Thursday, 1st January 1970 12:00:00 pm
|
||||
# Author: Console and webGui login account (jsunnex@gmail.com)
|
||||
# -----
|
||||
# Last Modified: Saturday, 8th July 2023 3:52:39 pm
|
||||
# Last Modified: Saturday, 8th July 2023 6:16:47 pm
|
||||
# Modified By: Console and webGui login account (jsunnex@gmail.com)
|
||||
###
|
||||
set -e
|
||||
@@ -31,6 +31,7 @@ if [[ ! -f /tmp/.desktop-apps-updated.lock ]]; then
|
||||
source /opt/scripts/install_steam.sh;
|
||||
source /opt/scripts/install_firefox.sh;
|
||||
source /opt/scripts/install_protonup.sh;
|
||||
source /opt/scripts/install_sunshine.sh;
|
||||
sleep 1;
|
||||
"
|
||||
touch /tmp/.desktop-apps-updated.lock
|
||||
|
||||
Reference in New Issue
Block a user