.\" -*- nroff -*- .\" Copyright (c) 1995 James R. Van Zandt .\" Sat Feb 18 09:11:07 EST 1995 .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" .\" Modified, Sun Feb 26 15:08:05 1995, faith@cs.unc.edu .\" " .TH VCS 4 "19/02/1995" "Linux" "Manual do Programador Linux" .SH NOME vcs, vcsa \- mermória do console virtual .SH DESCRIÇÃO \fB/dev/vcs0\fP é um dispositivo de caractere com maior número de dispositivo 7 e menor número de dispositivo 0, usualmente no modo 0644 e proprietário root.tty. Ele refere-se a memória do terminal de console virual atualmente exibida. .LP \fB/dev/vcs[1-63]\fP são dispositivos de caracteres para terminais de console virtuais, eles tem o maior número de dispositivo 7 e o menor número de dispositivo entre 1 e 63, usualmente modo 0644 e proprietário root.tty. \fB/dev/vcsa[0-63]\fP são a mesma coisa, mas incluindo atributos, e prefixado com quatri byte fornecendo as dimensões e posição do cursor: \fIlines\fP, \fIcolumns\fP, \fIx\fP, \fIy\fP. (\fIx\fP = \fIy\fP = 0 no topo esquerdo do canto da tela.) .PP Estas trocam a tela dump ioctls de \fBconsole\fP(4), assim o administrador de sistema pode controlar acesso usando permissões para o sistema de arquivos. .PP Os dispositivos para os primerios oito terminais vituais podem se criados por: .nf 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* .fi Requisições \fBioctl()\fP não são suportadas. .SH EXEMPLOS Você fazer um dump da tela no vt3 por permuta para vt1 e imprimindo \fIcat /dev/vcs3 >foo\fP. Note que a saída não contém caracteres de início de linha, assim alguns processamentos podem ser requeridos, como em \fIfold -w 81 /dev/vcs3 | lpr\fP ou (horror) \fIsetterm -dump 3 -file /proc/self/fd/1\fP. Este programa exibe o caracter e atributos da tela abaixo do cursor do segundo console virtual, então alterações na cor do fundo da tela não fazem mal: .nf #include #include #include void main() { int fd; struct {char lines, cols, x, y;} scrn; char ch, attrib; fd = open("/dev/vcsa2", O_RDWR); (void)read(fd, &scrn, 4); (void)lseek(fd, 4 + 2*(scrn.y*scrn.cols + scrn.x), 0); (void)read(fd, &ch, 1); (void)read(fd, &attrib, 1); printf("ch='%c' attrib=0x%02x\\n", ch, attrib); attrib ^= 0x10; (void)lseek(fd, -1, 1); (void)write(fd, &attrib, 1); } .fi .SH ARQUIVOS /dev/vcs[0-63] .br /dev/vcsa[0-63] .SH AUTOR Andries Brouwer .SH HISTÓRIA Introduzido com a versão 1.1.92 do kernel do Linux. .SH "VEJA TAMBÉM" .BR console "(4), " tty "(4), " ttys "(4), " selection (1) .SH TRADUZIDO POR LDP-BR em 21/08/2000. \&\fR\&\f(CWAndré L. Fassone Canova (tradução)\fR \&\fR\&\f(CWCarlos Augusto Horylka (revisão)\fR