guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: services: xorg: Enable override of xserver-arguments.


From: guix-commits
Subject: 01/01: services: xorg: Enable override of xserver-arguments.
Date: Sun, 17 Feb 2019 02:49:40 -0500 (EST)

janneke pushed a commit to branch master
in repository guix.

commit 24f11b06bbd2c7f4a236a5ef4b6d9c7bf5be47a8
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Fri Feb 15 19:13:55 2019 +0100

    services: xorg: Enable override of xserver-arguments.
    
    * gnu/services/xorg.scm (xorg-start-command): Add parameter 
#:xserver-arguments.
    * doc/guix.texi (X Window): Document it.
---
 doc/guix.texi         | 19 ++++++++++++++++++-
 gnu/services/xorg.scm |  8 +++++---
 2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 0419284..2ccc788 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -31,7 +31,7 @@ Copyright @copyright{} 2016, 2017, 2018 Chris address@hidden
 Copyright @copyright{} 2016, 2017, 2018 Efraim address@hidden
 Copyright @copyright{} 2016 John address@hidden
 Copyright @copyright{} 2016, 2017 Nils address@hidden
-Copyright @copyright{} 2016, 2017, 2018 Jan address@hidden
+Copyright @copyright{} 2016, 2017, 2018, 2019 Jan address@hidden
 Copyright @copyright{} 2016 Julien address@hidden
 Copyright @copyright{} 2016 Alex ter address@hidden
 Copyright @copyright{} 2016, 2017, 2018, 2019 Christopher address@hidden
@@ -13140,6 +13140,7 @@ type @code{<sddm-configuration>}.
   [#:fonts %default-xorg-fonts] @
   [#:configuration-file (xorg-configuration-file @dots{})] @
   [#:xorg-server @var{xorg-server}]
+  [#:xserver-arguments '("-nolisten" "tcp")]
 Return a @code{startx} script in which @var{modules}, a list of X module
 packages, and @var{fonts}, a list of X font directories, are available.  See
 @code{xorg-wrapper} for more details on the arguments.  The result should be
@@ -13148,6 +13149,22 @@ used in place of @code{startx}.
 Usually the X server is started by a login manager.
 @end deffn
 
address@hidden @code{-listen tcp}, for X11.
+This procedure is useful to override command line options for the X server,
+such as having it listen to over TCP:
+
address@hidden
+(operating-system
+  ...
+  (services
+    (modify-services %desktop-services
+      (slim-service-type config =>
+        (slim-configuration
+          (inherit config)
+          (startx (xorg-start-command
+                   #:xserver-arguments '("-listen" "tcp"))))))))
address@hidden example
+
 @deffn {Scheme Procedure} xorg-configuration-file @
   [#:modules %default-xorg-modules] @
   [#:fonts %default-xorg-fonts] @
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index f7d07b3..f2a3c28 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Courtès 
<address@hidden>
 ;;; Copyright © 2015 Sou Bunnbu <address@hidden>
 ;;; Copyright © 2018, 2019 Timothy Sample <address@hidden>
+;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -292,7 +293,8 @@ in place of @code{/usr/bin/X}."
                              (configuration-file
                               (xorg-configuration-file #:modules modules
                                                        #:fonts fonts))
-                             (xorg-server xorg-server))
+                             (xorg-server xorg-server)
+                             (xserver-arguments '("-nolisten" "tcp")))
   "Return a @code{startx} script in which @var{modules}, a list of X module
 packages, and @var{fonts}, a list of X font directories, are available.  See
 @code{xorg-wrapper} for more details on the arguments.  The result should be
@@ -305,8 +307,8 @@ used in place of @code{startx}."
   (define exp
     ;; Write a small wrapper around the X server.
     #~(apply execl #$X #$X ;; Second #$X is for argv[0].
-             "-logverbose" "-verbose" "-nolisten" "tcp" "-terminate"
-             (cdr (command-line))))
+             "-logverbose" "-verbose" "-terminate" address@hidden
+              (cdr (command-line))))
 
   (program-file "startx" exp))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]