From 21e5f14fcffe0d38788a5cc9ec1c3b4efabc5044 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 22 Apr 2024 14:41:02 -0700 Subject: [PATCH] feat(deck): End X11 support --- .../usr/bin/startplasma-steamos-oneshot | 14 ++------ .../shared/usr/bin/steamos-session-select | 32 +++---------------- .../shared/usr/etc/default/desktop-wayland | 1 - .../deck/shared/usr/libexec/bazzite-autologin | 14 ++------ .../share/ublue-os/just/85-bazzite-image.just | 9 ------ 5 files changed, 9 insertions(+), 61 deletions(-) delete mode 100644 system_files/deck/shared/usr/etc/default/desktop-wayland diff --git a/system_files/deck/kinoite/usr/bin/startplasma-steamos-oneshot b/system_files/deck/kinoite/usr/bin/startplasma-steamos-oneshot index 36a3d6f665..17ba5a9d46 100755 --- a/system_files/deck/kinoite/usr/bin/startplasma-steamos-oneshot +++ b/system_files/deck/kinoite/usr/bin/startplasma-steamos-oneshot @@ -4,21 +4,11 @@ set -e die() { echo >&2 "!! $*"; exit 1; } -source /etc/default/desktop-wayland - SENTINEL_FILE="steamos-session-select" -if ${DESKTOP_WAYLAND}; then - SENTINEL_VALUE="wayland" -else - SENTINEL_VALUE="x11" -fi +SENTINEL_VALUE="wayland" # If we proceed, execute this -if ${DESKTOP_WAYLAND}; then - CHAINED_SESSION="/usr/bin/startplasma-wayland" -else - CHAINED_SESSION="/usr/bin/startplasma-x11" -fi +CHAINED_SESSION="/usr/bin/startplasma-wayland" # If we decide the sentinel is consumed, execute this command instead and fail RESTORE_SESSION=(steamos-session-select) # No arguments restores the session diff --git a/system_files/deck/shared/usr/bin/steamos-session-select b/system_files/deck/shared/usr/bin/steamos-session-select index 0443910c11..6878f596d2 100755 --- a/system_files/deck/shared/usr/bin/steamos-session-select +++ b/system_files/deck/shared/usr/bin/steamos-session-select @@ -4,8 +4,6 @@ set -e die() { echo >&2 "!! $*"; exit 1; } -source /etc/default/desktop-wayland - IMAGE_INFO="/usr/share/ublue-os/image-info.json" BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) @@ -18,22 +16,14 @@ SENTINEL_FILE="steamos-session-select" CHECK_FILE="/etc/sddm.conf.d/steamos.conf" session="${1:-gamescope}" -if ${DESKTOP_WAYLAND}; then - session_type="wayland" -else - session_type="x11" -fi +session_type="wayland" session_launcher="" create_sentinel="" if [[ "$2" == "--sentinel-created" ]]; then SENTINEL_CREATED=1 - if ${DESKTOP_WAYLAND}; then - session_type="wayland" - else - session_type="x11" - fi + session_type="wayland" fi # Update config sentinel @@ -49,11 +39,7 @@ if [[ -z $SENTINEL_CREATED ]]; then if [[ -f "steamos-session-type" ]]; then cp steamos-session-type "$SENTINEL_FILE" else - if ${DESKTOP_WAYLAND}; then - echo "wayland" > "$SENTINEL_FILE" - else - echo "x11" > "$SENTINEL_FILE" - fi + echo "wayland" > "$SENTINEL_FILE" fi cat "$SENTINEL_FILE" ) @@ -86,17 +72,9 @@ case "$session" in ;; desktop|plasma) if [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then - if ${DESKTOP_WAYLAND}; then - session_launcher="plasma-steamos-wayland-oneshot.desktop" - else - session_launcher="plasma-steamos-oneshot.desktop" - fi + session_launcher="plasma-steamos-wayland-oneshot.desktop" elif [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then - if ${DESKTOP_WAYLAND}; then - session_launcher="gnome-wayland-oneshot.desktop" - else - session_launcher="gnome-xorg-oneshot.desktop" - fi + session_launcher="gnome-wayland-oneshot.desktop" fi create_sentinel=1 ;; diff --git a/system_files/deck/shared/usr/etc/default/desktop-wayland b/system_files/deck/shared/usr/etc/default/desktop-wayland deleted file mode 100644 index 16bcf6ac96..0000000000 --- a/system_files/deck/shared/usr/etc/default/desktop-wayland +++ /dev/null @@ -1 +0,0 @@ -DESKTOP_WAYLAND=true diff --git a/system_files/deck/shared/usr/libexec/bazzite-autologin b/system_files/deck/shared/usr/libexec/bazzite-autologin index 8c09fe35ee..c19871ab70 100755 --- a/system_files/deck/shared/usr/libexec/bazzite-autologin +++ b/system_files/deck/shared/usr/libexec/bazzite-autologin @@ -1,7 +1,5 @@ #!/usr/bin/bash -source /etc/default/desktop-wayland - IMAGE_INFO="/usr/share/ublue-os/image-info.json" BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) @@ -22,16 +20,8 @@ fi if [[ ! -f ${DESKTOP_AUTOLOGIN} && -f $HOME/.local/share/Steam/ubuntu12_32/steamui.so ]]; then sed -i 's/.*Session=.*/Session=gamescope-session.desktop/g' ${SDDM_CONF} elif [[ ${BASE_IMAGE_NAME} =~ "kinoite" ]]; then - if ${DESKTOP_WAYLAND}; then - sed -i 's/.*Session=.*/Session=plasma.desktop/g' ${SDDM_CONF} - else - sed -i 's/.*Session=.*/Session=plasmax11.desktop/g' ${SDDM_CONF} - fi + sed -i 's/.*Session=.*/Session=plasma.desktop/g' ${SDDM_CONF} elif [[ ${BASE_IMAGE_NAME} =~ "silverblue" ]]; then - if ${DESKTOP_WAYLAND}; then - sed -i 's/.*Session=.*/Session=gnome-wayland.desktop/g' ${SDDM_CONF} - else - sed -i 's/.*Session=.*/Session=gnome-xorg.desktop/g' ${SDDM_CONF} - fi + sed -i 's/.*Session=.*/Session=gnome-wayland.desktop/g' ${SDDM_CONF} fi sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF} diff --git a/system_files/deck/shared/usr/share/ublue-os/just/85-bazzite-image.just b/system_files/deck/shared/usr/share/ublue-os/just/85-bazzite-image.just index cbc6a67b54..c9c5f2aba9 100644 --- a/system_files/deck/shared/usr/share/ublue-os/just/85-bazzite-image.just +++ b/system_files/deck/shared/usr/share/ublue-os/just/85-bazzite-image.just @@ -107,15 +107,6 @@ restore-input-remapper: alias _toggle-wayland := _toggle_wayland -_toggle_wayland: - #!/usr/bin/bash - source /etc/default/desktop-wayland - if ${DESKTOP_WAYLAND}; then - sudo sed -i 's/true/false/g' /etc/default/desktop-wayland - else - sudo sed -i 's/false/true/g' /etc/default/desktop-wayland - fi - _toggle-autologin: #!/usr/bin/bash DESKTOP_AUTOLOGIN="/etc/bazzite/desktop_autologin"