[gnome-session] gnome-session: make sure wayland sessions get a login shell



commit 5e36cd63e71520f829bbd77c102b64179e08992a
Author: Ray Strode <rstrode redhat com>
Date:   Thu Jan 5 10:02:58 2017 -0500

    gnome-session: make sure wayland sessions get a login shell
    
    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 gnome-shell
    wrapper script run a login shell.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736660

 gnome-session/gnome-session.in |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gnome-session/gnome-session.in b/gnome-session/gnome-session.in
index 530299d..aa314f4 100644
--- a/gnome-session/gnome-session.in
+++ b/gnome-session/gnome-session.in
@@ -12,6 +12,14 @@ if [ -n "$REGION" ]; then
   export LC_PAPER=$REGION
 fi
 
-dbus-update-activation-environment --all > /dev/null 2>&1 ||:
+update_command="dbus-update-activation-environment --all --systemd > /dev/null 2>&1"
+
+if [ "$XDG_SESSION_TYPE" = "wayland" -a
+     "$XDG_SESSION_CLASS" != "greeter" -a
+     -n "$SHELL" ]; then
+  (exec -l $SHELL -c "$update_command") || eval "$update_command"
+else
+  eval "$update_command"
+fi
 
 exec @libexecdir@/gnome-session-binary "$@"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]