diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 7ca0d3f7db7cba750a6a8bc4368d833e471ab847..04d1296edc30eaf190002058622201cfbab84221 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -146,10 +146,15 @@ (define (slim.cfg) (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