File: vcs.4

package info (click to toggle)
manpages-pt 20040726-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,988 kB
  • sloc: sh: 45; makefile: 16
file content (102 lines) | stat: -rw-r--r-- 3,751 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
.\" -*- nroff -*-
.\" Copyright (c) 1995 James R. Van Zandt <jrv@vanzandt.mv.com>
.\" 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 \- mermria do console virtual
.SH DESCRIO
\fB/dev/vcs0\fP  um dispositivo de caractere com maior nmero de dispositivo 7 e menor nmero de dispositivo
0, usualmente no modo 0644 e proprietrio root.tty. Ele refere-se a memria
do terminal de console
virual atualmente exibida.
.LP
\fB/dev/vcs[1-63]\fP so dispositivos de caracteres para terminais de console
virtuais, eles tem o maior nmero de dispositivo 7 e o menor nmero de dispositivo entre 1 e 63, usualmente
modo 0644 e proprietrio root.tty. \fB/dev/vcsa[0-63]\fP so a mesma coisa,
mas incluindo atributos, e prefixado com quatri byte fornecendo as
dimenses e posio 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 permisses 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

Requisies \fBioctl()\fP no so 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 sada no contm
caracteres de incio 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, ento alteraes na cor do fundo da tela
no fazem mal:

.nf
	#include <unistd.h>
	#include <stdio.h>
	#include <fcntl.h>
	
	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 <aeb@cwi.nl>
.SH HISTRIA
Introduzido com a verso 1.1.92 do kernel do Linux.
.SH "VEJA TAMBM"
.BR console "(4), " tty "(4), " ttys "(4), " selection (1)
.SH TRADUZIDO POR LDP-BR em 21/08/2000.
\&\fR\&\f(CWAndr L. Fassone Canova <lonelywolf@blv.com.br> (traduo)\fR
\&\fR\&\f(CWCarlos Augusto Horylka <horylka@conectiva.com.br> (reviso)\fR