.\" -*- coding: UTF-8 -*- .\" Copyright (c) 1995 James R. Van Zandt .\" Sat Feb 18 09:11:07 EST 1995 .\" .\" %%%LICENSE_START(GPLv2+_DOC_FULL) .\" 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, see .\" . .\" %%%LICENSE_END .\" .\" Modified, Sun Feb 26 15:08:05 1995, faith@cs.unc.edu .\" 2007-12-17, Samuel Thibault : .\" document the VT_GETHIFONTMASK ioctl .\" " .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH VCS 4 "1 Noviembre 2020" Linux "Manual del Programador de Linux" .SH NOMBRE vcs, vcsa \- memoria de la consola virtual .SH DESCRIPCIÓN \fI/dev/vcs0\fP es un dispositivo de carácter con número mayor 7 y número menor 0, creado normalmente con modo 0644 y propietario root:tty. Designa la memoria del terminal de consola virtual visualizado en ese momento. .PP \fB/dev/vcs[1\-63]\fP son los dispositivos de carácter para los terminales de consola virtual. Tienen el número mayor 7 y el número menor de 1 a 63, y se crean normalmente con el modo 0644 y propietario root:tty. \fB/dev/vcsa[0\-63]\fP son idénticos salvo por el empleo de pequeñas cifras ordenadas según el equipo que incluyen atributos. Están prefijadas con cuatro bytes que indican las dimensiones de la pantalla y la posición del cursor: \fIlíneas\fP, \fIcolumnas\fP, \fIx\fP, \fIy\fP (\fIx\fP = \fIy\fP = 0 en la esquina superior izquierda de la pantalla). .PP Cuando se carga un fuente de 512, es posible tomar el bit en la 9ª posiciónmediante la operación \fBVT_GETHIFONTMASK\fP de \fBioctl\fP(2) (disponible desde la versión 2.6.18 de Linux) en \fI/dev/tty[1\-63]\fP. El valor obtenido en el \fIentero sin signo\fP al que apunta el tercer argumento de \fBioctl\fP(2). .PP Estos dispositivos reemplazan las \fBioctl\fP(2) de volcado de pantalla de \fBioctl_console\fP(2), de forma que el administrador del sistema pueda controlar el acceso a través de los permisos del sistema de archivos. .PP Los dispositivos de las ocho primeras consolas virtuales se pueden crear con: .PP .in +4n .EX 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* .EE .in .PP No se aceptan peticiones de \fBioctl\fP(2). .SH ARCHIVOS \fI/dev/vcs[0\-63]\fP .br .\" .SH AUTHOR .\" Andries Brouwer \fI/dev/vcsa[0\-63]\fP .SH VERSIONES Disponible a partir de la versión 1.1.92 del núcleo de Linux. .SH EJEMPLOS Se puede hacer un volcado de pantalla de vt3 conmutando a vt1 y tecleando .PP .in +4n .EX cat /dev/vcs3 >foo .EE .in .PP Observe que la salida no contiene caracteres de nueva línea, por lo que puede ser necesario algún procesamiento adicional, por ejemplo: .PP .in +4n .EX fold \-w 81 /dev/vcs3 | lpr .EE .in .PP o en (horror) .PP .in +4n .EX setterm \-dump 3 \-file /proc/self/fd/1 .EE .in .PP El dispositivo \fI/dev/vcsa0\fP se utiliza para el soporte Braille. .PP El siguiente programa visualiza los atributos de carácter y pantalla que se encuentran en la posición del cursor de la segunda consola virtual, y después cambia su color de fondo allí: .PP .EX #include #include #include #include #include #include int main(void) { int fd; char *device = "/dev/vcsa2"; char *console = "/dev/tty2"; struct {unsigned char lines, cols, x, y;} scrn; unsigned short s; unsigned short mask; unsigned char attrib; int ch; fd = open(console, O_RDWR); if (fd < 0) { perror(console); exit(EXIT_FAILURE); } if (ioctl(fd, VT_GETHIFONTMASK, &mask) < 0) { perror("VT_GETHIFONTMASK"); exit(EXIT_FAILURE); } (void) close(fd); fd = open(device, O_RDWR); if (fd < 0) { perror(device); exit(EXIT_FAILURE); } (void) read(fd, &scrn, 4); (void) lseek(fd, 4 + 2*(scrn.y*scrn.cols + scrn.x), SEEK_SET); (void) read(fd, &s, 2); ch = s & 0xff; if (s & mask) ch |= 0x100; attrib = ((s & \(timask) >> 8); printf("ch=%#03x attrib=%#02x\en", ch, attrib); s \(ha= 0x1000; (void) lseek(fd, \-2, SEEK_CUR); (void) write(fd, &s, 2); exit(EXIT_SUCCESS); } .EE .SH "VÉASE TAMBIÉN" \fBioctl_console\fP(2), \fBtty\fP(4), \fBttyS\fP(4), \fBgpm\fP(8) .SH COLOFÓN Esta página es parte de la versión 5.10 del proyecto Linux \fIman\-pages\fP. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Ignacio Arenaza , Gerardo Aburruzaga García , Juan Piernas y Marcos Fouces . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .