GNOME Bugzilla – Bug 696264
checks for systemd, not for logind
Last modified: 2013-03-21 15:52:16 UTC
gnome-screensaver wants to talk to logind, but actually checks for systemd. It is possible to build systemd without logind, in which case /sys/fs/cgroup/systemd would still exist. For that reason, sd_booted() was recently fixed upstream to only be true if systemd init is active [1]. For running systemd init without logind, or for running logind without systemd init we need to change the check to test for logind. For details, see [2] if you are interested. [1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=66e411811b8090 [2] https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html
Created attachment 239448 [details] [review] Check for logind, not for systemd
i don't completely understand. your patch does: + listener->priv->have_systemd = (access("/run/systemd/seats/", F_OK) >= 0); and the patch you pointed out does: - if (lstat("/sys/fs/cgroup/systemd", &b) < 0) + if (lstat("/run/systemd/system/", &st) < 0) return 0; - return a.st_dev != b.st_dev; + return !!S_ISDIR(st.st_mode); So isn't your patch essentially doing what sd_booted() does now?
Not quite. /run/systemd/system is the indicator for "booted with systemd", while /run/systemd/seats/ is the indicator for "logind is running". Lennart's reply at the bottom of https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html has the details.
ah okay. feel free to push this, but i wonder if we could get sd_login api added
I did ask Lennart about it, but he wasn't very enthusiastic about it. Also, it would require a version check in configure.ac, and either require systemd >= 199, or have a fallback for older versions.