unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Diego Nicola Barbato <dnbarbato@posteo.de>
To: Tanguy Le Carrour <tanguy@bioneland.org>
Cc: Guix <guix-devel@gnu.org>
Subject: Re: SLiM graphical login manager and keyboard layout
Date: Fri, 18 Oct 2019 18:03:58 +0200	[thread overview]
Message-ID: <87eeza2g7l.fsf@GlaDOS.home> (raw)
In-Reply-To: <20191018123345.sxoawlfothe2tx3d@rafflesia> (Tanguy Le Carrour's message of "Fri, 18 Oct 2019 14:33:45 +0200")

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

Hello Tanguy,

Tanguy Le Carrour <tanguy@bioneland.org> 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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-services-slim-Allow-using-set-xorg-configuration-wit.patch --]
[-- Type: text/x-patch, Size: 1637 bytes --]

From be8f7e45384bb0676ea88f4cb488dd23114436f5 Mon Sep 17 00:00:00 2001
From: Diego Nicola Barbato <dnbarbato@posteo.de>
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


[-- Attachment #3: Type: text/plain, Size: 444 bytes --]


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

  parent reply	other threads:[~2019-10-18 16:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 12:33 SLiM graphical login manager and keyboard layout Tanguy Le Carrour
2019-10-18 14:40 ` Joshua Branson
2019-10-18 15:36   ` Tanguy Le Carrour
2019-10-18 14:55 ` Alex Griffin
2019-10-18 15:57   ` Tanguy Le Carrour
2019-10-18 16:03 ` Diego Nicola Barbato [this message]
2019-10-18 16:11   ` Tanguy Le Carrour
2019-10-18 16:57     ` Diego Nicola Barbato
2019-10-21  7:24       ` Tanguy Le Carrour
2019-10-22 12:36         ` Ludovic Courtès
2019-10-23  7:32           ` Tanguy Le Carrour

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=87eeza2g7l.fsf@GlaDOS.home \
    --to=dnbarbato@posteo.de \
    --cc=guix-devel@gnu.org \
    --cc=tanguy@bioneland.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).