From mboxrd@z Thu Jan 1 00:00:00 1970 From: Diego Nicola Barbato Subject: Re: SLiM graphical login manager and keyboard layout Date: Fri, 18 Oct 2019 18:03:58 +0200 Message-ID: <87eeza2g7l.fsf@GlaDOS.home> References: <20191018123345.sxoawlfothe2tx3d@rafflesia> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:47835) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLUjb-0007OQ-Vs for guix-devel@gnu.org; Fri, 18 Oct 2019 12:04:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLUja-0004fk-6Y for guix-devel@gnu.org; Fri, 18 Oct 2019 12:04:11 -0400 Received: from mout01.posteo.de ([185.67.36.65]:58698) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iLUjZ-0004ei-IK for guix-devel@gnu.org; Fri, 18 Oct 2019 12:04:10 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 40E2116005F for ; Fri, 18 Oct 2019 18:04:06 +0200 (CEST) In-Reply-To: <20191018123345.sxoawlfothe2tx3d@rafflesia> (Tanguy Le Carrour's message of "Fri, 18 Oct 2019 14:33:45 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Tanguy Le Carrour Cc: Guix --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Tanguy, Tanguy Le Carrour 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 =E2=80= =A6)` and > `(compose =E2=80=A6)` blocks from `gdm-service-type` to `slim-service-typ= e`. But it's > just a guess. I've tried to define `my-slim-service-type` in my system co= nfig, > 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: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-services-slim-Allow-using-set-xorg-configuration-wit.patch >From be8f7e45384bb0676ea88f4cb488dd23114436f5 Mon Sep 17 00:00:00 2001 From: Diego Nicola Barbato Date: Fri, 27 Sep 2019 11:24:38 +0200 Subject: [PATCH] services: slim: Allow using 'set-xorg-configuration' with SLiM. Fixes . * 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 + ;; 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 --=-=-= Content-Type: text/plain 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 --=-=-=--