mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-24 11:39:46 -05:00
home-services: on-first-login: Check if XDG_RUNTIME_DIR exists.
Fixes <https://issues.guix.gnu.org/50945>. Reported by Jan Nieuwenhuizen <janneke@gnu.org>. * gnu/home-services.scm (on-first-login): on-first-login won't execute anything if XDG_RUNTIME_DIR doesn't exists. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
2ebcc5387b
commit
5c2f30d3de
1 changed files with 7 additions and 2 deletions
|
@ -286,8 +286,13 @@ (define (compute-on-first-login-script _ gexps)
|
|||
;; XDG_RUNTIME_DIR dissapears on logout, that means such trick
|
||||
;; allows to launch on-first-login script on first login only
|
||||
;; after complete logout/reboot.
|
||||
(when (not (file-exists? flag-file-path))
|
||||
(begin #$@gexps (touch flag-file-path))))))
|
||||
(if (file-exists? xdg-runtime-dir)
|
||||
(unless (file-exists? flag-file-path)
|
||||
(begin #$@gexps (touch flag-file-path)))
|
||||
(display "XDG_RUNTIME_DIR doesn't exists, on-first-login script
|
||||
won't execute anything. You can check if xdg runtime directory exists,
|
||||
XDG_RUNTIME_DIR variable is set to apropriate value and manually execute the
|
||||
script by running '$HOME/.guix-home/on-first-login'")))))
|
||||
|
||||
(define (on-first-login-script-entry m-on-first-login)
|
||||
"Return, as a monadic value, an entry for the on-first-login script
|
||||
|
|
Loading…
Reference in a new issue