Subject: Re: [bug#70318] [PATCH] Fix unitentional creation of greeter's home directory

From: muradm <[email-masked]>
Date: Sat, 04 Jan 2025 18:05:49 +0300

Nicolas Graves <[email-masked]> writes:

> On 2025-01-03 21:05, muradm wrote:
>
>> This may break greeters which are more complex than agreety. 
>> For
>> instance, gtkgreet/wlgreet run under sway. One of 
>> subdependencies
>> is mesa, which will want to write shader caches somewhere. 
>> Another
>> one is fontconfig, doing similar thing for fonts. There may be
>> others, which hard to track and tune. Some could be impossible 
>> to
>> tune at all.
>
> Then maybe we can make it conditional on agreety?
>
> If all greetd-configuration-terminals have their
> greet-default-session-command being an greetd-agreety-session?, 
> we could
> set it to #f.
>
> Something like this could work:
> (create-home-directory? (not (every greetd-agreety-session? (map 
> greetd-default-session-command (greetd-configuration-terminals 
> config)))))
>
> WDYT?

2 of 3 greeters needs home. With improvements implemented by 75270 
`greetd-terminal-configuration` is detached from details of its 
`default-session-command`. By this, any user can workout its 
greeter. If we hardcode implementation of greeter in terminal user 
may loose such flexibility. Also once you implement such 
condition, you will have to maintain with any other greeter added 
in the future.

One way would be to carry this flag into `greetd-configuration`, 
IMHO will uneccessarily complicate the things. Is there any good 
reason for doing that?

What is the problem with having home directory for greeter user?