From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: muradm <mail@muradm.net>, 75270@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>,
"Maxim Cournoyer" <maxim.cournoyer@gmail.com>
Subject: [bug#75270] [PATCH 1/3] services: greetd: Improve greeter configurations.
Date: Fri, 03 Jan 2025 14:23:01 +0100 [thread overview]
Message-ID: <87pll4owui.fsf@ngraves.fr> (raw)
In-Reply-To: <8ea5f949f8b473c3ec68e7d2f5f40c1152c6c631.1735771462.git.mail@muradm.net>
On 2025-01-02 01:53, muradm wrote:
> This improvement focuses on providing common user session scripts
> for use by multiple greeters. It also fixes incorrect use of
> `XDG_RUNTIME_DIR` for `wlgreet`. `wlgreet` requires compositor to
> run. We provide common sway based greeter script, which can be
> shared by other graphical greeters.
[...]
> +(define (make-greetd-sway-greeter-command sway sway-config)
> + (let ((sway-bin (file-append sway "/bin/sway")))
> + (program-file
> + "greeter-sway-command"
> + #~(begin
> + (let* ((username (getenv "USER"))
> + (useruid (passwd:uid (getpwuid username)))
> + (useruid (number->string useruid))
> + ;; /run/user/<greeter-user-uid> won't exist yet
> + ;; this will contain WAYLAND_DISPLAY socket file
> + ;; and log-file below
> + (user-xdg-runtime-dir "/tmp/greeter-xdg-rt")
> + (log-file (string-append (number->string (getpid)) ".log"))
> + (log-file (string-append user-xdg-runtime-dir "/"
> log-file)))
Could you explain why this is necessary? If I'm not mistaken, we didn't
used a special runtime dir in RDE, and it worked OK.
> + (mkdir user-xdg-runtime-dir #o700)
> + (setenv "XDG_RUNTIME_DIR" user-xdg-runtime-dir)
> + (sleep 1) ;; give time to elogind or seatd
> + (dup2
> + (open-fdes
> + log-file
> + (logior O_CREAT O_WRONLY O_APPEND)
> + #o640)
> + 1)
> + (dup2 1 2)
Maybe also here a tiny comment on why this is better than the previous
fileno approach.
> + (execl #$sway-bin #$sway-bin "-d" "-c" #$sway-config))))))
Also, what about the XDG_CURRENT_DESKTOP setting? Should it not be added
with xdg-env too?
--
Best regards,
Nicolas Graves
next prev parent reply other threads:[~2025-01-03 13:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87jzbar8oa.fsf@muradm.net>
2025-01-01 22:47 ` [bug#75270] [PATCH 0/3] services: greetd: Improve greeter configurations muradm
2025-01-01 22:53 ` [bug#75270] [PATCH 1/3] " muradm
2025-01-03 13:23 ` Nicolas Graves via Guix-patches via [this message]
2025-01-03 17:08 ` muradm
2025-01-04 10:57 ` Nicolas Graves via Guix-patches via
2025-01-04 13:36 ` muradm
2025-01-01 22:53 ` [bug#75270] [PATCH 2/3] gnu: Add gtkgreet muradm
2025-01-01 22:53 ` [bug#75270] [PATCH 3/3] services: greetd: Add new gtkgreet greeter muradm
2025-01-03 11:34 ` [bug#75270] [PATCH 0/3] services: greetd: Improve greeter configurations muradm
2025-01-04 16:14 ` [bug#75270] Fwd: [bug#75270] [PATCH 1/3] " Nicolas Graves via Guix-patches via
2025-01-04 16:58 ` [bug#75270] [PATCH v2 0/3] " muradm
2025-01-04 16:58 ` [bug#75270] [PATCH v2 1/3] " muradm
2025-01-04 16:58 ` [bug#75270] [PATCH v2 2/3] gnu: Add gtkgreet muradm
2025-01-04 16:58 ` [bug#75270] [PATCH v2 3/3] services: greetd: Add new gtkgreet greeter muradm
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=87pll4owui.fsf@ngraves.fr \
--to=guix-patches@gnu.org \
--cc=75270@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=mail@muradm.net \
--cc=maxim.cournoyer@gmail.com \
--cc=ngraves@ngraves.fr \
/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).