summaryrefslogtreecommitdiff
path: root/gnu/packages/gnome.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@igalia.com>2017-08-22 18:39:39 +0200
committerAndy Wingo <wingo@igalia.com>2017-08-25 16:01:56 +0200
commite0e6756fbddc56b73640273ea8c6bf17825b337a (patch)
treea8c4553df00b7a96f0f25f0bd1e2d8b19f6470f2 /gnu/packages/gnome.scm
parent957dbc0a4d2c4d173b094a3c003c87deffc8a8a0 (diff)
downloadguix-patches-e0e6756fbddc56b73640273ea8c6bf17825b337a.tar
guix-patches-e0e6756fbddc56b73640273ea8c6bf17825b337a.tar.gz
gnu: gdm: Fix environment of worker processes and sessions.
* gnu/packages/gnome.scm (gdm): Get X server path from GDM_X_SERVER environment variable, and make sure this variable is propagated to internal sub-processes. Launch sessions with a reasonable XDG_CONFIG_DIRS setting. Get the custom GDM conf from the current system's profile.
Diffstat (limited to 'gnu/packages/gnome.scm')
-rw-r--r--gnu/packages/gnome.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 2d825081f6..bd415139b2 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5142,6 +5142,38 @@ libxml2.")
"\"/run/current-system/profile/share/wayland")
(("DATADIR \"/gnome")
"\"/run/current-system/profile/share/gnome"))
+ (substitute* '("daemon/gdm-session.c")
+ (("set_up_session_environment \\(self\\);")
+ (string-append
+ "set_up_session_environment (self);\n"
+ ;; Propagate GDM_X_SERVER environment variable (which is set
+ ;; by the GDM service, as it's a function of what X modules
+ ;; the user decides to have available) down to worker
+ ;; processes.
+ "gdm_session_set_environment_variable (self, \"GDM_X_SERVER\",\n"
+ " g_getenv (\"GDM_X_SERVER\"));\n"
+ ;; FIXME: Really glib should be declaring XDG_CONFIG_DIRS as a
+ ;; variable, but it doesn't do that right now. Anyway
+ ;; /run/current-system/profile/share/gnome-session/sessions/gnome.desktop
+ ;; requires that a number of .desktop files be present, and
+ ;; these special .desktop files are in $XDG_CONFIG_DIRS (which
+ ;; defaults to /etc/xdg if it's not set). Here we need to
+ ;; provide a value such that the GNOME session's requirements
+ ;; are met (provided GNOME is installed of course).
+ "gdm_session_set_environment_variable (self, \"XDG_CONFIG_DIRS\",\n"
+ " \"/run/current-system/profile/etc/xdg\");\n"
+ )))
+ ;; Look for custom GDM conf in /run/current-system.
+ (substitute* '("common/gdm-settings-backend.c")
+ (("GDM_CUSTOM_CONF")
+ "/run/current-system/etc/gdm/custom.conf"))
+ ;; Use service-supplied path to X.
+ (substitute* '("daemon/gdm-server.c")
+ (("\\(X_SERVER X_SERVER_ARG_FORMAT")
+ "(\"%s\" X_SERVER_ARG_FORMAT, g_getenv (\"GDM_X_SERVER\")"))
+ (substitute* '("daemon/gdm-x-session.c")
+ (("X_SERVER")
+ "g_getenv (\"GDM_X_SERVER\")"))
#t)))))
(native-inputs
`(("dconf" ,dconf)