diff mbox series

[bug#35493,1/3] gnu: slim: Allow customisation of Xorgdisplay.

Message ID 87v9ylz1bd.fsf@gnu.org
State Accepted
Headers show
Series [bug#35493,1/3] gnu: slim: Allow customisation of Xorgdisplay. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Ludovic Courtès May 8, 2019, 10:29 a.m. UTC
Hi,

Diego Nicola Barbato <dnbarbato@posteo.de> skribis:

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

[...]

>> 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 think I would prefer special-casing vt7, as shown below.  That way the
‘vt’ field would always be a string, which looks more consistent to me.

Thoughts?

Thanks,
Ludo’.

Comments

Diego Nicola Barbato May 8, 2019, 8:12 p.m. UTC | #1
Hello,

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

> Hi,
>
> Diego Nicola Barbato <dnbarbato@posteo.de> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>
> [...]
>
>>> 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 think I would prefer special-casing vt7, as shown below.  That way the
> ‘vt’ field would always be a string, which looks more consistent to me.
>
> Thoughts?

I have no strong feelings either way.  If it is OK that 'herd status'
displays 'xorg-server-vt7' instead of 'xorg-server' we can go for the
special-casing approach.

Regards,

Diego
diff mbox series

Patch

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 65e9d48915..f7c8684738 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -549,8 +549,11 @@  reboot_cmd " shepherd "/sbin/reboot\n"
 
     (list (shepherd-service
            (documentation "Xorg display server")
-           (provision (list (symbol-append 'xorg-server-
-                                           (string->symbol vt))))
+           (provision (cons (symbol-append 'xorg-server-
+                                           (string->symbol vt))
+                            (if (string=? vt "vt7")
+                                '(xorg-server)
+                                '())))
            (requirement '(user-processes host-name udev))
            (start
             #~(lambda ()