[systemd-devel] Question about the cross session dependence

Lennart Poettering lennart at poettering.net
Mon Apr 22 08:43:51 PDT 2013


On Mon, 22.04.13 00:58, Kok, Auke-jan H (auke-jan.h.kok at intel.com) wrote:

> 
> On Sun, Apr 21, 2013 at 6:49 PM, Li, Min A <min.a.li at intel.com> wrote:
> > Hi systemd experts,
> >
> >
> >
> > I have a question about the dependence of user and system session. At system
> > session, there is a service which need to be started after X(user session).
> >
> > At first I added “After=xorg.target” at this service, but It is said that
> > the dependence of cross session is not work. Is that true?
> 
> The user session instance does not know anything about the state of
> system services. So yes.
> 
> > If Yes, what’s the solution for this kind of issue?
> 
> If you start your xorg through systemd --system, you will have to find
> an alternative way to tell the systemd --user how to determine that
> the service is ready. You can make a hack with a path unit, or write a
> user session service that uses IPC to communicate with the system
> session in some way. Nobody has looked at that, afaik.
> 
> This is why user-session-units starts the X server from within the
> systemd --user environment - it removes that problem entirely.

The much nicer way it to simply teach X11 socket activation. Then you
can run it either from the system instance of systemd, or the user
instance, and things would just work...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list