I obviously have the privilege to shutdown through dbus, cuz it works in XFCE4, but in KDE4, I only have an option to logout.

Any thoughts?

I start kde4 with dbus-launch --exit-with-session startkde


Yes, I got Active=yes from systemctl, but removing the dbus-launch stopped docky from launching, and .. shutdown option still not available


Using dbus-launch is no longer needed with systemd. You need to make sure that when running startx that Xwindows is launched on the say TTY. This will insure that you preserve the login session. Below I've listed some notes on setting up systemd --user sessions.


Users should first set up systemd-logind to manage their session. If systemd is running as the system init daemon, then this is already happening.

Next, the user must launch systemd by putting the following in their ~/.xinitrc.

systemd --user

If the user is not launching the window manager through systemd --user, then

systemd --user &

should be used and launched like anything else in ~/.xinitrc, before execing the window manager.

After starting X, the user can check whether their session is now being managed by systemd-logind with the following command:

$ loginctl --no-pager show-session $XDG_SESSION_ID | grep Active

If this command prints Active=yes, then the user is now using systemd-logind to manage their session. The user should remove any instances of ck-launch-session or dbus-launch from their ~/.xinitrc, as those commands are unneeded.

More information on this can be found here

  • No luck, see my updates – daisy Mar 12 '13 at 10:18
  • are you running systemd --user in your .xinitrc – cinelli Mar 12 '13 at 20:57
  • It blocks, so I ran systemd --user & instead, prior to startkde – daisy Mar 13 '13 at 0:11
  • Place systemd --user & in your .xinitrc and remove all dbus related lines. So your .xinitrc should show. `systemd --user & <newline> exec startkde – cinelli Mar 13 '13 at 0:21
  • If this does not work. Then install KDM and systemctl enable kdm.service (to enable starting at boot) followed by systemctl start kdm.service. Or you could just reboot and test that the service unit starts at boot. – cinelli Mar 13 '13 at 0:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.