[systemd-devel] Systemd --session instance?

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Apr 24 01:12:08 UTC 2017


On Sun, Apr 23, 2017 at 06:19:16PM +0000, Benno Fünfstück wrote:
> >
> > On Sat, Apr 22, 2017 at 02:07:49PM +0000, Benno Fünfstück wrote:
> > > Hello list,
> > >
> > > currenty, systemd runs a system instance and a per-user one. However,
> > > sometimes it would be nice to have a per-session instance, for example
> > for
> > > users of lightweight desktop environments that don't have their own
> > service
> > > manager. Then you could use systemd to spawn things like panels or
> > desktop
> > > notification daemons etc. Would it be possible to add such a thing, even
> > if
> > > it may require some work? Or are there any fundamental problems with it?
> >
> > It would require a fundamental amount of work. We (people developing
> > systemd, large graphical environments, dbus, ...) to move towards
> > user-sessions,
> > and limit support to one graphical session per user. The thinking is that
> > one graphical session is enough for one user.
> >
> > In principle you could still have a single systemd --user instance,
> > and e.g. start various services multiple times using templating
> > (terminal-daemon at .service, file-manager at .service, etc). This isn't too
> > hard to get working in a limited scope, but making it work in general
> > is hard, and would require a lot of support from various
> > programs. Your use case would be neat, but also a bit fringe, and it's
> > complicated enough to get graphical envs working with one session per
> > user.
> >
> > Zbyszek
> >
> 
> Thanks for the answer! Can you go into some more detail about what
> particular challenges there are with making such a thing possible? (Just
> some, because currently I feel like it would be easy and I would like to
> get a feeling for the kind of problems this would cause / would have to be
> dealt with)

It's not my idea of expertise. Basically you have to ensure that every
program and every service you start is aware of multiple sessions. There
is no privilege separation like with different users, and there is no
issue until you actually start multiple sessions, so it's very easy
to get this wrong. Somebody else might speak up, but I think you'll need
to do your own search of the archives.

Zbyszek


More information about the systemd-devel mailing list