[systemd-devel] Has anyone written equiv of ck-xinit-session for logind?

Colin Guthrie gmane at colin.guthr.ie
Tue Feb 28 01:58:23 PST 2012


'Twas brillig, and Léo Gillot-Lamure at 28/02/12 02:38 did gyre and gimble:
> Hi.
> 
> I investigated a bit about creating an equivalent of ck-launch-session
> (i'm interested about this because it would be possible for tmux to
> create a logind session for each tmux session), and it appears
> impossible.
> 
> The only way to create a session seems to be the
> org.freedesktop.login1.Manager.CreateSession() dbus call (the PAM
> connector uses it) and you need to be root to use it.
> 
> In addition, even if you manage to workaround this limitation, if you
> try to create a session from an existing one, the call will return the
> id of the existing session and won't create anything.

At some point, I think the tty will be changed to launch and Xserver. I
would have thought that at this point, the existing session is perhaps
lost in some capacity and a new one can be created. I'm not sure about
the root user only limitation tho' and how that would work. Any launch
wrapper might have to be setuid or similar and drop register the session
and then drop privs or something... I don't really know what magic might
be needed there... Hopefully Lennart or Kay can shed some light on
whether it's technically possible.

> I'd be happy, though, if the systemd devs prove me wrong.

Me too!

Cheers

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/



More information about the systemd-devel mailing list