After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 696274 - checks for systemd, not for logind
checks for systemd, not for logind
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-21 11:26 UTC by Martin Pitt
Modified: 2013-04-21 22:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Check for logind, not for systemd (4.17 KB, patch)
2013-03-21 11:32 UTC, Martin Pitt
none Details | Review
Check for logind, not for systemd (4.17 KB, patch)
2013-03-21 11:58 UTC, Martin Pitt
committed Details | Review

Description Martin Pitt 2013-03-21 11:26:07 UTC
gnome-system-monitor mostly talks to logind, but actually checks for systemd with sd_booted(). It is possible to build systemd without logind, in which case sd_booted() would still succeed(), but the various sd_pid_get_* would fail.

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 [1] if you are interested.

[1] https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html
Comment 1 Martin Pitt 2013-03-21 11:32:11 UTC
Created attachment 239453 [details] [review]
Check for logind, not for systemd
Comment 2 Michael Biebl 2013-03-21 11:42:19 UTC
Hi Martin, are you sure this is correct?
E.g. [1] uses sd_pid_get_unit() which doesn't make sense when pid 1 != systemd


[1] https://git.gnome.org/browse/gnome-system-monitor/tree/src/proctable.cpp#n712
Comment 3 Martin Pitt 2013-03-21 11:47:50 UTC
Right, I noticed that as well (see my comment in https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00095.html), but it's fine. With logind and no systemd, sd_pid_get_unit() returns NULL as the unit, and the column in session-monitor just stays empty. It still displays the seat and session name, though, i. e. the other information from logind.
Comment 4 Martin Pitt 2013-03-21 11:58:57 UTC
Created attachment 239458 [details] [review]
Check for logind, not for systemd

Same patch, but less confusing changelog.
Comment 5 Martin Pitt 2013-03-29 10:43:12 UTC
I landed similar patches for gdm (bug 696266), gnome-session (bug 696262), gnome-shell (bug 696252) and gnome-screensaver (bug 696264) now, for 3.8.1. Can we push this one as well? Then GNOME 3.8.1 would be completely fixed for systemd without logind, or logind without systemd.

Thanks!
Comment 6 Robert Roth 2013-04-21 22:06:34 UTC
Review of attachment 239458 [details] [review]:

Committed to trunk.
Comment 7 Robert Roth 2013-04-21 22:07:37 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.