[arch-general] systemd-run --user does not work

Ismael Bouya ismael.bouya at normalesup.org
Wed May 14 04:07:55 EDT 2014

(Wed, May 14, 2014 at 09:45:40AM +0200) Yamakaky :
> Now I understand why sometimes I have two dbus daemons, thanks ! It's because I
> manage tmux with systemd --user, and $DBUS is set by my xorg session not managed
> by systemd.

Watch out about that. It's tempting to have your tmux managed by systemd
services (did you enable "lingering" to be sure that it doesn't get
killed when you exit your sessions?). And I do too.

However, to make it simple, a shell "part of a service" is not equivalent
to a shell "in the session scope of the user", so you should expect
problems with that (if you ever get lost, the command "systemd-cgls" is a
good way to find out in which kind of scope your processes are).

In particular, a service is never considered "active" by systemd, and
this can create problems when in interaction with polkit (for instance),
where the same command ("shutdown" is the best known example) will be
accepted without needing sudo in a regular shell while it will be refused
in a shell "part of a service".

I don't say of course that you shouldn't do it, just keep in mind that
it's not equivalent :p

> In fact, why isn't there a user unit for dbus by default ?

That's a good question!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20140514/5d162beb/attachment.asc>

More information about the arch-general mailing list