! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
RFE: add systemd support to replace ConsoleKit


Description Kevin Fenzi 2012-04-18 19:58:53 CEST
ConsoleKit is being dropped at some point, replaced by calls to systemd instead. 
It would be nice if xfce4-session supported this at some point. 




Almost surely too late for 4.10, but would be nice. ;)
Comment 1 Landry Breuil editbugs 2012-05-05 08:45:16 CEST
Argh. Now the portability sillyness begins.. as long at it doesn't break ckit/sudo..
I think Auke Kok did parts of this for Tizen.
Comment 2 Raphael Groner 2012-05-05 12:30:24 CEST
Systemd was mainly developed for Gnome3 in Fedora, propably to take away most of the configuration effort from the user by doing autodetections where possible. If you look what problems other distributions have to port systemd, you know what's happening here: Systemd conflicts with a lot of goals of (other) distributions.

This would mean that systemd support should stay as optionsl for Xfce. For instance, ArchLinux can be driven without usage of systemd at all, and that should be the future, too.

Just my 5 ct. Sorry if it's trolling (again).
Comment 3 Raphael Groner 2012-05-08 14:17:28 CEST
Maybe interesting side node for the discussion about ConsoleKit, Upstart vs. Systemd.

Canonical: Ubuntu To Soon Ship On 5% Of PCs
Posted by Michael Larabel on May 07, 2012
Comment 4 Jannis Pohlmann editbugs 2012-06-30 12:40:38 CEST
@Raphael: Please don't spam Bugzilla by posting misinformation (systemd developed for GNOME 3) and irrelevant news articles (that Phoronix link is of no use for the discussion about systemd).
Comment 5 Raphael Groner 2012-07-14 01:48:31 CEST
@Jannis: Sorry, but you are wrong. You should better read what other developers are writing about their own software: https://mail.gnome.org/archives/desktop-devel-list/2011-May/msg00427.html

"In the future I expect more interfacing with GNOME however, and I'd thus
like to see the discussion regarding acceptance as blessed
dependency started early."
Comment 6 Yves-Alexis Perez editbugs 2012-07-14 15:01:38 CEST
By the way, note that if GNOME3 begins to require Linux kernel to be usable, then (again) some people will switch to Xfce (and other DE). Unless we make the same choice, obviously.
Comment 7 Christian Hesse 2012-07-27 15:40:00 CEST
Created attachment 4572 
add systemd support to xfce4-session
Comment 8 Christian Hesse 2012-07-27 15:40:52 CEST
Ok, hacked a bit and got the attached patch. Tested it in a virtual machine, seems to work there. Any comments?
Comment 9 Jérôme Guelfucci editbugs 2012-08-05 17:40:06 CEST

I don't have systemd so I can't test your patch. 

Reviewing your patch, you should respect the naming conventions of xfce4-session. It would be great for readability and maintainability if you used the same file structure and naming conventions as the xfsm-consolekit.{c,h} files.


Comment 10 Evangelos Foutras 2012-10-15 01:41:11 CEST
Created attachment 4662 
Changes to Christian Hesse's original patch

I had to make a few changes for shutdown and reboot to work properly with systemd (consolekit is not present on the system anymore).

This is the first time I dabble with polkit/logind stuff, but I needed xfce4-session to work with systemd now that Arch is dropping consolekit.

Aside from the method id changes (org.freedesktop.login1.shutdown -> org.freedesktop.login1.power-off, Restart -> Reboot, Shutdown -> PowerOff), the following two changes were needed:

1) polkit_unix_session_new_for_process_sync() -> polkit_unix_process_new()

polkitd would simple die otherwise.

Relevant report: https://bugs.freedesktop.org/show_bug.cgi?id=53905

2) g_dbus_connection_call() -> g_dbus_connection_call_sync()

With the asynchronous call, xfce4-session would exit and I'd be back to the SLiM login manager. With g_dbus_connection_call_sync() the system will correctly shutdown/reboot.
Comment 11 Christian Hesse 2012-10-30 22:09:05 CET
Created attachment 4702 

Ok, reworked this a bit. I merged the changes by Evangelos Foutras and tried to meet the xfce4-session naming conventions.

Hope this can go mainline some time...
Comment 12 Nick Schermer editbugs 2012-11-04 21:24:45 CET
Pushed in ae28aef.
Comment 13 Kevin Fenzi 2012-11-04 21:28:56 CET
Excellent. :) Any chance of a 4.10.1 release with this? :)

Bug #8729

Reported by:
Kevin Fenzi
Reported on: 2012-04-18
Last modified on: 2012-11-04


Xfce Bug Triage
CC List:
13 users




add systemd support to xfce4-session (12.40 KB, patch)
2012-07-27 15:40 CEST , Christian Hesse
no flags
Changes to Christian Hesse's original patch (2.45 KB, patch)
2012-10-15 01:41 CEST , Evangelos Foutras
no flags
xfce4-session-systemd-v2 (12.50 KB, patch)
2012-10-30 22:09 CET , Christian Hesse
no flags

Additional information