summary refs log tree commit diff
path: root/gnu/services
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/ssh.scm9
-rw-r--r--gnu/services/xorg.scm30
2 files changed, 24 insertions, 15 deletions
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index 5fc98e988c..2b52c777b7 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -91,12 +91,17 @@ When @var{initialize?} is true, automatically create the seed and host key
 upon service activation if they do not exist yet.  This may take long and
 require interaction.
 
+When @var{initialize?} is false, it is up to the user to initialize the
+randomness generator (@pxref{lsh-make-seed,,, lsh, LSH Manual}), and to create
+a key pair with the private key stored in file @var{host-key} (@pxref{lshd
+basics,,, lsh, LSH Manual}).
+
 When @var{interfaces} is empty, lshd listens for connections on all the
 network interfaces; otherwise, @var{interfaces} must be a list of host names
 or addresses.
 
-@var{allow-empty-passwords?} specifies whether to accepts log-ins with empty
-passwords, and @var{root-login?} specifies whether to accepts log-ins as
+@var{allow-empty-passwords?} specifies whether to accept log-ins with empty
+passwords, and @var{root-login?} specifies whether to accept log-ins as
 root.
 
 The other options should be self-descriptive."
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 5236573a39..fbf96c799b 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -96,6 +96,7 @@ Section \"Files\"
   ModulePath \"" xf86-video-intel "/lib/xorg/modules/drivers\"
   ModulePath \"" xf86-video-mach64 "/lib/xorg/modules/drivers\"
   ModulePath \"" xf86-video-nv "/lib/xorg/modules/drivers\"
+  ModulePath \"" xf86-video-sis "/lib/xorg/modules/drivers\"
   ModulePath \"" xf86-input-keyboard "/lib/xorg/modules/input\"
   ModulePath \"" xf86-input-mouse "/lib/xorg/modules/input\"
   ModulePath \"" xf86-input-synaptics "/lib/xorg/modules/input\"
@@ -142,28 +143,31 @@ EndSection
     #~(begin
         (use-modules (ice-9 match))
 
+        (define (exec-from-login-shell command . args)
+          ;; Run COMMAND from a login shell so that it gets to see the same
+          ;; environment variables that one gets when logging in on a tty, for
+          ;; instance.
+          (let* ((pw    (getpw (getuid)))
+                 (shell (passwd:shell pw))
+                 (st    (stat command #f)))
+            (when (and st (not (zero? (logand (stat:mode st) #o100))))
+              ;; The '--login' option is supported at least by Bash and zsh.
+              (execl shell shell "--login" "-c"
+                     (string-join (cons command args))))))
+
+        ;; First, try to run ~/.xsession.
         (let* ((home     (getenv "HOME"))
-               (profile  (string-append home "/.guix-profile/bin"))
-               (PATH     (or (getenv "PATH") ""))
                (xsession (string-append home "/.xsession")))
-          ;; Make sure the user's profile is visible.
-          (setenv "PATH"
-                  (string-append profile
-                                 (if (string-null? PATH) "" ":")
-                                 PATH))
-
-          ;; First, try to run ~/.xsession.
-          (false-if-exception (execl xsession xsession)))
+          (exec-from-login-shell xsession))
 
         ;; Then try a pre-configured session type.
         (let ((ratpoison (string-append #$ratpoison "/bin/ratpoison"))
               (wmaker    (string-append #$windowmaker "/bin/wmaker")))
           (match (command-line)
             ((_ "ratpoison")
-             (execl ratpoison ratpoison))
+             (exec-from-login-shell ratpoison))
             (_
-             ;; 'wmaker' does execvp(argv[0]), so we really can't mess up.
-             (execl wmaker wmaker))))))
+             (exec-from-login-shell wmaker))))))
 
   (gexp->script "xinitrc" builder))