Subject: Re: console or ttyE0
To: None <>
From: Greg A. Woods <>
List: netbsd-users
Date: 09/27/2003 13:51:34
[ On Saturday, September 27, 2003 at 07:26:00 (-0700), wrote: ]
> Subject: Re: console or ttyE0
> On Sat, Sep 27, 2003 at 08:39:36AM -0500, Andrew L. Gould wrote:
> > Are there reasons a user would prefer console over ttyE0 (or ttyE0 over 
> > console) in /etc/ttys?  Are there functional differences?
> I have noticed in the past xdm grabbing console to use for xconsole, and at
> that point not being able to log in on the first virtual console.

not to put too fine a point on it, but it's xconsole that opens
/dev/console, not xdm, at least in the default configuration.

Xdm just starts an Xserver and then runs a script to start other X
clients using that Xserver as their display (Xsetup_0).  It does run
another script at startup time which chowns /dev/console (GiveConsole),
and yet another at reset time which chowns it back (TakeConsole).

The Xserver does use a virtual console, thus apparently allocating a tty
from wscons.....  With Xfree86-4 the virtual screen it opens is specified
on the command-line of the Xserver which is started, i.e. in the ":0"
line in /usr/X11R6/lib/X11/xdm/Xservers, though I'm not sure why it uses
the naming convention it does -- perhaps that's an Xfree86 thing, ah,
yes, there it is in the XFree86(1) manual page:

       vtXX    XX  specifies  the  Virtual Terminal device number
               which XFree86  will  use.   Without  this  option,
               XFree86 will pick the first available Virtual Ter-
               minal that it can  locate.   This  option  applies
               only  to  platforms  such  as Linux, BSD, SVR3 and
               SVR4, that have virtual terminal support.

> I think syslog sends some messages to console that it doesn't necessarily
> send to ttyE0.

Syslog normally only writes to /dev/console (and in the default
configuration that's certainly what it does, though it may also
sometiems open and write to any tty any user is logged in on as well as
to any tty "root" might be logged in on).

In any case the wscons driver should be in control of where that output
from /dev/console goes (i.e. to which virtual console), and IIUC it
always uses the same virtual screen that /dev/ttyE0 uses.

						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <>
Planix, Inc. <>          Secrets of the Weird <>