Using systemd-logind Session.TakeControl() from Xorg, input needed

Hans de Goede hdegoede at redhat.com
Thu Dec 5 07:51:08 PST 2013


Hi,

On 12/05/2013 04:05 PM, Ray Strode wrote:
> Hi,
>
> ----- Original Message -----
>> Ray Strode also said: "You can't shut down an X server unless
>> it's in the foreground.". I can remember having done that
>> without problems just yesterday when working on systemd socket
>> activation for the xserver. I've just tried and I can happily
>> kill (normal kill not -9) Xorg :1 running on vt2 while I'm
>> inside a terminal on Xorg :0 running on vt1:
> I don't think that works in all cases, but I can't be more specific,
> because it's vague in my head so others would have to chime in.

It may be a kms versus non kms driver thing. All I can say is that it works
for me with xserver 1.14.99 and intel kms driver.

> Another issue, is X jumps back to the VT it was started on when it exits

It does not do that for me. I agree that YMMV, but it seems to work
as we want.

> but I think we can work around that behavior by making sure the X server
> acts as if it was started with -novtswitch or so.
>
> I started working on wayland integration a couple of months ago, but put it
> to the side when I got side tracked by other projects. That's here:
>
> https://git.gnome.org/browse/gdm/log/?h=wip/wayland
>
> On that branch (which isn't ready for prime time yet) you can put:
>
> X-GDM-NeedsVT=true
>
> in the xsession file for the session then gdm will allocate
> a VT and jump to that VT before running the session.  If the X server is
> activated implicitly by the session trying to connect to the socket in XDG_RUNTIME_DIR,
> then things should "just work" without GDM managing the display at all.  GDM won't try
> to reuse the greeter's X server or start a new X server explicitly if X-GDM-NeedsVT=true.
>
> The branch is still in progress and I don't exactly remember what state it's in/what bugs
> it has, but I'm planning on picking it back up next week. after I finish up this
> RHEL work, I'll play with the idea then and report back (unless you get to it first).

Cool, I'll focus on the xserver side of things now (*). I've the feeling adding support
for this to gdm will be much easier for you then for me :)

Regards,

Hans

*) Assuming I can get the xserver to run under an existing session using startx from
a text console login or some such


More information about the xorg-devel mailing list