acct-user/greetd: install with a home directory

Some graphical greeters, such as gtkgreet and wlgreet, store various
things in their home directory, such as the mesa shader cache. Having
a home directory also doesn't hurt for greeters that don't make use of
it.

As an example, greeters using Wayland compositors will attempt to cache
shaders in the $HOME/.cache/mesa_shader_cache directory. Also, greetd
explicitly is designed to not really care about the greeter in use, so
it doesn't make sense to NOT have a home directory for the greeter: the
lack of one is making an assumption about the greeter run by greetd and
serves little purpose (having an extra empty directory for greeters not
making use of a home directory doesn't hurt).

With regard to other distros, Debian also creates a home directory for
their greetd user[1][2], as does Fedora[3].

[1] https://salsa.debian.org/debian/greetd/-/blob/master/debian/greetd.postinst?ref_type=heads#L6
[2] https://salsa.debian.org/debian/greetd/-/blob/master/debian/greetd.postinst?ref_type=heads#L12-13
[3] https://src.fedoraproject.org/rpms/greetd/blob/rawhide/f/greetd.sysusers

Signed-off-by: Rahul Sandhu <nvraxn@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44139
Closes: https://github.com/gentoo/gentoo/pull/44139
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Rahul Sandhu 2025-10-12 04:46:14 +01:00 committed by Sam James
parent 99455dcac4
commit c2c8f83483
No known key found for this signature in database
GPG Key ID: 738409F520DF9190

View File

@ -1,4 +1,4 @@
# Copyright 2020-2024 Gentoo Authors
# Copyright 2020-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -7,6 +7,7 @@ inherit acct-user
ACCT_USER_ID=396
ACCT_USER_GROUPS=( greetd video )
ACCT_USER_HOME="/var/lib/greetd"
DESCRIPTION="User for gui-libs/greetd"
acct-user_add_deps