Re: Questions regarding dbus started via systemd --user

Lennart Poettering <[email protected]>
Newsgroups gmane.comp.sysutils.systemd.devel,gmane.comp.freedesktop.dbus
Message-ID <20150202231317.GA13561@gardel-login>
On Thu, 08.01.15 18:24, Cameron Norman ([email protected]) wrote:

> On Thu, Jan 8, 2015 at 9:42 AM, Dimitri John Ledkov
> <[email protected]> wrote:
> > On 8 January 2015 at 17:24, Simon McVittie
> > <[email protected]> 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
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.