GNU bug report logs - #76286
[PATCH] services: greetd: Use user default login shell.

Previous Next

Package: guix-patches;

Reported by: Murilo <murilo <at> disroot.org>

Date: Fri, 14 Feb 2025 11:50:02 UTC

Severity: normal

Tags: patch

Done: "Murilo" <murilo <at> disroot.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "Murilo" <murilo <at> disroot.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#76286: closed ([PATCH] services: greetd: Use user default
 login shell.)
Date: Sat, 22 Feb 2025 15:33:07 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 22 Feb 2025 12:31:51 -0300
with message-id <D7Z2ZVUVJ0N6.2VRYAT8ZKB2F4 <at> disroot.org>
and subject line Re: bug#76286: [PATCH] services: greetd: Use user default login shell.
has caused the debbugs.gnu.org bug report #76286,
regarding [PATCH] services: greetd: Use user default login shell.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
76286: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76286
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Murilo <murilo <at> disroot.org>
To: guix-patches <at> gnu.org
Cc: Murilo <murilo <at> disroot.org>
Subject: [PATCH] services: greetd: Use user default login shell.
Date: Fri, 14 Feb 2025 08:40:46 -0300
* gnu/services/base.scm (<greetd-user-session>)[command]: Use user's
expected login shell.
* doc/guix.texi (Base Services): Change default value for
'greetd-user-session-command' to reflect the newer default command.

Change-Id: Iae702312000d5bc3cc16d40af205ee2c1e5bc4be
---

This patch changes 'greetd-user-session-command' to use the user's actual login
shell by default, rather than bash.

 doc/guix.texi         | 5 +++--
 gnu/services/base.scm | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index bd66adf326..ab1598e181 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20630,8 +20630,9 @@ Base Services
 of Bash.
 
 @table @asis
-@item @code{command} (default: @code{(file-append bash "/bin/bash")})
-Command to be started by @command{agreety} on successful login.
+@item @code{command} (default: @code{#~(passwd:shell (getpwnam (getenv "USER")))})
+Command to be started by @command{agreety} on successful login. Defaults to the
+user login shell.
 
 @item @code{command-args} (default: @code{'("-l")})
 Command arguments to pass to command.
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 4bc0433def..848b1bd276 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -3398,7 +3398,8 @@ (define %qemu-static-networking
 
 (define-record-type* <greetd-user-session>
   greetd-user-session make-greetd-user-session greetd-user-session?
-  (command greetd-user-session-command (default (file-append bash "/bin/bash")))
+  (command greetd-user-session-command
+           (default #~(passwd:shell (getpwnam (getenv "USER")))))
   (command-args greetd-user-session-command-args (default '("-l")))
   (extra-env greetd-user-session-extra-env (default '()))
   (xdg-session-type greetd-user-session-xdg-session-type (default "tty"))

base-commit: 3a916935311568b742d734cf76be8a45737f9382
-- 
2.48.1



[Message part 3 (message/rfc822, inline)]
From: "Murilo" <murilo <at> disroot.org>
To: "Maxim Cournoyer" <maxim.cournoyer <at> gmail.com>, "muradm" <mail <at> muradm.net>
Cc: 76286-done <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: bug#76286: [PATCH] services: greetd: Use user default login shell.
Date: Sat, 22 Feb 2025 12:31:51 -0300
Hi Maxim and muradm,

> muradm <mail <at> muradm.net> writes:
>> For instance, user puts some fancy command as shell in passwd, and
>> greetd sticks '-l' flag to it that nukes the hard drive - exaggeration
>> to illustrate the problem :)

I see, I haven't thought of this issue, thanks for your input, muradm.

On Sat Feb 22, 2025 at 10:13 AM -03, Maxim Cournoyer wrote:
> Murilo, what do you think?  Can we close this, preserving the fully
> declarative status quo?

Yes, I'm closing this, thanks for reviewing anyways Maxim, really appreciate it.


This bug report was last modified 84 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.