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 "$HOME"
cd "$config_dir" cd "$config_dir"
sentinel_value="$(cat "$SENTINEL_FILE")" sentinel_value="$(cat "$SENTINEL_FILE")"
if [[ "$sentinel_value" == "wayland" ]]; then if [[ "$sentinel_value" == "x11" ]]; then
echo "/usr/bin/gnome-session" echo "/usr/bin/gnome-session"
else else
return 1 return 1

View File

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

View File

@ -1,8 +1,8 @@
[Desktop Entry] [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 Comment=This session logs you into GNOME one time
Exec=/usr/bin/gnome-session-oneshot Exec=/usr/bin/gnome-xorg-oneshot
TryExec=/usr/bin/gnome-session-oneshot TryExec=/usr/bin/gnome-xorg-oneshot
Type=Application Type=Application
DesktopNames=GNOME DesktopNames=GNOME
X-GDM-SessionRegisters=true X-GDM-SessionRegisters=true