all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#70318] [PATCH] Fix unitentional creation of greeter's home directory
@ 2024-04-09 23:58 lgcoelho--- via Guix-patches via
  2025-01-03 18:05 ` muradm
  0 siblings, 1 reply; 5+ messages in thread
From: lgcoelho--- via Guix-patches via @ 2024-04-09 23:58 UTC (permalink / raw)
  To: 70318


[-- Attachment #1.1: Type: text/plain, Size: 110 bytes --]

This patch adresses the unintentional creation of the greeter's home 
directory when using the greetd-service.

[-- Attachment #1.2: Type: text/html, Size: 296 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-services-base-Fix-unintentional-creation-of-greeter-.patch --]
[-- Type: text/x-diff; name=0001-services-base-Fix-unintentional-creation-of-greeter-.patch, Size: 1159 bytes --]

From 4be55c2b63c050ae837e9afa7969cfb3ee8df1e5 Mon Sep 17 00:00:00 2001
From: Luis Guilherme Coelho <lgcoelho@disroot.org>
Date: Tue, 9 Apr 2024 20:38:33 -0300
Subject: [PATCH] services: base: Fix unintentional creation of greeter's home
 directory

* gnu/services/base.scm (greetd-account) [create-home-directory?]: Set to false.
---
 gnu/services/base.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 3f912225a0..b39b8418ed 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2022 Justin Veilleux <terramorpha@cock.li>
 ;;; Copyright © 2022 ( <paren@disroot.org>
 ;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
+;;; Copyright © 2024 Luis Guilherme Coelho <lgcoelho@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3481,6 +3482,7 @@ (define (greetd-accounts config)
          (name "greeter")
          (group "greeter")
          (supplementary-groups (greetd-greeter-supplementary-groups config))
+         (create-home-directory? #f)
          (system? #t))))
 
 (define (make-greetd-pam-mount-conf-file config)
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#70318] [PATCH] Fix unitentional creation of greeter's home directory
  2024-04-09 23:58 [bug#70318] [PATCH] Fix unitentional creation of greeter's home directory lgcoelho--- via Guix-patches via
@ 2025-01-03 18:05 ` muradm
  2025-01-04 14:06   ` Nicolas Graves via Guix-patches via
  0 siblings, 1 reply; 5+ messages in thread
From: muradm @ 2025-01-03 18:05 UTC (permalink / raw)
  To: lgcoelho; +Cc: 70318

[-- Attachment #1: Type: text/plain, Size: 586 bytes --]


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.

lgcoelho@disroot.org writes:

> This patch adresses the unintentional creation of the greeter's 
> home
> directory when using the greetd-service.
>
> [4. text/x-diff; 
> 0001-services-base-Fix-unintentional-creation-of-greeter-.patch]...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#70318] [PATCH] Fix unitentional creation of greeter's home directory
  2025-01-03 18:05 ` muradm
@ 2025-01-04 14:06   ` Nicolas Graves via Guix-patches via
  2025-01-04 15:05     ` muradm
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2025-01-04 14:06 UTC (permalink / raw)
  To: muradm, lgcoelho; +Cc: 70318

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?

-- 
Best regards,
Nicolas Graves




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#70318] [PATCH] Fix unitentional creation of greeter's home directory
  2025-01-04 14:06   ` Nicolas Graves via Guix-patches via
@ 2025-01-04 15:05     ` muradm
  2025-01-04 17:08       ` muradm
  0 siblings, 1 reply; 5+ messages in thread
From: muradm @ 2025-01-04 15:05 UTC (permalink / raw)
  To: Nicolas Graves; +Cc: 70318, lgcoelho

[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]

Nicolas Graves <ngraves@ngraves.fr> 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?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#70318] [PATCH] Fix unitentional creation of greeter's home directory
  2025-01-04 15:05     ` muradm
@ 2025-01-04 17:08       ` muradm
  0 siblings, 0 replies; 5+ messages in thread
From: muradm @ 2025-01-04 17:08 UTC (permalink / raw)
  To: Nicolas Graves; +Cc: 70318, lgcoelho

[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]

muradm <mail@muradm.net> writes:

>>
>> 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?

After some more meditation, I remembered that originally I also 
did not like idea of having extra user home directory and 
considering changes introduced by #75270, it became obvious that 
sway specific environment can be setup within 
`make-greetd-sway-greeter-command`. Further greeters may either 
improve on it, or provide their own entry point commands as they 
see fit. v2 of 75270 includes this change, and adjusts the 
environment accordingly. This issue can be closed in favor if 
75270.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-01-04 17:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 23:58 [bug#70318] [PATCH] Fix unitentional creation of greeter's home directory lgcoelho--- via Guix-patches via
2025-01-03 18:05 ` muradm
2025-01-04 14:06   ` Nicolas Graves via Guix-patches via
2025-01-04 15:05     ` muradm
2025-01-04 17:08       ` muradm

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.