Re: Terminal Emulation program for Linux

Tony Nugent (tonyn@sctnugen.ppp.gu.edu.au)
Fri, 16 Feb 1996 23:42:56 +1000


Fri, 16 Feb 1996, Herbert Rosmanith <herp@wildsau.idv.uni-linz.ac.at>:

> > Don't bother. Access /dev/vcsa which is the current virtual console.
> >
> hm, I havent got that device. can you please tell me major/minor ?

The man page for vcs clearly tells you...

/dev/vcs[1-63] are character devices for virtual console terminals,
they have major number 7 and minor number 1 to 63, usually mode 0644
and owner root.tty. /dev/vcsa[0-63] are the same, but including
attributes, and prefixed with four bytes giving the screen
dimensions and cursor position: lines, columns, x, y. (x = y = 0 at
the top left corner of the screen.)

These replace the screendump ioctls of console(4), so the system
administrator can control access using file system permissions.

The devices for the first eight virtual consoles may be created by:

for x in 0 1 2 3 4 5 6 7 8; do
mknod -m 644 /dev/vcs$x c 7 $x;
mknod -m 644 /dev/vcsa$x c 7 $[$x+128];
done
chown root.tty /dev/vcs*

Cheers
Tony
-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
T.Nugent@sct.gu.edu.au tonyn@sctnugen.ppp.gu.edu.au
Brisbane Queensland Australia
-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
The more corrupt a society, the more numerous its laws.
-- Edward Abbey