greetd/src/server.rs
on line 27 calls
term.vt_setactivate(*vt)?;
However TerminalMode::Terminal constructed with hardcoded switch: true
or switch: false
.
When greetd is started with agreety for multiple terminals, each greetd results in calling term.vt_setactivate
which causes:
I would suggest to add switch
option in ConfigTerminal
, and pass it to TerminalMode::Terminal
, so that primary terminal could be configured to call term.vt_setactivate
and others not.
Another (also arguably better) way could be delaying greetd worker until designated terminal is active.
Probably in
greetd/src/server.rs
right after:let term_mode = get_tty(&config)?;
it could be possible to wait for
term_mode.vt
to become active before proceeding using any of:
- ioctl: VT_WAITACTIVE
- inotify: /sys/devices/virtual/tty/tty0/active
- or similar
Then if user never switches to specific tty, greetd won't start worker and greeter for it.