d54bfa8f41
gnome-session inherits GDMS PATH, which is at the moment non-functional. In X11 this didn't matter as the `Xsession` wrapper would populate the environment beforehand. Wayland sessions doesn't source `Xesssion` (duh), so we patch `bin/gnome-session` to use absolute paths for `grep` and `bash`. In addition `bin/gnome-session` is a simple wrapper around `libexec/gnome-session-binary` mostly responsible for sourcing the users profile before launching the binary. This made our wrapping of `bin/gnome-session` ineffective on wayland as the profile would reset the environment. Simply wrap `libexec/gnome-session-binary` instead.
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
--- a/gnome-session/gnome-session.in
|
|
+++ b/gnome-session/gnome-session.in
|
|
@@ -3,11 +3,11 @@
|
|
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 $*'"
|
|
+ exec @bash@ -c "exec -l '$SHELL' -c '$0 -l $*'"
|
|
else
|
|
shift
|
|
fi
|
|
@@ -13,7 +13,7 @@
|
|
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%\'}
|
|
|
|
--- a/gnome-session/main.c
|
|
+++ b/gnome-session/main.c
|
|
@@ -203,7 +203,7 @@
|
|
}
|
|
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,
|