What is a virtual console and how do I make more?
Virtual consoles, put simply, enable you to have several
simultaneous sessions on the same machine without doing anything
complicated like setting up a network or running X.
When the system starts, it will display a login prompt on
the monitor after displaying all the boot messages. You can
then type in your login name and password and start working (or
playing!) on the first virtual console.
At some point, you will probably wish to start another
session, perhaps to look at documentation for a program
you are running or to read your mail while waiting for an
FTP transfer to finish. Just do Alt-F2 (hold down the Alt
key and press the F2 key), and you will find a login prompt
waiting for you on the second ``virtual console''! When you
want to go back to the original session, do Alt-F1.
The default FreeBSD installation has three virtual consoles
enabled, and Alt-F1, Alt-F2, and Alt-F3 will switch between
these virtual consoles.
To enable more of them, edit
and add entries for ``
# Edit the existing entry for ttyv3 in /etc/ttys and change
# "off" to "on".
ttyv3 "/usr/libexec/getty Pc" cons25 on secure
ttyv4 "/usr/libexec/getty Pc" cons25 on secure
ttyv5 "/usr/libexec/getty Pc" cons25 on secure
ttyv6 "/usr/libexec/getty Pc" cons25 on secure
ttyv7 "/usr/libexec/getty Pc" cons25 on secure
ttyv8 "/usr/libexec/getty Pc" cons25 on secure
ttyv9 "/usr/libexec/getty Pc" cons25 on secure
ttyva "/usr/libexec/getty Pc" cons25 on secure
ttyvb "/usr/libexec/getty Pc" cons25 on secure
Use as many or as few as you want. The more virtual terminals
you have, the more resources that are used; this can be important
if you have 8MB RAM or less. You may also want to change the
``The easiest way to disable a console is by turning it off. For
example, if you had the full 12 terminal allocation mentioned
above and you wanted to run X, you would change settings for
virtual terminal 12 from:
ttyvb "/usr/libexec/getty Pc" cons25 on secure
to:
ttyvb "/usr/libexec/getty Pc" cons25 off secure
If your keyboard has only ten function keys, you would end up with:
ttyv9 "/usr/libexec/getty Pc" cons25 off secure
ttyva "/usr/libexec/getty Pc" cons25 off secure
ttyvb "/usr/libexec/getty Pc" cons25 off secure
(You could also just delete these lines.)
Once you have edited ,
the next step is to make sure that you have enough virtual terminal
devices. The easiest way to do this is:
# cd /dev
# ./MAKEDEV vty12 # For 12 devices
Next, the easiest (and cleanest) way to activate the virtual
consoles is to reboot. However, if you really don't want to
reboot, you can just shut down the X Window system and execute (as
kill -HUP 1
It's imperative that you completely shut down X Window if it is
running, before running this command. If you don't, your system
will probably appear to hang/lock up after executing the kill
command.
How do I access the virtual consoles from X?
If the console is currently displaying X Window, you can use
Ctrl-Alt-F1, etc. to switch to a virtual console. Note, however,
that once you've switched away from X Window to a virtual
terminal, you may use only the Alt- function key to switch to another
virtual terminal or back to X Window. You do not need to also press the
Ctrl key. If you use the control key to switch back to X on some
older releases, you can find your text console stuck in ``control-lock''
mode. Tap the control key to wake it up again.
How do I start XDM from the /etc/ttys file ?
Starting via is a Start it from your (or even
from a /usr/local/etc/rc.d), and be
explicit about how it has to start. If this is your last action in
/usr/X11R6/lib/X11/xdm/Xservers file. This is not necessary:
X will use the first free
When I run xconsole, I get ``Couldn't open console''.
If you start with , the permissions on /dev/console will and not working.
This is because of the way console permissions are set by default.
On a multi-user system, one doesn't necessarily want just any user
to be able to write on the system console. For users who are logging
directly onto a machine with a VTY, the
file exists to solve such problems.
In a nutshell, make sure an uncommented line of the form
/dev/ttyv0 0600 /dev/console
is in and it will ensure that whomever logs in on
/dev/ttyv0 will own the console.
My PS/2 mouse doesn't behave properly under X.
Your mouse and the mouse driver have somewhat become out of
synchronization. Switching away from X to a virtual terminal
and getting back to X again may make them re-synchronized.
If the problem occurs often, you may add the following option
in your kernel configuration file and recompile it.
options PSM_CHECKSYNC
See the section on [
if you've no experience with building kernels.
]With this option, there should be less chance of synchronization
problem between the mouse and the driver. If, however, you
still see the problem, click any mouse button while holding
the mouse still to re-synchronize the mouse and the driver.
Note that unfortunately this option may not work with all the
systems and voids the ``tap'' feature of the ALPS GlidePoint
device attached to the PS/2 mouse port.