diff --git a/debian/changelog b/debian/changelog index a574973..f6d90aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +regolith-session (1.1.2) focal; urgency=medium + + * fix: update init scripts to detect gnome-session version for GNOME 46 breaking changes + + -- Regolith Linux Sun, 21 Apr 2024 14:30:12 -0700 + regolith-session (1.1.1) focal; urgency=medium [ Soumya Ranjan Patnaik ] diff --git a/debian/regolith-session-common.install b/debian/regolith-session-common.install index 9893a5d..7792502 100644 --- a/debian/regolith-session-common.install +++ b/debian/regolith-session-common.install @@ -1,3 +1,4 @@ usr/bin/regolith-diagnostic usr/lib/regolith/regolith-session-common.sh usr/bin/regolith-look +usr/bin/regolith-session diff --git a/debian/regolith-session-flashback.install b/debian/regolith-session-flashback.install index a24af13..0302818 100644 --- a/debian/regolith-session-flashback.install +++ b/debian/regolith-session-flashback.install @@ -1,8 +1,7 @@ usr/share/gnome-session/sessions/regolith.session usr/share/xsessions usr/share/applications/regolith.desktop -usr/bin/regolith-session -usr/bin/regolith-session-init +usr/bin/regolith-session-x11 usr/lib/systemd/user/regolith.service usr/lib/systemd/user/regolith.target usr/lib/systemd/user/gnome-session@regolith.target.d diff --git a/usr/bin/regolith-session b/usr/bin/regolith-session index af71d8b..4c9a665 100755 --- a/usr/bin/regolith-session +++ b/usr/bin/regolith-session @@ -1,20 +1,38 @@ #!/bin/bash # shellcheck disable=SC1091 +set -Eeu -o pipefail -if [ -z "$XDG_CURRENT_DESKTOP" ]; then - export XDG_CURRENT_DESKTOP="Regolith:GNOME-Flashback:GNOME" +SESSION_TYPE=$1 + +if [[ "$SESSION_TYPE" == "regolith-x11" ]]; then + echo "Starting x11 Session..." + + if [ -z "$XDG_CURRENT_DESKTOP" ]; then + export XDG_CURRENT_DESKTOP="Regolith:GNOME-Flashback:GNOME" + fi + + SESSION_ID="regolith" +elif [[ "$SESSION_TYPE" == "regolith-wayland" ]]; then + echo "Starting Wayland Session..." + + SESSION_ID="$SESSION_TYPE" +else + echo "Session type must be specified by caller: regolith-wayland, regolith-x11. Unrecognized: '$SESSION_TYPE'" + exit 1 fi -# Attempt to determine gnome-session version based on OS version -if [ -f /etc/os-release ]; then +# Determine gnome-session api based on system, since `gnome-session --version` returns "" +if [ -f /etc/os-release ]; then source /etc/os-release - # Note: distro-support; add other type checks for non-systemd - if [[ "$VERSION_CODENAME" == "bionic" || "$VERSION_CODENAME" == "buster" ]]; then - exec gnome-session --session=regolith --disable-acceleration-check "$@" + if [[ "$ID" == "arch" ]]; then + exec gnome-session --session=$SESSION_ID --disable-acceleration-check "$@" + elif [[ "$VERSION_CODENAME" == "bionic" || "$VERSION_CODENAME" == "buster" || "$VERSION_CODENAME" == "noble" ]]; then + exec gnome-session --session=$SESSION_ID --disable-acceleration-check "$@" else - exec gnome-session --session=regolith --disable-acceleration-check "$@" - fi -else - exec gnome-session --session=regolith --disable-acceleration-check "$@" + exec gnome-session --builtin --session=$SESSION_ID --disable-acceleration-check "$@" + fi +else + echo "No /etc/os-release, guessing gnome-session cli api..." + exec gnome-session --builtin --session=$SESSION_ID --disable-acceleration-check "$@" fi diff --git a/usr/bin/regolith-session-init b/usr/bin/regolith-session-x11 similarity index 100% rename from usr/bin/regolith-session-init rename to usr/bin/regolith-session-x11 diff --git a/usr/share/applications/regolith.desktop b/usr/share/applications/regolith.desktop index c66888c..7c1472e 100644 --- a/usr/share/applications/regolith.desktop +++ b/usr/share/applications/regolith.desktop @@ -2,7 +2,7 @@ Type=Application Name=regolith Comment=Productivity-focused desktop environment, Regolith -Exec=regolith-session-init +Exec=regolith-session-x11 X-GNOME-WMName=Regolith X-GNOME-Autostart-Phase=WindowManager X-GNOME-Provides=windowmanager diff --git a/usr/share/wayland-sessions/regolith-sway.desktop b/usr/share/wayland-sessions/regolith-sway.desktop index ab790d8..a81d3a1 100644 --- a/usr/share/wayland-sessions/regolith-sway.desktop +++ b/usr/share/wayland-sessions/regolith-sway.desktop @@ -1,5 +1,6 @@ [Desktop Entry] -Name=Regolith on Wayland +Name=Regolith / Wayland Comment=Productivity focused desktop environment -Exec=/usr/bin/gnome-session --session=regolith-wayland +Exec=/usr/bin/regolith-session regolith-wayland +TryExec=/usr/bin/regolith-session Type=Application diff --git a/usr/share/xsessions/regolith.desktop b/usr/share/xsessions/regolith.desktop index a90ab9a..b428630 100644 --- a/usr/share/xsessions/regolith.desktop +++ b/usr/share/xsessions/regolith.desktop @@ -1,7 +1,7 @@ [Desktop Entry] -Name=Regolith on X11 +Name=Regolith / X11 Comment=Productivity focused desktop environment -Exec=/usr/bin/regolith-session +Exec=/usr/bin/regolith-session regolith-x11 TryExec=/usr/bin/regolith-session Type=Application DesktopNames=Regolith;GNOME-Flashback;GNOME