Subject: [bug#76286] [PATCH] services: greetd: Use user default login shell.

From: muradm <[email-masked]>
Date: Fri, 21 Feb 2025 20:42:11 +0300

Hi!

Techincally looks fine, however...

Initially, I intentionally didn't go with login shell. The problem 
is, you can't write 'bash -l` in passwd database.
Having shell command configured in passwd, and its arguments in 
guix configuration may intiated unwanted inconsistency.
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 :)
Personally, I didn't feel comfortable in spreading configuration 
of one command in two unrelated places.

As far as I understand, whoever uses shell configured in passwd 
should known how to invoke it.

However, for instance, in my passwd shell is 
'/gnu/store/cdwviyfnsfv7k57qrwmym0mrynjixc1i-bash-5.1.16/bin/bash', 
if I would not use 'greetd' who would run 'bash -l'?

With Guix, this situation can be handled purely with passwd 
(either command if no args needed or command-with-args wrapping 
script), then for the sake of consistency I would deprecate 
'command' and 'command-args' and rely on passwd only.

Otherwise, I'm afraid that adding complexity in 
'greetd-user-session-command' program to match known shell 
commands, and probably warning/failing for unknown ones will be 
necessary. IMHO.

Maxim Cournoyer <[email-masked]> writes:

> Hi!
>
> Murilo <[email-masked]> writes:
>
>> * 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
>
> LGTM.  CC'ìng muradm, just to be sure.  They worked on the 
> recent greetd
> changes.
>
> Reviewed-by: Maxim Cournoyer <[email-masked]>