aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/desktops/gnome-3/core/gnome-session/fix-paths.patch
blob: 320b3024deee2eb56b7acc7afa744c5add9844f9 (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
diff --git a/gnome-session/gnome-session.in b/gnome-session/gnome-session.in
index ddd1a591..46a3488b 100755
--- a/gnome-session/gnome-session.in
+++ b/gnome-session/gnome-session.in
@@ -3,17 +3,19 @@
 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
+   @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 $*'"
+    # 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
   fi
 fi
 
-SETTING=$(G_MESSAGES_DEBUG='' gsettings get org.gnome.system.locale region)
+SETTING=$(G_MESSAGES_DEBUG='' @gsettings@ get org.gnome.system.locale region)
 REGION=${SETTING#\'}
 REGION=${REGION%\'}
 
diff --git a/gnome-session/main.c b/gnome-session/main.c
index 84edfbe5..e5285489 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -215,7 +215,7 @@ require_dbus_session (int      argc,
         }
         new_argv[i + 2] = NULL;
         
-        if (!execvp ("dbus-launch", new_argv)) {
+        if (!execvp ("@dbusLaunch@", new_argv)) {
                 g_set_error (error, 
                              G_SPAWN_ERROR,
                              G_SPAWN_ERROR_FAILED,