From: Ricardo Wurmus <rekado@elephly.net>
To: L p R n d n <guix@lprndn.info>
Cc: 35305@debbugs.gnu.org
Subject: [bug#35305] LightDM service
Date: Sat, 09 May 2020 00:18:14 +0200 [thread overview]
Message-ID: <87k11m2hqx.fsf@elephly.net> (raw)
In-Reply-To: <87imh9gnvy.fsf@lprndn.info>
[-- Attachment #1: Type: text/plain, Size: 123 bytes --]
I have applied all patches locally, pushed some of them to the master
branch already, and also made these local changes:
[-- Attachment #2: lightdm.diff --]
[-- Type: text/x-patch, Size: 10820 bytes --]
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@*
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.
@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
@@ -14950,22 +14951,22 @@ The LightDM package to use.
Whether to allow logins with empty passwords.
@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.
-@item @code{sessions-directory} (default:"/run/current-system/profile/share/xsessions:/run/current-system/profile/share/wayland-sessions")
+@item @code{sessions-directories} (default: @code{'("/run/current-system/profile/share/xsessions" "/run/current-system/profile/share/wayland-sessions")})
Directories where LightDM will search for sessions' @code{.desktop} files.
-@item @code{remote-sessions-directory} (default:"/run/current-system/profile/share/remote-session")
+@item @code{remote-sessions-directories} (default: @code{'("/run/current-system/profile/share/remote-session")})
Directories where LightDM will search for remote sessions'
@code{.desktop} files.
@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 greeter,
-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.
@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 LightDM.
@item @code{name-glob} (default: @code{"*"})
Seat configuration is matched to all seats matching the name glob.
-@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}.
@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 describing a session.
Will be used for @code{user-session} and @code{autologin-session} if necessary.
@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.
@item @code{extra-config} (default: @code{'()})
@@ -15043,7 +15044,7 @@ The size of the cursor.
Path to the background image to be used.
@item @code{a11y-state} (default: "contrast; font; keyboard; reader")
-String describing states of accessibility features. @code{"name"} saves state
+String describing states of accessibility features. @code{"name"} saves state
on exit, @code{"-name"} disables at start and @code{"+name"} enables it.
@item @code{reader} (default: "")
@@ -15051,8 +15052,8 @@ Command to launch screen reader.
@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"}.
@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 © 2019,2020 L p R n d n <guix@lprndn.info>
+;;; Copyright © 2019, 2020 L p R n d n <guix@lprndn.info>
+;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; 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 '())))
-
(define (lightdm-seat-configuration->list seat default-xorg-configuration)
- "Given a seat, outputs a list to be used by mixed-text-file through `apply."
+ "Given a seat, outputs a list of configuration file chunks to be passed as
+arguments to mixed-text-file."
(match-record seat <lightdm-seat-configuration>
(name-glob
type xorg-configuration session-wrapper
@@ -84,7 +85,7 @@
autologin-user extra-config)
(list "
[Seat:" name-glob "]
- type = " type
+ type = " (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/profile/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/xgreeters"))
- (remote-sessions-directory lightdm-configuration-remote-sessions-directory
- (default
- "/run/current-system/profile/share/remote-sessions"))
+ (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 <lightdm-configuration>
(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 = lightdm
greeters-directory = " ,greeters-directory "
-sessions-directory = " ,sessions-directory "
-remote-sessions-directory = " ,remote-sessions-directory "
+sessions-directory = " ,(string-join sessions-directories ":") "
+remote-sessions-directory = " ,(string-join remote-sessions-directories ":") "
#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")))))
@@ -337,8 +340,8 @@ remote-sessions-directory = " ,remote-sessions-directory "
(seats (append (assoc-ref extensions "seats")
(lightdm-configuration-seats config))))))
(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.")))
;; GREETERS
@@ -418,5 +421,5 @@ a11y-states = " 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.")))
[-- Attachment #3: Type: text/plain, Size: 695 bytes --]
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 “directory” even though it accepts a
colon-separated list of directories.
If that’s fine I’ll 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’t 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
next prev parent reply other threads:[~2020-05-08 22:19 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-17 14:24 [bug#35305] [WIP] LightDM service L p R n d n
2019-04-18 11:20 ` Jonathan Brielmaier
[not found] ` <handler.35305.B.155550391014002.ack@debbugs.gnu.org>
2019-04-18 13:20 ` [bug#35305] Acknowledgement ([WIP] LightDM service) L p R n d n
2019-04-18 16:03 ` L p R n d n
2019-08-26 15:58 ` L p R n d n
2020-03-15 21:50 ` Nicolò Balzarotti
2020-03-16 7:34 ` Efraim Flashner
2020-03-16 8:36 ` L p R n d n
2020-03-19 11:54 ` [bug#35305] LightDM service L p R n d n
2019-05-23 11:04 ` [bug#35305] [PATCH] " L p R n d n
2020-04-07 17:06 ` [bug#35305] " Brice Waegeneire
2020-04-09 16:02 ` L p R n d n
2020-04-12 9:53 ` Brice Waegeneire
2020-04-14 9:38 ` L p R n d n
2020-04-14 13:17 ` L p R n d n
2020-04-22 15:26 ` L p R n d n
2020-05-06 14:05 ` L p R n d n
2020-05-08 22:18 ` Ricardo Wurmus [this message]
2020-05-09 15:09 ` L p R n d n
2020-05-10 19:21 ` Ricardo Wurmus
2020-05-11 10:14 ` L p R n d n
2020-05-12 9:59 ` L p R n d n
2020-05-20 20:51 ` Ricardo Wurmus
2020-05-21 8:28 ` L p R n d n
2020-05-21 9:23 ` Ricardo Wurmus
2020-06-08 15:35 ` L p R n d n
2022-08-04 5:09 ` [bug#35305] [WIP] " Maxim Cournoyer
2020-06-19 14:47 ` [bug#35305] " L p R n d n
2022-08-04 2:19 ` [bug#35305] [WIP] " Maxim Cournoyer
2022-08-31 7:13 ` bug#35305: " Ricardo Wurmus
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=87k11m2hqx.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=35305@debbugs.gnu.org \
--cc=guix@lprndn.info \
/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).