fix(deck): Use GNOME on Xorg for session switching

This commit is contained in:
RJ Trujillo 2023-08-03 20:56:58 -06:00
parent 5d3222f98e
commit d09d7faf9f
3 changed files with 10 additions and 10 deletions

View File

@ -25,7 +25,7 @@ function check_sentinel()
cd "$HOME"
cd "$config_dir"
sentinel_value="$(cat "$SENTINEL_FILE")"
if [[ "$sentinel_value" == "wayland" ]]; then
if [[ "$sentinel_value" == "x11" ]]; then
echo "/usr/bin/gnome-session"
else
return 1

View File

@ -13,14 +13,14 @@ SENTINEL_FILE="steamos-session-select"
CHECK_FILE="/etc/sddm.conf.d/steamos.conf"
session="${1:-gamescope}"
session_type="wayland"
session_type="x11"
session_launcher="gamescope-session"
create_sentinel=""
if [[ "$2" == "--sentinel-created" ]]; then
SENTINEL_CREATED=1
session_type="wayland"
session_type="x11"
fi
# Update config sentinel
@ -36,7 +36,7 @@ if [[ -z $SENTINEL_CREATED ]]; then
if [[ -f "steamos-session-type" ]]; then
cp steamos-session-type "$SENTINEL_FILE"
else
echo "wayland" > "$SENTINEL_FILE"
echo "x11" > "$SENTINEL_FILE"
fi
cat "$SENTINEL_FILE"
)
@ -52,13 +52,13 @@ fi
# We use "plasma" as "desktop" to hook up to SteamOS's scripts
case "$session" in
plasma-wayland-persistent)
session_launcher="gnome-session"
session_launcher="gnome-xorg"
;;
plasma-x11-persistent)
session_launcher="gnome-session"
session_launcher="gnome-xorg"
;;
desktop|plasma)
session_launcher="gnome-session-oneshot"
session_launcher="gnome-xorg-oneshot"
create_sentinel=1
;;
gamescope)

View File

@ -1,8 +1,8 @@
[Desktop Entry]
Name=GNOME on Wayland (single time session)
Name=GNOME on Xorg (single time session)
Comment=This session logs you into GNOME one time
Exec=/usr/bin/gnome-session-oneshot
TryExec=/usr/bin/gnome-session-oneshot
Exec=/usr/bin/gnome-xorg-oneshot
TryExec=/usr/bin/gnome-xorg-oneshot
Type=Application
DesktopNames=GNOME
X-GDM-SessionRegisters=true