This adds "switch" true/false flag in "terminal" section of
configuration file.
Flag controls whether terminal under control should be switched to
when greetd starts. If "switch" set to true, greetd behaves as it
did before, on start vt_setactivate will be called. If "switch" set
to false, and terminal under control by greetd is not currently
active VT, greetd will wait for terminal to become active with
vt_waitactive, which translates to VT_WAITACTIVE ioctl call.
* greetd/src/config/mod.rs: add "switch" flag
* greetd/src/server.rs: add using "switch" flag and waiting for active
* greetd/src/terminal/mod.rs: add vt_waitactive method
* man/greetd-5.scd: mention "switch" configuration option
Security concerns were raised regarding the initial session being
executed whenever greetd was restarted (when signing out of one's DE,
when greetd or a greeter restarted or crashed, ...).
This creates a runfile (by default at /run/greetd.run) either when the
initial session is executed or when a greeter is started. Whenever this
file exists, the initial session is ignored (and the configured greeter
is always run).
- Split the config system into multiple files in its own folder.
- Use a manual Deserialize implementation for VtSelection.
- Change config format to use sections for better organization.
- Add temporary fallback to parse old format.
It was entirely unused, and was complicating a change. It is only
necessary if we need to pass arguments to PAM, as other environment
variables can be loaded by the started command.
This feature can be revisited in the future if it becomes necessary.