[systemd-devel] Questions regarding dbus started via systemd --user

Lennart Poettering mzqohf at 0pointer.de
Mon Feb 2 15:13:17 PST 2015


On Thu, 08.01.15 18:24, Cameron Norman (camerontnorman at gmail.com) wrote:

> On Thu, Jan 8, 2015 at 9:42 AM, Dimitri John Ledkov
> <dimitri.j.ledkov at intel.com> wrote:
> > On 8 January 2015 at 17:24, Simon McVittie
> > <simon.mcvittie at collabora.co.uk> wrote:
> >> On 08/01/15 16:03, Dimitri John Ledkov wrote:
> >> * I'm in an X11 session and my GUI locks up. I use Ctrl+Alt+F1
> >>   and log in at the getty. How do I communicate with X11 session things
> >>   over D-Bus, perhaps to disconnect from Telepathy without losing
> >>   messages?
> >> * The same, but I ssh in from another machine instead. Same question?
> >
> > On Ubuntu at the moment this looks in practice something like this:
> > find UPSTART_SESSION_ID of your tty7 session, export that variable in
> > your getty shell, then use initctl list-env ("systemctl") to list
> > environment variables, one of them is DBUS_SESSION_BUS_ADDRESS use
> > that to communicate with dbus.
> 
> It would be easer if there was a variable like
> `$XDG_RUNTIME_SESSION_DIR`, which would point to
> `$XDG_RUNTIME_DIR/sessions/$sid`. Then you could just change that to
> attach to a currently running session, and you could easily visualize
> which sessions are running. It would also be nice because services
> that do not conflict with themselves when running a second instance
> with the same uid (not dconf, but something along the lines of a GUI
> shell or gnome-session/upstart) could use it instead of doing their
> own session instancing (like upstart does).

I am not convinced that we need special support for this really. I
fail to see the usecase. I mean, it's usually the background stuff
that listens on sockets, and all that background stuff tends to be
more per-user than per-session. I fail to see which service would
really need a per-session listening socket... And if there is one,
then using $XDG_RUNTIME_DIR/foobar.$XDG_SESSION_ID should be good
enough...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the dbus mailing list