Subject: Re: switching consoles and x-displays
To: Hanspeter Roth <>
From: Richard Rauch <>
List: netbsd-users
Date: 05/29/2003 13:06:52

To switch between X11 displays and/or consoles, just switch to the
appropriate virtual console.   (Assuming that you are using wscons.
This is the default for port-i386, but I don't know which other ports
have wscons.)

The only surprise is that on a default configuration, the first X
server you run opens up on the 5th virtual console, and all subsequent
X servers open up on the *same* console from which you issue the
"startx" command.  This in turn effectively means that you cannot
(I think) start an X server from an xterm---unless you manually
tell startx which virtual console to use.  (I don't know how to
override the console selection offhand, though I gather that it is

That answers the *SUBJECT* line of your message.

The *CONTENT* of your message is at least partly about *STARTING*
a second X server.  I partially answer that above by remarking that
starting X from an xterm may not work so well.

However, I have (routinely in the past; rarely these days) done
something like this:

  login on the first virtual console.

  startx (``startx -- -depth 16''); this puts X on the console
  accessed (on port-i386) by <Ctrl>-<Alt>-<F5>.

  Login on the second (<Ctrl>-<Alt>-<F2>; login normally), as a
  different user, with an account dedicated to experimentation.

  Start a new X server from that login (``startx -- :1 -depth 16'').

The FIRST X server was on the F5 console.  The SECOND X server would
fall onto the F2 console where the second login occurred.  The FIRST
login was on the F1 console (and some messages will still appear

I stopped doing this for a couple of reasons:

 * The XV (X Video) extension to XFree86 causes some problems
   with my card/display.  I'm not sure of their exact nature, but
   whenever I switch the resolution of my X server, or switch to
   the X server from another virtual console (even another X server
   at the same resolution/mode), the display tends to suffer from
   some artifacts (a limited kind of "ghosting" of data,
   at a horizontal distance).  This is irritating, and the only
   cures I know of are to either turn off XV (which seems to hurt
   performance) or to flip consoles repeatedly until flipping to the
   X server doesn't reveal the "ghosting" effect.  This is very
   annoying and sometimes takes a large number of flips out/in with
   the X server to get a "clean" display.

   Because the X server is *sometimes* able to work with the card,
   I assume that this is a bug in the XFree86 "XV" implementation.
   However, not knowing the details of the server or the card, I
   don't know how fixable this is, much less how to fix it, other
   than by the workaround of turning off XV or repeatedly flipping
   dispaly modes or virtual consoles.  (In some resolutions, the
   X server always gets it right.  Some modes it always has problems
   with.  Some modes it may or may not work correctly, depending
   on its mood.)

 * Of late, I've had some troubles with having 2 X servers running
   at once, where the second seems to kill the first in some subtle
   way.  (I haven't tested this much, and it may be due to KDE3.
   KDE and GNOME are the primary reasons that I bother to run the
   secondary user account on a seperate X server.  For
   *applications*, I just ssh @localhost to get the sandbox account.)

   I haven't played with this enough to nail down exactly what is
   happening, nor recently enough to remember the symptoms that I
   observed.  But I've tended to stop doing multiple X servers
   for now.

   Since I just use the second X server as a "sandbox" and can
   almost as easily logout my primary account before playing with
   KDE/etc., this isn't a huge matter, and I haven't tried to
   investigate it.

One or both of these problems may not be an issue for you.

  "I probably don't know what I'm talking about."