[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SLiM graphical login manager and keyboard layout
From: |
Diego Nicola Barbato |
Subject: |
Re: SLiM graphical login manager and keyboard layout |
Date: |
Fri, 18 Oct 2019 18:03:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hello Tanguy,
Tanguy Le Carrour <address@hidden> writes:
[...]
> I'm struggling to set the keyboard layout as, apparently,
> slim-service-type is not supposed to be extended as gdm-service-type is.
You can set the keyboard layout directly in the slim-configuration like
this:
--8<---------------cut here---------------start------------->8---
(service slim-service-type
(slim-configuration
(xorg-configuration
(keyboard-layout keyboard-layout))))
--8<---------------cut here---------------end--------------->8---
> I guess it's only a matter of copying (and adapting) the `(extend …)` and
> `(compose …)` blocks from `gdm-service-type` to `slim-service-type`. But it's
> just a guess. I've tried to define `my-slim-service-type` in my system config,
> but failed!
It's a good guess: I tried this a while back and it works, if there is
only one instance of slim-service-type:
>From be8f7e45384bb0676ea88f4cb488dd23114436f5 Mon Sep 17 00:00:00 2001
From: Diego Nicola Barbato <address@hidden>
Date: Fri, 27 Sep 2019 11:24:38 +0200
Subject: [PATCH] services: slim: Allow using 'set-xorg-configuration' with
SLiM.
Fixes <https://bugs.gnu.org/37422>.
* gnu/services/xorg.scm (slim-service-type)[compose, extend]: New fields.
---
gnu/services/xorg.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 1d55e388a1..1b78550825 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -589,6 +589,21 @@ reboot_cmd " shepherd "/sbin/reboot\n"
;; avoid bad surprises.
(service-extension profile-service-type
(const (list xterm)))))
+
+ ;; For convenience, this service can be extended with an
+ ;; <xorg-configuration> record. Take the first one that
+ ;; comes.
+ (compose (lambda (extensions)
+ (match extensions
+ (() #f)
+ ((config . _) config))))
+ (extend (lambda (config xorg-configuration)
+ (if xorg-configuration
+ (slim-configuration
+ (inherit config)
+ (xorg-configuration xorg-configuration))
+ config)))
+
(default-value (slim-configuration))))
(define-deprecated (slim-service #:key (slim slim)
--
2.23.0
If there are multiple SLiM services, it doesn't work, because "[t]here
can be only one instance of an extensible service type" (according to
'Service Types and Services' in the manual).
Because of that I believe making slim-service-type extensible would be
more confusing than useful, which is why I didn't pursue this further.
Maybe it should be mentioned in the manual that 'set-xorg-configuration'
doesn't work with SLiM?
Regards,
Diego