TODO says: > - logind: spawn user@..service on login I'm currently trying to implement this.
Created attachment 75335 [details] [review] logind: start a systemd for each logged-in user --- This is not very useful until/unless we can copy around $DISPLAY, as discussed in the thread starting at <http://lists.freedesktop.org/archives/systemd-devel/2013-February/009119.html>.
Created attachment 75336 [details] [review] sd_uid_get_display: add This can be used to get a best-effort X11 display, suitable for passing to user-bus-activated services.
Created attachment 75337 [details] [review] core: if running as user, pick up the X11 display from logind Otherwise, user-bus-activated services that are GUIs, like gnome-terminal, will not be able to access the appropriate display.
Created attachment 75338 [details] [review] temporary: add loginctl direct-sd-uid-get-display --- I doubt you'll want to merge this, but it's what I used to test sd_uid_get_display.
With a couple of changes to the transition between gdm and gnome-session, and an adjustment to dbus, I've been able to get this working fairly well: <https://bugzilla.gnome.org/show_bug.cgi?id=694472> is a gnome-session patch to make it try XDG_RUNTIME_DIR/dbus/user_bus_socket before running dbus-launch. The patch "Don't wrap dbus-launch around gnome-session, only around gdm-simple-chooser" on <https://bugzilla.gnome.org/show_bug.cgi?id=693668> stops gdm from interfering. The patches on this bug get the 'systemd --user' started. The patches on <https://bugs.freedesktop.org/show_bug.cgi?id=61301> let dbus-daemon use sd_uid_get_display(), so D-Bus services that are not also systemd user services can have a (more or less arbitrary) $DISPLAY.
I'm no longer actively working on this.
Simon.. I signed up just to say, I really appreicate to see the work you put in on this and being so helpful and prompt. I wish to create a custom session in or around gnome but I just do not like unity/gnome 3 but I used gnome since 99/00 so. Anyway, this seems to be very useful to tinker with. I use arch linux so obviously we move forward fast (so gnome 3.8 it is) but also systemd. Now, to figure out these patches.. I found a link with patches 2-5/5 but no #1 :p Also not sure which and how they all fit together (if some are redundant/duplicates). Either way, a big thank you for your input too. It showed a side of the dev around gnome sessions which is more aligned with how gnome used? to be.
(In reply to comment #7) > Now, to figure out these patches.. I found a link with patches 2-5/5 but no > #1 :p It might have been a bugfix that was already committed for a different bug. > Also not sure which and how they all fit together (if some are > redundant/duplicates). This is the sort of system-integration work that shouldn't be applied by distributions until there is consensus on how everything is meant to work. I suggest either waiting, or trying to restart discussion on the mailing list.
http://cgit.freedesktop.org/systemd/systemd/commit/?id=fb6becb makes user@$UID.service be started at first login (in principle, I think it doesn't actually work all that well.)
http://cgit.freedesktop.org/systemd/systemd/commit/?id=5c390a4 adds another piece of the puzzle.
OK, user session mostly work nowadays. Various things still require work, but it'll probably be better to open new discrete bugs for that.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.