apognu / tuigreet

Graphical console greeter for greetd
GNU General Public License v3.0
912 stars 41 forks source link

--remember* options is not working. /var/cache/tuigreet is empty #123

Closed SDD701 closed 6 months ago

SDD701 commented 7 months ago

Hello. Looks like tuigreet does not create any files is /var/cache/tuigreet even if I set some --remember* options (so it doesn't remember anything).

OS: Gentoo

Greetd config:

# The VT to run the greeter on. Can be "next", "current" or a number
# designating the VT.
vt = 7

# The default session, also known as the greeter.
[default_session]

# `agreety` is the bundled agetty/login-lookalike. You can replace `$SHELL`
# with whatever you want started, such as `sway`.
command = "tuigreet --width 100 --time --remember --remember-session --asterisks --asterisks-char X --power-shutdown 'doas poweroff' --power-reboot 'doas reboot'"

# The user to run the command as. The privileges this user must have depends
# on the greeter. A graphical greeter may for example require the user to be
# in the `video` group.
user = "SDD"
apognu commented 6 months ago

What are the permissions for /var/cache/tuigreet? It should be readable and writable by the user greetd runs as (in your case, as I can see, your own user?).

SDD701 commented 6 months ago

Here you are. I guess maybe I should be in the greetd group? 20240221_23h32m39s_grim

apognu commented 6 months ago

Usually, at least how it's recommended by greetd, it (and therefore its greeters) should run as the greetd user and not your own (security-wise, it does defeat the purpose of authentication if the thing that authenticates you already runs as you).

So it is expected that packagers set /var/cache/tuigreet as owned by greetd.

You could add your user in that group, but I would kindly recommend that you run greetd as its own user instead. Basically, change to user = "greetd" in the configuration.

SDD701 commented 6 months ago

Usually, at least how it's recommended by greetd, it (and therefore its greeters) should run as the greetd user and not your own (security-wise, it does defeat the purpose of authentication if the thing that authenticates you already runs as you).

So it is expected that packagers set /var/cache/tuigreet as owned by greetd.

You could add your user in that group, but I would kindly recommend that you run greetd as its own user instead. Basically, change to user = "greetd" in the configuration.

Changing user to greetd fixed the issue. Thank you