Re: [PATCH] bsd: Add support for -novtswitch.
Hi, Alan Coopersmith alan.coopersm...@oracle.com (13/05/2011): Our gdm maintainer has been poking me about -novtswitch as well, so maybe we should consider moving it up to the xfree86 ddx common layer, instead of replicating for each OS. are there any prospective patches in that direction? Or should I address the points Julien raised to get it merged for FreeBSD before it moves to the ddx common layer? Mraw, KiBi. signature.asc Description: Digital signature ___ 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
Re: [PATCH] bsd: Add support for -novtswitch.
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
Re: [PATCH] bsd: Add support for -novtswitch.
On Sat, May 14, 2011 at 12:53:48 +0200, Matthieu Herrb wrote: 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 ? This is not about running two processes on the same VT. It's about allowing gdm to control when VT switches happen, by not switching back to whatever VT we started from on regen and exit. Cheers, Julien ___ 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
Re: [PATCH] bsd: Add support for -novtswitch.
On Fri, May 13, 2011 at 16:57:13 +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 --- 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. Compared to the Linux path, this is missing the regen case (serverGeneration 1 in OpenConsole()), and the Xorg -help text in xf86UseMsg(). Cheers, Julien ___ 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
[PATCH] bsd: Add support for -novtswitch.
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 --- 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
Re: [PATCH] bsd: Add support for -novtswitch.
On 05/13/11 07:57 AM, 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. Our gdm maintainer has been poking me about -novtswitch as well, so maybe we should consider moving it up to the xfree86 ddx common layer, instead of replicating for each OS. -- -Alan Coopersmith-alan.coopersm...@oracle.com Oracle Solaris Platform Engineering: X Window System ___ 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