[systemd-devel] RFC: user session lifetimes vs. $DISPLAY

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Feb 22 11:19:32 PST 2013


On 19/02/13 16:06, Simon McVittie wrote:
> On 18/02/13 20:13, Simon McVittie wrote:
>>>> Is there any plan for how GUI processes started via session D-Bus
>>>> activation should pick up the right value for $DISPLAY?
>>
>> I've started prototyping what would be needed for `systemd --user` to
>> track logind sessions, pick up the new $DISPLAY every time the user's
>> set of sessions changes, and use that for all new activations.

Here is a proof-of-concept implementation involving patches to systemd,
and reasonably minor additional patches to gnome-session, gdm and dbus:

https://bugs.freedesktop.org/show_bug.cgi?id=61129#c5

> It turns out that this shouldn't be needed, because modern versionx of
> Xorg support something like "DISPLAY=unix:/run/user/1000/X11-display"

Unfortunately, it turns out I was misinformed about this: the syntax is
unix:0 and still only has a display number. So, I did need to use logind
session tracking to pick up the right value for DISPLAY.

> That isn't going to be particularly graceful if a login1.User has more
> than one X11 display. GUI applications that are D-Bus/systemd-activated
> *and* want to cope gracefully with this situation will have to do it
> themselves

This still stands.

Regards,
    S


More information about the systemd-devel mailing list