Revert to starting steam from desktop autostart
This commit is contained in:
@@ -1,15 +1,31 @@
|
|||||||
|
|
||||||
echo "**** Configure Steam ****"
|
echo "**** Configure Steam ****"
|
||||||
|
|
||||||
|
steam_autostart_desktop="$(cat <<EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Type=Application
|
||||||
|
Name=Steam
|
||||||
|
Comment=Launch steam on login
|
||||||
|
Exec=/usr/games/steam %U ${STEAM_ARGS:-}
|
||||||
|
Icon=steam
|
||||||
|
OnlyShowIn=XFCE;
|
||||||
|
RunHook=0
|
||||||
|
StartupNotify=false
|
||||||
|
Terminal=false
|
||||||
|
Hidden=false
|
||||||
|
EOF
|
||||||
|
)"
|
||||||
|
|
||||||
if [ "${ENABLE_STEAM:-}" = "true" ]; then
|
if [ "${ENABLE_STEAM:-}" = "true" ]; then
|
||||||
# echo "Enable Steam service"
|
if [ "${MODE}" == "s" ] | [ "${MODE}" == "secondary" ]; then
|
||||||
# sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/steam.ini
|
echo "Enable Steam supervisor.d service"
|
||||||
# Remove old autostart script. We should be starting steam with the supervisor service
|
sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/steam.ini
|
||||||
mkdir -p "${USER_HOME:?}/.config/autostart"
|
else
|
||||||
# if grep "Exec=/usr/bin/flatpak" "${USER_HOME:?}/.config/autostart/Steam.desktop" &> /dev/null; then
|
echo "Enable Steam auto-start script"
|
||||||
# rm -fv "${USER_HOME:?}/.config/autostart/Steam.desktop"
|
mkdir -p "${USER_HOME:?}/.config/autostart"
|
||||||
# fi
|
echo "${steam_autostart_desktop:?}" > "${USER_HOME:?}/.config/autostart/Steam.desktop"
|
||||||
rm -fv "${USER_HOME:?}/.config/autostart/Steam.desktop"
|
fi
|
||||||
else
|
else
|
||||||
echo "Disable Steam service"
|
echo "Disable Steam service"
|
||||||
sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/steam.ini
|
sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/steam.ini
|
||||||
|
|||||||
@@ -41,10 +41,5 @@ echo "**** Starting Xfce4 ****"
|
|||||||
/usr/bin/startxfce4 &
|
/usr/bin/startxfce4 &
|
||||||
desktop_pid=$!
|
desktop_pid=$!
|
||||||
|
|
||||||
if [ "${ENABLE_STEAM:-}" = "true" ]; then
|
|
||||||
echo "Start Steam service"
|
|
||||||
sudo supervisorctl start steam
|
|
||||||
fi
|
|
||||||
|
|
||||||
# WAIT FOR CHILD PROCESS:
|
# WAIT FOR CHILD PROCESS:
|
||||||
wait "$desktop_pid"
|
wait "$desktop_pid"
|
||||||
|
|||||||
Reference in New Issue
Block a user