On Fri, May 13, 2011 at 04:57:13PM +0200, Cyril Brulebois wrote:
> VT switching back to the initial VT is possible in the following case:
>   #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
> 
> Make it possible to prevent that from happening if -novtswitch was
> passed, which should make the life of display manager developers easier,
> especially when it comes to handling multiple users.
> 
> X.Org Bug 37174 <http://bugs.freedesktop.org/show_bug.cgi?id=37174>
> 
> Signed-off-by: Cyril Brulebois <k...@debian.org>

PCVT (and wscons in PCVT emulation mode) doesn't support having both a
getty process and the X server attached to the same VT. Running X
-noswitchvt will thus not work. 

At least on Net/OpenBSD, when using a display manager, we always
specify a free VT to use on X's command line,  forcing a VT switch
to avoid this.

I don't know know how syscons (FreeBSD) behaves when 2 processes are
attached to the same VT, and I also don't see what are the extra VT
switches that the PR is referring too. So may be syscons has some
specific behaviour that I'm not aware of ? 


> ---
>  hw/xfree86/os-support/bsd/bsd_init.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> Patch tested on a GNU/kFreeBSD VM, on top of 1.10.2rc1. Applies on top
> of master too, but not tested against it.
> 
> diff --git a/hw/xfree86/os-support/bsd/bsd_init.c 
> b/hw/xfree86/os-support/bsd/bsd_init.c
> index 123eb17..77667bb 100644
> --- a/hw/xfree86/os-support/bsd/bsd_init.c
> +++ b/hw/xfree86/os-support/bsd/bsd_init.c
> @@ -41,6 +41,7 @@
>  #include <errno.h>
>  
>  static Bool KeepTty = FALSE;
> +static Bool VTSwitch = TRUE;
>  static int devConsoleFd = -1;
>  #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
>  static int VTnum = -1;
> @@ -680,7 +681,7 @@ xf86CloseConsole()
>                          strerror(errno));
>          }
>  #endif
> -     if (initialVT != -1)
> +     if ((initialVT != -1) && VTSwitch)
>               ioctl(xf86Info.consoleFd, VT_ACTIVATE, initialVT);
>          break;
>  #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
> @@ -723,6 +724,11 @@ xf86ProcessArgument(int argc, char *argv[], int i)
>               return 1;
>       }
>  #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
> +     if (!strcmp(argv[i], "-novtswitch"))
> +     {
> +             VTSwitch = FALSE;
> +             return 1;
> +     }
>       if (!strcmp(argv[i], "-sharevts"))
>       {       
>               ShareVTs = TRUE;
> -- 
> 1.7.5.1
> 
> _______________________________________________
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

-- 
Matthieu Herrb
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to