services: xorg: Accept session commands with arguments.
Before that, a session command with several items, such as 'gnome-session --disable-acceleration-check', would trigger the fallback session. * gnu/services/xorg.scm (xinitrc)[builder]: Accept command lines with more than one arguments.
This commit is contained in:
parent
a0d7baaf48
commit
c510cbb4ec
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -246,13 +246,14 @@ (define (exec-from-login-shell command . args)
|
||||||
(let* ((home (getenv "HOME"))
|
(let* ((home (getenv "HOME"))
|
||||||
(xsession-file (string-append home "/.xsession"))
|
(xsession-file (string-append home "/.xsession"))
|
||||||
(session (match (command-line)
|
(session (match (command-line)
|
||||||
((_ x) x)
|
((_) (list #$fallback-session))
|
||||||
(_ #$fallback-session))))
|
((_ x ..1) x))))
|
||||||
(if (file-exists? xsession-file)
|
(if (file-exists? xsession-file)
|
||||||
;; Run ~/.xsession when it exists.
|
;; Run ~/.xsession when it exists.
|
||||||
(exec-from-login-shell xsession-file session)
|
(exec-from-login-shell xsession-file session)
|
||||||
;; Otherwise, start the specified session.
|
;; Otherwise, start the specified session.
|
||||||
(exec-from-login-shell session)))))
|
(apply exec-from-login-shell session)))))
|
||||||
|
|
||||||
(program-file "xinitrc" builder))
|
(program-file "xinitrc" builder))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue