Merge pull request #70501 from hedning/fix-gnome-session-env-setup

gnome3.gnome-session: always run /etc/set-environment on startup
This commit is contained in:
worldofpeace 2019-10-07 00:00:55 +00:00 committed by GitHub
commit 837cc0767d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
--- a/gnome-session/gnome-session.in
+++ b/gnome-session/gnome-session.in
@@ -3,11 +3,11 @@
@@ -3,11 +3,13 @@
if [ "x$XDG_SESSION_TYPE" = "xwayland" ] &&
[ "x$XDG_SESSION_CLASS" != "xgreeter" ] &&
[ -n "$SHELL" ] &&
@ -12,6 +12,8 @@
+ ! (echo "$SHELL" | @grep@ -q "nologin"); then
if [ "$1" != '-l' ]; then
- exec bash -c "exec -l '$SHELL' -c '$0 -l $*'"
+ # Make sure the shell actually sets up the environment
+ unset __NIXOS_SET_ENVIRONMENT_DONE
+ exec @bash@ -c "exec -l '$SHELL' -c '$0 -l $*'"
else
shift