-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cinnamon-session: make sure wayland sessions get a login shell (#161)
Users expect their shell profiles to get sourced at startup, which doesn't happen with wayland sessions. This commit brings back that feature, by making the cinnamon-session wrapper script run a login shell. ref: https://gitlab.gnome.org/GNOME/gnome-session/-/commit/7e307f8ddb91db5d4051c4c792519a660ba67f35
- Loading branch information
1 parent
0199cfc
commit 60fd654
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
if [ "x$XDG_SESSION_TYPE" = "xwayland" ] && | ||
[ "x$XDG_SESSION_CLASS" != "xgreeter" ] && | ||
[ -n "$SHELL" ] && | ||
grep -q "$SHELL" /etc/shells && | ||
! (echo "$SHELL" | grep -q "false") && | ||
! (echo "$SHELL" | grep -q "nologin"); then | ||
if [ "$1" != '-l' ]; then | ||
exec bash -c "exec -l '$SHELL' -c '$0 -l $*'" | ||
else | ||
shift | ||
fi | ||
fi | ||
|
||
exec @libexecdir@/cinnamon-session-binary "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters