Denmark
This space intentionally left blank.
Comment by ~kennylevinsen on ~kennylevinsen/gtkgreet
Had forgotten this, just made a 0.8 release.
Comment by ~kennylevinsen on ~kennylevinsen/greetd
agetty clears the screen by default before prompting for the login name. See
man agetty
, description of the "-J, --noclear" flag. The code can be seen here: https://github.com/util-linux/util-linux/blob/1e0ad14b3ac08d855cda6de346a65f9b834e00db/term-utils/agetty.c#L1275The clearing is actually done by greetd before activating the terminal, not by agreety. It could be made optional, but the current behavior intended to best simulate a normal text-based greeter setup (like agetty+login or ly).
Comment by ~kennylevinsen on ~kennylevinsen/seatd
Hmm, from what I can tell from systemd source, NOTIFY_SOCKET is always a path to the socket, so it should not need parsing. It might need opening though.
For reference, the "READY=1\n" thing was what was implemented for swaylock over in https://github.com/swaywm/swaylock/pull/281, where I believe we made the assumption that you'd be able to get an fd one way or another... Maybe emersion remembers the details?
Comment by ~kennylevinsen on ~kennylevinsen/seatd
The diff would be something like this:
diff --git a/seatd/seatd.c b/seatd/seatd.c index f88e6c9..5ccf52c 100644 --- a/seatd/seatd.c +++ b/seatd/seatd.c @@ -194,7 +194,8 @@ int main(int argc, char *argv[]) { log_info("seatd started"); if (readiness != -1) { - if (write(readiness, "\n", 1) == -1) { + const char ready_str[] = "READY=1\n"; + if (write(readiness, ready_str, strlen(ready_str)) != strlen(ready_str)) { log_errorf("Could not write readiness signal: %s\n", strerror(errno)); } close(readiness);There is no need for sendmsg for a simple string, and the service file can specify $NOTIFY_SOCKET as the
-n
parameter.
Comment by ~kennylevinsen on ~kennylevinsen/seatd
Best I can tell systemd services do not support s6 protocol.
I vaguely remember the two protocols overlapping if READY=1\n is sent.
I think linking to libsystemd should be fine ... and we pull libsystemd in when building seatd with libseat-logind support already
seatd never links with libsystemd - use-cases where one builds and uses libseat with logind support, and use-cases where one builds and runs seatd as a system service do not really overlap - and I do not intend on adding ifdefs and dependencies just to write a fixed string to an fd. :)
enhancement added by ~kennylevinsen on ~kennylevinsen/seatd
seatd added by ~kennylevinsen on ~kennylevinsen/seatd
Comment by ~kennylevinsen on ~kennylevinsen/seatd
seatd offers readiness through the s6 protocol - see
-n
.If there is a good usecase, it could possibly be adapted to allow the message to be customized to match the sd-notify format - or maybe just always write READY=1. Linking with libsystemd just for notify seems silly though.
Comment by ~kennylevinsen on ~kennylevinsen/wlsunset
Sounds good, closing!
REPORTED
RESOLVED CLOSEDComment by ~kennylevinsen on ~kennylevinsen/greetd
REPORTED
RESOLVED CLOSED