Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Mar 1996 00:29:53 +1100 (EST)
From:      David Dawes <dawes@rf900.physics.usyd.edu.au>
To:        kaleb@x.org (Kaleb S. KEITHLEY)
Cc:        jmb@freefall.freebsd.org, hackers@freefall.freebsd.org
Subject:   Re: xdm running two sessions HOW?
Message-ID:  <199602291329.AAA29395@rf900.physics.usyd.edu.au>
In-Reply-To: <199602291122.LAA17610@exalt.x.org> from "Kaleb S. KEITHLEY" at Feb 29, 96 06:22:13 am

next in thread | previous in thread | raw e-mail | index | archive | help
>> i have removed the getty from two consoles.
>> 
>> how can i get xdm to start two sessions?
>> 
>> /etc/ttys:
>> ttyv2   "/usr/libexec/getty Pc"         cons25  off insecure
>> ttyv3   "/usr/libexec/getty Pc"         cons25  off insecure
>> 
>> Xservers:
>> :0 local /usr/X11R6/bin/X :0
>> :1 local /usr/X11R6/bin/X :1
>> 
>
>I'm pretty sure there's a race condition even though your xdm-error log
>shows that two servers did use two different VTs. You probably want to 
>use the -vt option to force a particular server onto an explicit VT, e.g.:
>
>:0 local /usr/X11R6/bin/X :0 -vt 3
>:1 local /usr/X11R6/bin/X :1 -vt 4

Yes, there is a race there.  There could be a little more to it as well.
When I experimented with this a while ago, I found that I needed to run
the servers via a script which first switched to a text VT, waited for
a few seconds, then started the server.  I haven't tried this recently,
but just doing the sleep wasn't sufficient.

The script I had used the old syscons utility from FreeBSD 1.x (now
replaced by kbdcontrol and vidcontrol, neither of which allow you to
switch VTs from the command line):

#!/bin/sh
/usr/local/bin/syscons -t 1 </dev/ttyv0
sleep 3
exec X "$@"

I'm not sure exactly why this is necessary.  It may be possible to modify
the servers so as to avoid the need for this VT switch.  If anyone has
any ideas/suggestions about this, let me know.

David



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602291329.AAA29395>