Open pavelkogan opened 8 years ago
This will only work correctly if your distro has enabled the "user bus" for everything.
systemd --user services don't have access to the "session" bus (of which there can be several anyway), since they run outside a session. They instead have a "user" bus shared across all sessions, and graphical sessions can be configured to connect to the user bus instead of launching a session bus.
(The user bus works the same way as a session bus would, including tools using it via the --session
option etc. – the only technical difference is that it's started by dbus.service instead of dbus-launch, and has a fixed address instead of a random one.)
I'm on Ubuntu 16.04. I did install dbus-user-session
and start a user bus with systemctl --user enable dbus.service
, etc., since the mpDris2
service wouldn't start without it.
Do I need to do something else to get this to work? You said something about configuring graphical sessions?
The combination of mpDris2
and dbus-user-session
definitely works on Debian (I maintain those Debian packages).
Ubuntu might have some weirdness around the way their sessions are currently launched via Upstart - you might need to wait for a later Ubuntu release for this to work properly. I know there's work currently being done, for Ubuntu 16.10 or later, to enable dbus-user-session
by default and migrate from Upstart to systemd to launch graphical sessions.
I'm trying to set up a
systemd
user service to work withgnome-shell-extensions-mediaplayer
.I can get
mpDris2
to run throughsystemd
, but the extension doesn't pick anything up. It does work when I just runmpDris2
from the command line.Looking at the service status, the only difference I can see from just running the command is the following extra log:
When I try to monitor the bus:
Instead of working with the running
systemd
mpDris2
, it starts a new one (which works with the extension). Not sure what this means.