summary refs log tree commit diff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-11-12 18:55:33 +0100
committerLudovic Courtès <ludo@gnu.org>2014-11-12 23:56:28 +0100
commit08dbc3b5503f6cbfcb5b131797a4deb55e91101b (patch)
tree0cfda0343bceea510c9215100a5f3ce64043ec0c /gnu/services
parent0b0fbf0c16a280270c1ce4d716e958d07efbccbd (diff)
downloadguix-08dbc3b5503f6cbfcb5b131797a4deb55e91101b.tar.gz
services: xorg: Set argv[0] for the window manager.
* gnu/services/xorg.scm (xinitrc): Set argv[0] when invoking ratpoison
  or wmaker.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/xorg.scm13
1 files changed, 8 insertions, 5 deletions
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 9c075acd0f..2d25635bcb 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -148,11 +148,14 @@ EndSection
           (false-if-exception (execl file file)))
 
         ;; Then try a pre-configured session type.
-        (match (command-line)
-          ((_ "ratpoison")
-           (execl (string-append #$ratpoison "/bin/ratpoison")))
-          (_
-           (execl (string-append #$windowmaker "/bin/wmaker"))))))
+        (let ((ratpoison (string-append #$ratpoison "/bin/ratpoison"))
+              (wmaker    (string-append #$windowmaker "/bin/wmaker")))
+          (match (command-line)
+            ((_ "ratpoison")
+             (execl ratpoison ratpoison))
+            (_
+             ;; 'wmaker' does execvp(argv[0]), so we really can't mess up.
+             (execl wmaker wmaker))))))
 
   (gexp->script "xinitrc" builder))