Re: [systemd-devel] Systemd --session instance?

2017-04-23 Thread Zbigniew Jędrzejewski-Szmek
On Sun, Apr 23, 2017 at 06:19:16PM +, Benno Fünfstück wrote:
> >
> > On Sat, Apr 22, 2017 at 02:07:49PM +, 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@.service, file-manager@.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
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd --session instance?

2017-04-23 Thread Benno Fünfstück
>
> On Sat, Apr 22, 2017 at 02:07:49PM +, 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@.service, file-manager@.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)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd --session instance?

2017-04-23 Thread Zbigniew Jędrzejewski-Szmek
On Sat, Apr 22, 2017 at 02:07:49PM +, 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@.service, file-manager@.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
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel