From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:48605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO83F-0005BS-N2 for guix-patches@gnu.org; Tue, 07 May 2019 17:55:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hO83E-0003di-GW for guix-patches@gnu.org; Tue, 07 May 2019 17:55:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46312) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hO83E-0003ce-4L for guix-patches@gnu.org; Tue, 07 May 2019 17:55:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hO83C-0005f3-BK for guix-patches@gnu.org; Tue, 07 May 2019 17:55:03 -0400 Subject: [bug#35493] [PATCH 1/3] gnu: slim: Allow customisation of Xorg display. Resent-Message-ID: From: Diego Nicola Barbato References: <871s1kad42.fsf@GlaDOS.home> <87zho88yh4.fsf@GlaDOS.home> <87muk0m13s.fsf@gnu.org> <874l67rf8o.fsf@GlaDOS.home> <87woj25pxy.fsf@gnu.org> Date: Tue, 07 May 2019 23:54:36 +0200 In-Reply-To: <87woj25pxy.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 07 May 2019 15:55:53 +0200") Message-ID: <87tve6orqb.fsf@GlaDOS.home> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 35493@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, Ludovic Court=C3=A8s writes: > Hi Diego, > > Diego Nicola Barbato skribis: > >> Ludovic Court=C3=A8s writes: > > [...] > >>> The patch LGTM. Just one question: did you submit it upstream (is there >>> still an upstream?), and if so, could we add the URL of upstream=E2=80= =99s >>> tracking software or an indication about the submission? >> >> I did not submit it upstream (the most likely candidate seems to be this >> [0] even though it is not mentioned e.g. on the ArchWiki), since the >> general consensus seems to be that the project has been abandoned. > > That makes sense. > > I=E2=80=99ve applied the 3 patches and confirmed that > gnu/system/examples/vm-image.tmpl, which uses SLiM, still works > correctly. > > However, I=E2=80=99ve noticed that this changes the name of the default S= hepherd > service from =E2=80=98xorg-server=E2=80=99 to =E2=80=98xorg-server-vt7=E2= =80=99. > > What about generating an =E2=80=98xorg-server=E2=80=99 Shepherd service t= hat would > depend on all the =E2=80=98xorg-server-vtN=E2=80=99 services? Hmm that w= ouldn=E2=80=99t be > entirely equivalent: =E2=80=98herd start xorg-server=E2=80=99 would start= them all, but > =E2=80=98herd stop xorg-server=E2=80=99 wouldn=E2=80=99t stop any of them. > > Perhaps a simple fix is, when there=E2=80=99s only one server launched, t= o have > the Shepherd service provide both =E2=80=98xorg-server-vtN=E2=80=99 and = =E2=80=98xorg-server=E2=80=99. > Or to special-case vt7 such that the service for vt7 provides both > =E2=80=98xorg-server=E2=80=99 and =E2=80=98xorg-server-vt7=E2=80=99. > > Thoughts? How about changing the default value of vt to #f and having the Shepherd service provide =E2=80=98xorg-server-vtN=E2=80=99 only if vt is set to "vtN= " and =E2=80=98xorg-server=E2=80=99 otherwise. That way the name of the default = Shepherd service would not change. I have attached a patch that does just that. If we apply it we will also have to update the documentation to reflect the change of vt's default value. Regards, Diego --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-services-slim-Make-default-Shepherd-service-provide-.patch >From 14d0106f53ee17aea8f176745bf6dd5d8a748965 Mon Sep 17 00:00:00 2001 From: Diego Nicola Barbato Date: Tue, 7 May 2019 22:22:48 +0200 Subject: [PATCH] services: slim: Make default Shepherd service provide 'xorg-server'. Commit 6426a8fb6c changed the name of the default Shepherd service from 'xorg-server' to 'xorg-server-vt7'. This patch changes it back. * gnu/services/xorg.scm (define-module): Use module (ice-9 format). ()[vt]: Change default value to #f. (slim-shepherd-service)[shepherd-service][provision]: Provide 'xorg-server-vtN' if vt is set to "vtN" and 'xorg-server' if vt is #f. --- gnu/services/xorg.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 65e9d48915..81e38665c9 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -52,6 +52,7 @@ #:use-module (srfi srfi-9) #:use-module (srfi srfi-26) #:use-module (ice-9 match) + #:use-module (ice-9 format) #:export (xorg-configuration xorg-configuration? xorg-configuration-modules @@ -493,7 +494,7 @@ desktop session from the system or user profile will be used." (display slim-configuration-display (default ":0")) (vt slim-configuration-vt - (default "vt7")) + (default #f)) (sessreg slim-configuration-sessreg (default sessreg))) @@ -510,7 +511,8 @@ desktop session from the system or user profile will be used." (xauth (slim-configuration-xauth config)) (startx (xorg-start-command (slim-configuration-xorg config))) (display (slim-configuration-display config)) - (vt (slim-configuration-vt config)) + (vt? (slim-configuration-vt config)) + (vt (or vt? "vt7")) (shepherd (slim-configuration-shepherd config)) (theme-name (slim-configuration-theme-name config)) (sessreg (slim-configuration-sessreg config)) @@ -549,8 +551,8 @@ reboot_cmd " shepherd "/sbin/reboot\n" (list (shepherd-service (documentation "Xorg display server") - (provision (list (symbol-append 'xorg-server- - (string->symbol vt)))) + (provision (list (string->symbol + (format #f "xorg-server~@[-~a~]" vt?)))) (requirement '(user-processes host-name udev)) (start #~(lambda () -- 2.21.0 --=-=-=--