Information for Solaris : The VT-switching sub-system in Solaris x86
Previous: What is XFree86
Next: Notes for building XFree86 on Solaris

## 2. The VT-switching sub-system in Solaris x86

The virtual terminal sub-system is a undocumented, and unsupported feature of Solaris x86. Therefore if you use virtual terminals, you do so at YOUR OWN RISK.

Virtual terminals are not available in Solaris SPARC, and their availability has been removed in Solaris8 x86.

When available, the virtual terminals of Solaris work basically the same way as most other SVR4 VT sub-systems. However, there are a number of limitations documented below.

First, if you are running a Solaris 2.4 x86 system, and you want VT's, you will have to create the necessary devices first, so become root.

Verify the chanmux device driver's major number is 100:

> `

>     	# grep -i chanmux /etc/name_to_major
>     	chanmux 100
>     	#

> `

If the number after 'chanmux' is anything but 100, I would suggest you immediately abort your attempt to create virtual terminals, and learn to live without them.

However, if it is 100, then as root type the following commands to create the maximum allowable number of virtual terminals.

> `

>     	# cd /dev
>     	# mknod vt01 c 100 1
>     	# mknod vt02 c 100 2
>     	# mknod vt03 c 100 3
>     	# mknod vt04 c 100 4
>     	# mknod vt05 c 100 5
>     	# mknod vt06 c 100 6
>     	# mknod vt07 c 100 7

> `

There is no need for a reconfiguration boot.

Secondly, for both 2.1, and 2.4 x86 systems, add a few lines to the `inittab` to enable logins on them.

(Note, do NOT make a mistake here, you could lock yourself out of the system)

    --------------------->Snip Snip<-----------------------------------------------
    v1:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` VT01 login: " -T AT386 -d /dev/vt01 -l console
    v2:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` VT02 login: " -T AT386 -d /dev/vt02 -l console
    v3:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` VT03 login: " -T AT386 -d /dev/vt03 -l console
    v4:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` VT04 login: " -T AT386 -d /dev/vt04 -l console
    ---------------------->End Here<-----------------------------------------------

These four lines enable four VT's on Alt-SysReq-F1 through Alt-SysReq-F4.

Then execute the command '`init q`' to immediately enable the virtual terminals.

The keys used for VT switching are as follows:

> `Alt-SysReq-F1` through `Alt-SysReq-F7` enable VT screens 1-7 respectively (if the VT is active).

> `Alt-SysReq-n` enables the next active VT screen.

> `Alt-SysReq-p` enables the previous active VT screen.

> `Alt-SysReq-h` returns to the console.

If you are using virtual terminals, you must leave at least one free for use by the Xserver.

Limitations of the virtual terminal sub-system under Solaris x86:

There are only a total of 8 available VT's (7 normal VT's + 1 console) not the usual 15. If you have all 8 allocated, and you attempt to allocate a additional VT you will panic the system. (This bug is worked around in the Solaris XFree86 Xserver.)

From a programming stand point, they work pretty much as documented in the AT&T Unix System V/386 Release 4 Integrated Software Development Guide, however a number of `ioctl()` calls are broken.

Information for Solaris : The VT-switching sub-system in Solaris x86
Previous: What is XFree86
Next: Notes for building XFree86 on Solaris