aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/xorg.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-07-27 20:15:50 -0400
committerMark H Weaver <mhw@netris.org>2014-07-27 20:15:50 -0400
commit33690ffde5af2c516bc6b2dd060ab9cf7ab88eb2 (patch)
treed91daca5084dec6ede304d2c9ff1c376a740e416 /gnu/services/xorg.scm
parent5c47b06b4370e7d6590b0c75404d694a52897293 (diff)
parentb9663471a87916f36b50af2a0f885f6f08dc3ed2 (diff)
downloadguix-33690ffde5af2c516bc6b2dd060ab9cf7ab88eb2.tar
guix-33690ffde5af2c516bc6b2dd060ab9cf7ab88eb2.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/services/xorg.scm')
-rw-r--r--gnu/services/xorg.scm20
1 files changed, 15 insertions, 5 deletions
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 7ca0d3f7db..a34129a8ed 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -97,7 +97,12 @@ EndSection
#~(begin
(use-modules (ice-9 match))
- ;; TODO: Check for ~/.xsession.
+ ;; First, try to run ~/.xsession.
+ (let* ((home (getenv "HOME"))
+ (file (string-append home "/.xsession")))
+ (false-if-exception (execl file file)))
+
+ ;; Then try a pre-configured session type.
(match (command-line)
((_ "ratpoison")
(execl (string-append #$ratpoison "/bin/ratpoison")))
@@ -146,10 +151,15 @@ reboot_cmd " dmd "/sbin/reboot
(provision '(xorg-server))
(requirement '(user-processes host-name udev))
(start
- #~(make-forkexec-constructor
- (list (string-append #$slim "/bin/slim") "-nodaemon")
- #:environment-variables
- (list (string-append "SLIM_CFGFILE=" #$slim.cfg))))
+ #~(lambda ()
+ ;; A stale lock file can prevent SLiM from starting, so remove it
+ ;; to be on the safe side.
+ (false-if-exception (delete-file "/var/run/slim.lock"))
+
+ (fork+exec-command
+ (list (string-append #$slim "/bin/slim") "-nodaemon")
+ #:environment-variables
+ (list (string-append "SLIM_CFGFILE=" #$slim.cfg)))))
(stop #~(make-kill-destructor))
(respawn? #t)
(pam-services