summaryrefslogtreecommitdiff
path: root/gnu/services/xorg.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-07-24 19:38:50 +0200
committerLudovic Courtès <ludo@gnu.org>2014-07-24 23:02:26 +0200
commit47b73c34f0ac1fbe2cacb9233e7e41cdcfef9caf (patch)
tree51266d00bef54cfd3bfb36eb490b54a65e595984 /gnu/services/xorg.scm
parentda9c810280c66b3c71699131fb09820cd0b275cf (diff)
services: xorg: Remove /var/run/slim.lock when starting.
Reported by Mark H. Weaver. * gnu/services/xorg.scm (slim-service)[start]: Remove /var/run/slim.lock before starting 'slim'.
Diffstat (limited to 'gnu/services/xorg.scm')
-rw-r--r--gnu/services/xorg.scm13
1 files changed, 9 insertions, 4 deletions
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 7ca0d3f7db..04d1296edc 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -146,10 +146,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