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

Cameron Norman camerontnorman at gmail.com
Thu Jan 8 18:24:56 PST 2015


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).

Cheers,
--
Cameron Norman


More information about the systemd-devel mailing list