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

Hans de Goede hdegoede at redhat.com
Thu Dec 12 06:28:30 PST 2013


Hi,

On 12/12/2013 02:31 PM, Laércio de Sousa wrote:
> Hans,
>
> systemd currently ships a multi-seat-x wrapper (http://cgit.freedesktop.org/systemd/systemd/tree/src/login/multi-seat-x.c) for cases where X.Org doesn't work well with multiseat. In the beginning, it was much bigger, but now, as X.Org evolves, it now only does the following:
>
> * If "-seat" option value is "seat0", just exec real X server, with no additions
> * Otherwise:
>    + Append "-sharevts" to real X server command line [*]
>    + Append "-config" to real X server command line, with the following config file:
>        Section "ServerFlags"
>          Option "AutoAddDevices" "True" # pointless, since it's already true by default
>          Option "AllowEmptyInput" "True" # this option doesn't exist anymore
>          Option "DontVTSwitch" "True" [*]
>        EndSection
>        Section "InputClass"
>          Identifier "Force Input Devices to Seat"
>          Option "GrabDevice" "True" # not needed anymore, since http://cgit.freedesktop.org/xorg/xserver/commit/?id=c73c36b537f996574628e69681833ea37dec2b6e
>        EndSection
>
> The points tagged with [*] above are needed because non-seat0 X servers still try to open VTs, although non-seat0 seats can't handle them. My patch proposed at http://lists.x.org/archives/xorg-devel/2013-December/039353.html makes those points unneeded.

Thanks for the explanation, I've one small nitpick on your patch,
if you can resend it with that fixed I'll add it to what is swiftly growing
into my systemd integration tree :)

--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -545,7 +545,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
                  want_hw_access = TRUE;

              if (!(flags & HW_SKIP_CONSOLE))
-                xorgHWOpenConsole = TRUE;
+                /* Non-seat0 X servers should not open console */
+                xorgHWOpenConsole = !ServerIsNotSeat0();
          }

          if (xorgHWOpenConsole)

Can you please make the !ServerIsNotSeat0() part of the if condition,
rather then using it as the value to store ?   Since this is just
another way of expressing SKIP_CONSOLE it seems more sensible to me
that way.

Thanks & Regards,

Hans


More information about the xorg-devel mailing list