summaryrefslogtreecommitdiff
blob: f82825f4822ebf3f22a231266b2d3982ee181010 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 97229b322d30cf531e7b7cc7757f83ed80e831bc Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Thu, 5 Jan 2017 10:02:58 -0500
Subject: [PATCH 1/3] 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-session
wrapper script run a login shell.

https://bugzilla.gnome.org/show_bug.cgi?id=736660
---
 gnome-session/gnome-session.in | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnome-session/gnome-session.in b/gnome-session/gnome-session.in
index 530299d..04ea741 100644
--- a/gnome-session/gnome-session.in
+++ b/gnome-session/gnome-session.in
@@ -1,5 +1,18 @@
 #!/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
+
 SETTING=$(gsettings get org.gnome.system.locale region)
 REGION=${SETTING#\'}
 REGION=${REGION%\'}
-- 
2.10.1