.\" -*- 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 \fI/dev/vcs[1\-63]\fP are character devices for virtual console terminals, they have major number 7 and minor number 1 to 63, usually mode 0644 and ownership root:tty. \fI/dev/vcsa[0\-63]\fP are the same, but using \fIunsigned short\fPs (in host byte order) that include attributes, and prefixed with four bytes giving the screen dimensions and cursor position: \fIlines\fP, \fIcolumns\fP, \fIx\fP, \fIy\fP. (\fIx\fP = \fIy\fP = 0 at the top left corner of the screen.) .PP When a 512\-character font is loaded, the 9th bit position can be fetched by applying the \fBioctl\fP(2) \fBVT_GETHIFONTMASK\fP operation (available in Linux kernels 2.6.18 and above) on \fI/dev/tty[1\-63]\fP; the value is returned in the \fIunsigned short\fP pointed to by the third \fBioctl\fP(2) argument. .PP These devices replace the screendump \fBioctl\fP(2) operations of \fBioctl_console\fP(2), so the system administrator can control access using filesystem permissions. .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 Nótese que la salida no contiene caracteres de nueva línea, por lo que puede ser necesario algo de procesamiento adicional, como por ejemplo en .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/. .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Ignacio Arenaza , Gerardo Aburruzaga García y Juan Piernas . 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. 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 .