unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Diego Nicola Barbato <dnbarbato@posteo.de>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 35493@debbugs.gnu.org
Subject: [bug#35493] [PATCH 1/3] gnu: slim: Allow customisation of Xorg display.
Date: Tue, 07 May 2019 23:54:36 +0200	[thread overview]
Message-ID: <87tve6orqb.fsf@GlaDOS.home> (raw)
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")

[-- Attachment #1: Type: text/plain, Size: 1942 bytes --]

Hi Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

> Hi Diego,
>
> Diego Nicola Barbato <dnbarbato@posteo.de> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> 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’s
>>> 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’ve applied the 3 patches and confirmed that
> gnu/system/examples/vm-image.tmpl, which uses SLiM, still works
> correctly.
>
> However, I’ve noticed that this changes the name of the default Shepherd
> service from ‘xorg-server’ to ‘xorg-server-vt7’.
>
> What about generating an ‘xorg-server’ Shepherd service that would
> depend on all the ‘xorg-server-vtN’ services?  Hmm that wouldn’t be
> entirely equivalent: ‘herd start xorg-server’ would start them all, but
> ‘herd stop xorg-server’ wouldn’t stop any of them.
>
> Perhaps a simple fix is, when there’s only one server launched, to have
> the Shepherd service provide both ‘xorg-server-vtN’ and ‘xorg-server’.
> Or to special-case vt7 such that the service for vt7 provides both
> ‘xorg-server’ and ‘xorg-server-vt7’.
>
> Thoughts?

How about changing the default value of vt to #f and having the Shepherd
service provide ‘xorg-server-vtN’ only if vt is set to "vtN" and
‘xorg-server’ 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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-services-slim-Make-default-Shepherd-service-provide-.patch --]
[-- Type: text/x-patch, Size: 2497 bytes --]

From 14d0106f53ee17aea8f176745bf6dd5d8a748965 Mon Sep 17 00:00:00 2001
From: Diego Nicola Barbato <dnbarbato@posteo.de>
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).
  (<slim-configuration>)[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


  reply	other threads:[~2019-05-07 21:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 18:19 [bug#35493] [PATCH 0/3] Allow multiple SLiM services Diego Nicola Barbato
2019-04-29 18:20 ` [bug#35493] [PATCH 1/3] gnu: slim: Allow customisation of Xorg display Diego Nicola Barbato
2019-05-06  8:35   ` Ludovic Courtès
2019-05-06 11:31     ` Diego Nicola Barbato
2019-05-07 13:55       ` Ludovic Courtès
2019-05-07 21:54         ` Diego Nicola Barbato [this message]
2019-05-08 10:29           ` Ludovic Courtès
2019-05-08 20:12             ` Diego Nicola Barbato
2019-05-09 10:19               ` bug#35493: " Ludovic Courtès
2019-04-29 18:20 ` [bug#35493] [PATCH 2/3] services: slim: Allow SLiM to be started on multiple ttys Diego Nicola Barbato
2019-04-29 18:20 ` [bug#35493] [PATCH 3/3] doc: Document 'display' and 'vt' fields of 'slim-configuration' Diego Nicola Barbato

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tve6orqb.fsf@GlaDOS.home \
    --to=dnbarbato@posteo.de \
    --cc=35493@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).