GNU bug report logs -
#76286
[PATCH] services: greetd: Use user default login shell.
Previous Next
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
[Message part 1 (text/plain, inline)]
Your bug report
#76286: [PATCH] services: greetd: Use user default login shell.
which was filed against the guix-patches package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 76286 <at> debbugs.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)]
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.
[Message part 3 (message/rfc822, inline)]
* 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
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.