Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: workaround trixie bug which causes desktop sessions to fail. Ad… #48

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions usr/bin/regolith-session-trixie-wayland
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
# shellcheck disable=SC1091
set -Eeu -o pipefail

SESSION_TYPE="regolith-wayland"

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
elif [[ "$SESSION_TYPE" == "regolith-wayland" ]]; then
echo "Starting Wayland Session..."
else
echo "Session type must be specified by caller: regolith-wayland, regolith-x11. Unrecognized: '$SESSION_TYPE'"
exit 1
fi

# Determine gnome-session api based on system, since `gnome-session --version` returns ""
if [ -f /etc/os-release ]; then
source /etc/os-release

if [[ "$VERSION_CODENAME" == "jammy" || "$VERSION_CODENAME" == "bookworm" ]]; then
echo "Using gnome-session built-in session"
exec gnome-session --builtin --session=$SESSION_TYPE --disable-acceleration-check "$@"
else
exec gnome-session --session=$SESSION_TYPE --disable-acceleration-check "$@"
fi
else
echo "No /etc/os-release, guessing gnome-session cli api..."
exec gnome-session --session=$SESSION_TYPE --disable-acceleration-check "$@"
fi
33 changes: 33 additions & 0 deletions usr/bin/regolith-session-trixie-x11
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
# shellcheck disable=SC1091
set -Eeu -o pipefail

SESSION_TYPE="regolith-x11"

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
elif [[ "$SESSION_TYPE" == "regolith-wayland" ]]; then
echo "Starting Wayland Session..."
else
echo "Session type must be specified by caller: regolith-wayland, regolith-x11. Unrecognized: '$SESSION_TYPE'"
exit 1
fi

# Determine gnome-session api based on system, since `gnome-session --version` returns ""
if [ -f /etc/os-release ]; then
source /etc/os-release

if [[ "$VERSION_CODENAME" == "jammy" || "$VERSION_CODENAME" == "bookworm" ]]; then
echo "Using gnome-session built-in session"
exec gnome-session --builtin --session=$SESSION_TYPE --disable-acceleration-check "$@"
else
exec gnome-session --session=$SESSION_TYPE --disable-acceleration-check "$@"
fi
else
echo "No /etc/os-release, guessing gnome-session cli api..."
exec gnome-session --session=$SESSION_TYPE --disable-acceleration-check "$@"
fi
2 changes: 1 addition & 1 deletion usr/share/wayland-sessions/regolith-wayland.desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Desktop Entry]
Name=Regolith / Wayland
Comment=Productivity focused desktop environment
Exec=/usr/bin/regolith-session regolith-wayland
Exec=/usr/bin/regolith-session-trixie-wayland
TryExec=/usr/bin/regolith-session
Type=Application
2 changes: 1 addition & 1 deletion usr/share/xsessions/regolith-x11.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=Regolith / X11
Comment=Productivity focused desktop environment
Exec=/usr/bin/regolith-session regolith-x11
Exec=/usr/bin/regolith-session-trixie-x11
TryExec=/usr/bin/regolith-session
Type=Application
DesktopNames=Regolith;GNOME-Flashback;GNOME