From patchwork Fri Feb 15 18:32:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 1100 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2FDBC16C44; Fri, 15 Feb 2019 18:34:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id BC4C516C42 for ; Fri, 15 Feb 2019 18:34:09 +0000 (GMT) Received: from localhost ([127.0.0.1]:44509 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guiJN-0002IV-5N for patchwork@mira.cbaines.net; Fri, 15 Feb 2019 13:34:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guiJH-0002HX-Go for guix-patches@gnu.org; Fri, 15 Feb 2019 13:34:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guiJG-0006bO-EZ for guix-patches@gnu.org; Fri, 15 Feb 2019 13:34:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50516) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1guiJG-0006aq-2b for guix-patches@gnu.org; Fri, 15 Feb 2019 13:34:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1guiJF-0001Cj-Uz for guix-patches@gnu.org; Fri, 15 Feb 2019 13:34:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34493] [PATCH] services: xorg: Enable override of xserver-arguments. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 15 Feb 2019 18:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34493 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34493@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15502555894562 (code B ref -1); Fri, 15 Feb 2019 18:34:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Feb 2019 18:33:09 +0000 Received: from localhost ([127.0.0.1]:49797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guiIP-0001BW-DE for submit@debbugs.gnu.org; Fri, 15 Feb 2019 13:33:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guiIL-0001Aq-4V for submit@debbugs.gnu.org; Fri, 15 Feb 2019 13:33:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:33453) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1guiIF-0005zK-LW for submit@debbugs.gnu.org; Fri, 15 Feb 2019 13:32:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guiIE-0001yL-AI for guix-patches@gnu.org; Fri, 15 Feb 2019 13:32:59 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guiI7-0005uW-O9; Fri, 15 Feb 2019 13:32:54 -0500 Received: from [2001:985:ca59:1:718d:ac50:5291:c299] (port=39614 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1guiI6-0006sV-99; Fri, 15 Feb 2019 13:32:51 -0500 From: Jan Nieuwenhuizen Date: Fri, 15 Feb 2019 19:32:47 +0100 Message-ID: <878syg52cw.fsf@gnu.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi! Here's a patch I have been using in order to use Emacs in lockstep mode; it took me some time to figure out that listening to TCP is turned off by default and where to enable it. Not sure if it warrants a whole example in the documentation, though. Also, I chose not to move "-logverbose" "-verbose" and"-terminate" to the default arguments, these are still hardcoded. Greetings, janneke From f1685ca38dc0c55056eed0002f194b6081b6339a Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 15 Feb 2019 19:13:55 +0100 Subject: [PATCH] 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 | 18 ++++++++++++++++++ gnu/services/xorg.scm | 7 ++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 1ac077d98a..31c99fab03 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13123,6 +13123,7 @@ type @code{}. [#: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 @@ -13131,6 +13132,23 @@ used in place of @code{startx}. Usually the X server is started by a login manager. @end deffn +@cindex -listen tcp +@cindex -nolisten tcp +This procedure is useful to override command line options for the X server, +such as having it listen to over TCP: + +@example +(operating-system + ... + (services + (modify-services %desktop-services + (slim-service-type config => + (slim-configuration + (inherit config) + (startx (xorg-start-command + #:xserver-arguments '("-listen" "tcp")))))))) +@end 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 1efb275794..50ed0d3b9a 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -290,7 +290,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 @@ -303,8 +304,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" #$@xserver-arguments + (cdr (command-line)))) (program-file "startx" exp)) -- 2.20.1