From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UKcmMtXatV5oXAAA0tVLHw (envelope-from ) for ; Fri, 08 May 2020 22:19:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0MaIJuLatV5TdQAAbx9fmQ (envelope-from ) for ; Fri, 08 May 2020 22:19:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 01F6D940712 for ; Fri, 8 May 2020 22:19:11 +0000 (UTC) Received: from localhost ([::1]:43498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXBKp-0001Jw-97 for larch@yhetil.org; Fri, 08 May 2020 18:19:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXBKg-0001Je-OL for guix-patches@gnu.org; Fri, 08 May 2020 18:19:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34890) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXBKf-00007P-RZ for guix-patches@gnu.org; Fri, 08 May 2020 18:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jXBKf-0000im-N9 for guix-patches@gnu.org; Fri, 08 May 2020 18:19:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35305] LightDM service Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 May 2020 22:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35305 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: L p R n d n Cc: 35305@debbugs.gnu.org Received: via spool by 35305-submit@debbugs.gnu.org id=B35305.15889763152721 (code B ref 35305); Fri, 08 May 2020 22:19:01 +0000 Received: (at 35305) by debbugs.gnu.org; 8 May 2020 22:18:35 +0000 Received: from localhost ([127.0.0.1]:46433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXBKF-0000ho-24 for submit@debbugs.gnu.org; Fri, 08 May 2020 18:18:35 -0400 Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jXBKC-0000hg-OU for 35305@debbugs.gnu.org; Fri, 08 May 2020 18:18:33 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1588976298; cv=none; d=zohomail.com; s=zohoarc; b=eqfL/if7t3ANBvYUgKkgn7TdbYjrm/+lvZ41ZZmRO/DHVpiwNLyh7MTheorxRbVcY6GKByM/eti11enRKxWUac4cjxE4+2Vd0xaOYHqHWG9C1ivjiIPMOqFt6vieP+LGs6Z8JaczjFbQPI6N3CqV7/OJ/c0jlKmfCxIyCAkKlnU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588976298; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=G749XDA1wt8hx0xM1ZJpz0XnZlphkcif8Eq2Q2b+Hmo=; b=V/S3zYFXWK4cFiohrQks7H/AIOOPLAyKqsjRUcv+9gH93goTnMseDQnEx/fuWiBScbImI2gt1TIRuCp0u5OiLgc/qhYLUw7/YadE+PcUhHiODz8FFGVgTOhZG0eWADYy4P+0w522ov3LwottE4hkwAj45blCuZ9/oM7GHVDlWRI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1588976298; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type; bh=G749XDA1wt8hx0xM1ZJpz0XnZlphkcif8Eq2Q2b+Hmo=; b=M4g1tKW7ZeCDxmxpS770A5X7dWVc/tesDYDCoA6Cqm9VhSobLQHX7ArGArMG9Eaq /OzbPwZyoUy+OOM2rjyFw1vZQlge3QpQk1Fw3pO7OlA6eJFPSs6aK3CYSU06MvJF85r zzY5INDKavhoE7B5dNzv8JUp5Sqg+2bOyR7JAddg= Received: from localhost (p54AD4BDF.dip0.t-ipconnect.de [84.173.75.223]) by mx.zohomail.com with SMTPS id 1588976297108840.4237971856606; Fri, 8 May 2020 15:18:17 -0700 (PDT) References: <87zhooso9g.fsf@lprndn.info> <87imh9gnvy.fsf@lprndn.info> User-agent: mu4e 1.2.0; emacs 26.3 From: Ricardo Wurmus In-reply-to: <87imh9gnvy.fsf@lprndn.info> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Sat, 09 May 2020 00:18:14 +0200 Message-ID: <87k11m2hqx.fsf@elephly.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-ZohoMailClient: External X-Zoho-Virus-Status: 1 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 X-Spam-Score: 1.99 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=elephly.net header.s=zoho header.b=M4g1tKW7; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Scan-Result: default: False [1.99 / 13.00]; GENERIC_REPUTATION(0.00)[-0.54037142935588]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.09), country: US(-0.00), ip: 209.51.188.17(-0.54)]; DWL_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; R_DKIM_REJECT(1.00)[elephly.net:s=zoho]; ARC_REJECT(2.00)[signature check failed: fail, {[1] = sig:zohomail.com:reject}]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; RCPT_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[elephly.net:-]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[84.173.75.223:received]; RCVD_IN_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:+]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[rekado@elephly.net,guix-patches-bounces@gnu.org]; URIBL_BLOCKED(0.00)[lprndn.info:email,elephly.net:email]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain,text/x-patch]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[elephly.net]; HAS_LIST_UNSUB(-0.01)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.51.188.17:from]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: wLB7M9sJKRqw --=-=-= Content-Type: text/plain I have applied all patches locally, pushed some of them to the master branch already, and also made these local changes: --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=lightdm.diff Content-Transfer-Encoding: quoted-printable diff --git a/doc/guix.texi b/doc/guix.texi index 14a42e7070..d1f6ed6685 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -80,6 +80,7 @@ Copyright @copyright{} 2020 Brice Waegeneire@* Copyright @copyright{} 2020 R Veera Kumar@* Copyright @copyright{} 2020 Pierre Langlois@* Copyright @copyright{} 2020 pinoaffe@* +Copyright @copyright{} 2020 L p R n d n@* =20 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -14933,9 +14934,9 @@ auto-login session. =20 @cindex LightDM, login manager @defvr {Scheme Variable} lightdm-service-type -Service type for the LightDM graphical login manager. -It uses the @code{lightdm-gtk-greeter} as default greeter. -See @code{lightdm-configuration} below for configuration and greeters' +Service type for the LightDM graphical login manager. It uses the +@code{lightdm-gtk-greeter} as default greeter. See +@code{lightdm-configuration} below for configuration and greeters' services for their specific configuration. @end defvr =20 @@ -14950,22 +14951,22 @@ The LightDM package to use. Whether to allow logins with empty passwords. =20 @item @code{xorg-configuration} (default: @code{(xorg-configuration)}) -Default configuration of the Xorg graphical server. This configuration +Default configuration of the Xorg graphical server. This configuration will be used for all seats unless explicitly defined. =20 -@item @code{sessions-directory} (default:"/run/current-system/profile/shar= e/xsessions:/run/current-system/profile/share/wayland-sessions") +@item @code{sessions-directories} (default: @code{'("/run/current-system/p= rofile/share/xsessions" "/run/current-system/profile/share/wayland-sessions= ")}) Directories where LightDM will search for sessions' @code{.desktop} files. =20 -@item @code{remote-sessions-directory} (default:"/run/current-system/profi= le/share/remote-session") +@item @code{remote-sessions-directories} (default: @code{'("/run/current-s= ystem/profile/share/remote-session")}) Directories where LightDM will search for remote sessions' @code{.desktop} files. =20 @item @code{seats} (default: @code{'()}) -A list of @code{lightdm-seat-configuration} records (see below) -to include in configuration. Note that needed additional packages or -configuration will need to be done manually. Thus, we recommend using a -greeter service for defining seats. If none are provided here or by a gree= ter, -a fallback one is added. +A list of @code{lightdm-seat-configuration} records (see below) to +include in configuration. Note that needed additional packages or +configuration will need to be done manually. Thus, we recommend using a +greeter service for defining seats. If none are provided here or by a +greeter, a fallback one is added. =20 @item @code{extra-config} (default: @code{'()}) A list of strings each describing a custom setting to append to the LightDM @@ -14981,8 +14982,8 @@ Record representing a seat configuration for LightD= M. @item @code{name-glob} (default: @code{"*"}) Seat configuration is matched to all seats matching the name glob. =20 -@item @code{type} (default: @code{"local"}) -Type of seat. @code{"local"} or @code{"xremote"}. +@item @code{type} (default: @code{'local}) +Type of seat. @code{'local} or @code{'xremote}. =20 @item @code{xorg-configuration} (default: @code{#f}) Configuration of the Xorg graphical server. @@ -14998,9 +14999,9 @@ The name of the default @code{.desktop} file descri= bing a session. Will be used for @code{user-session} and @code{autologin-session} if neces= sary. =20 @item @code{autologin-user} (default: "") -If @code{autologin-user} is set, LightDM logs in directly -as @code{autologin-user} to the session defined in -@code{default-user-session}. This user should be part of the +If @code{autologin-user} is set, LightDM logs in directly as +@code{autologin-user} to the session defined in +@code{default-user-session}. This user should be part of the @code{autologin} group. =20 @item @code{extra-config} (default: @code{'()}) @@ -15043,7 +15044,7 @@ The size of the cursor. Path to the background image to be used. =20 @item @code{a11y-state} (default: "contrast; font; keyboard; reader") -String describing states of accessibility features. @code{"name"} saves st= ate +String describing states of accessibility features. @code{"name"} saves s= tate on exit, @code{"-name"} disables at start and @code{"+name"} enables it. =20 @item @code{reader} (default: "") @@ -15051,8 +15052,8 @@ Command to launch screen reader. =20 @item @code{seats} (default: @code{'()}) List of @code{lightdm-seat-configuration} records (see above) to add to -lightdm.conf through extension. @code{greeter-session} fields -will be forced to @code{"lightdm-gtk-greeter"} +@file{lightdm.conf} through extension. @code{greeter-session} fields +are forced to @code{"lightdm-gtk-greeter"}. =20 @item @code{extra-config} (default: @code{'()}) A list of string each describing a custom setting to append to the greeter diff --git a/gnu/services/lightdm.scm b/gnu/services/lightdm.scm index fa5330aade..8b0c1fcebd 100644 --- a/gnu/services/lightdm.scm +++ b/gnu/services/lightdm.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2019,2020 L p R n d n +;;; Copyright =C2=A9 2019, 2020 L p R n d n +;;; Copyright =C2=A9 2020 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -60,7 +61,7 @@ (name-glob lightdm-seat-configuration-name-glob (default "*")) (type lightdm-seat-configuration-type - (default "local")) + (default 'local)) (xorg-configuration lightdm-seat-configuration-xorg-configuration (default #f)) (session-wrapper lightdm-seat-configuration-session-wrapper @@ -74,9 +75,9 @@ (extra-config lightdm-seat-configuration-extra-config (default '()))) =20 - (define (lightdm-seat-configuration->list seat default-xorg-configuration) - "Given a seat, outputs a list to be used by mixed-text-file through `app= ly." + "Given a seat, outputs a list of configuration file chunks to be passed = as +arguments to mixed-text-file." (match-record seat (name-glob type xorg-configuration session-wrapper @@ -84,7 +85,7 @@ autologin-user extra-config) (list " [Seat:" name-glob "] - type =3D " type + type =3D " (symbol->string type) ;; If no xorg-configuration is set by the seat use the one provided ;; by the lightdm service " @@ -114,15 +115,15 @@ (default lightdm)) (allow-empty-passwords? lightdm-configuration-allow-empty-passwords? (default #f)) - (sessions-directory - lightdm-configuration-sessions-directory - (default - "/run/current-system/profile/share/xsessions:/run/current-system/prof= ile/share/wayland-sessions")) + (sessions-directories + lightdm-configuration-sessions-directories + (default '("/run/current-system/profile/share/xsessions" + "/run/current-system/profile/share/wayland-sessions"))) (greeters-directory lightdm-configuration-greeters-directory (default "/run/current-system/profile/share/xgreeter= s")) - (remote-sessions-directory lightdm-configuration-remote-sessions-directo= ry - (default - "/run/current-system/profile/share/remote-s= essions")) + (remote-sessions-directories + lightdm-configuration-remote-sessions-directories + (default '("/run/current-system/profile/share/remote-sessions"))) ;; Having a xorg-configuration field here allows us ;; to benefit from set-xorg-configuration. (xorg-configuration lightdm-configuration-xorg-configuration @@ -135,25 +136,27 @@ (define (lightdm-configuration-file config) (match-record config (allow-empty-passwords? - sessions-directory greeters-directory - remote-sessions-directory xorg-configuration + sessions-directories greeters-directory + remote-sessions-directories xorg-configuration seats extra-config) - ;; Little trick to allow unquote-splicing of seats - (apply mixed-text-file `("lightdm.conf" " + (apply mixed-text-file "lightdm.conf" + `("\ [LightDM] greeter-user =3D lightdm greeters-directory =3D " ,greeters-directory " -sessions-directory =3D " ,sessions-directory " -remote-sessions-directory =3D " ,remote-sessions-directory " +sessions-directory =3D " ,(string-join sessions-directories ":") " +remote-sessions-directory =3D " ,(string-join remote-sessions-directories = ":") " =20 #Seats - " ,@(if (null? seats) - (lightdm-seat-configuration->list (lightdm-seat-configuration) - xorg-configuration) - (concatenate - (map (lambda (seat) - (lightdm-seat-configuration->list seat xorg-configuration= )) - seats))) " +" +,@(if (null? seats) + (lightdm-seat-configuration->list (lightdm-seat-configuration) + xorg-configuration) + (concatenate + (map (lambda (seat) + (lightdm-seat-configuration->list seat xorg-configuration)) + seats))) +" #Extra config " ,(string-join extra-config "\n"))))) =20 @@ -337,8 +340,8 @@ remote-sessions-directory =3D " ,remote-sessions-direct= ory " (seats (append (assoc-ref extensions "seats") (lightdm-configuration-seats con= fig)))))) (default-value (lightdm-configuration)) - (description "Return a service that spawns the - LightDM graphical login manager."))) + (description "Return a service that spawns the LightDM +graphical login manager."))) =20 ;; GREETERS =20 @@ -418,5 +421,5 @@ a11y-states =3D " a11y-states = " lightdm-gtk-greeter-profile-service))) (default-value (lightdm-gtk-greeter-configuration)) (description - "Set-up lightdm-gtk-greeter as well -as its configuration file and extends LightDM with its seats."))) + "Set-up lightdm-gtk-greeter as well as its configuration = file +and extend LightDM with its seats."))) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable What do you think about these changes? I felt that a list of directories should be expressed as a list and not a colon-separated string. I realize that this clashes with the lightdm configuration file, which speaks of =E2=80=9Cdirectory=E2=80=9D even though it accepts a colon-separated list of directories. If that=E2=80=99s fine I=E2=80=99ll fold them into your patch that adds the= service. I built a VM and noticed that all icons are missing. Should the service arrange for a certain fallback icon theme to be installed? I also haven=E2=80=99t actually been able to log in as root with an empty password, which is what the VM generates by default. Can this be supported with lightdm? -- Ricardo --=-=-=--