summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services')
-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