apognu / tuigreet

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

Allow specifing session type for --cmd session #148

Closed tmccombs closed 1 month ago

tmccombs commented 2 months ago

When tuigreet uses a session from one of the session directories it can infer the session type from the folder, but if the default session from the cms option is used, then XDG_SESSION_TYPE isn't set. I would like a way to specify the value of the session type (wayland or x11) when using the cms session.

Alternatively, have a way to set environment variables that are set before the pam session is started when using the cmd session.

apognu commented 2 months ago

Adding an argument to provide environment variables to be used when the default command (--cmd) is started could be an option. This would remain flexible to add other, unrelated to the graphical environment, variables if needed.

The way I see it, this should only be applied to the default session: the environment should be cleared if the command is changed from the UI, or a session is selected or remembered. Does this make sense?

apognu commented 1 month ago

@tmccombs Do you have any opinion on this?

tmccombs commented 1 month ago

That sounds good to me

apognu commented 1 month ago

This has been merged onto the main branch and will be included in 0.10.0. If you're using a bleeding-edge version of tuigreet, feel free to test it out and create new issues if you notice problems.