Movatterモバイル変換


[0]ホーム

URL:


man7.org > Linux >man-pages

Linux/UNIX system programming training


TIOCLINUX(2const) — Linux manual page

NAME |SYNOPSIS |DESCRIPTION |RETURN VALUE |ERRORS |STANDARDS |SEE ALSO |COLOPHON

TIOCLINUX(2const)TIOCLINUX(2const)

NAME        top

       TIOCLINUX - ioctls for console terminal and virtual consoles

SYNOPSIS        top

#include <linux/tiocl.h>/* Definition ofTIOCL_*constants */#include <sys/ioctl.h>int ioctl(intfd, TIOCLINUX, void *argp);

DESCRIPTION        top

       The action of the following ioctls depends on the first byte in       the struct pointed to byargp, referred to here as thesubcode.       These are legal only for the superuser or the owner of the current       terminal.subcode=0              Dump the screen.  Disappeared in Linux 1.1.92.  (With Linux              1.1.92 or later, read from/dev/vcsN or/dev/vcsaN              instead.)subcode=1              Get task information.  Disappeared in Linux 1.1.92.subcode=TIOCL_SETSEL              Set selection.argp points to a                  struct {                      char  subcode;                      short xs, ys, xe, ye;                      short sel_mode;                  };xs andys are the starting column and row.xe andye are              the ending column and row.  (Upper left corner is              row=column=1.)sel_mode may be one of the following              operations:TIOCL_SELCHAR                     Select character-by-character.  The indicated screen                     characters are highlighted and saved in a kernel                     buffer.                     Since Linux 6.7, using this selection mode requires                     theCAP_SYS_ADMINcapability.TIOCL_SELWORD                     Select word-by-word, expanding the selection                     outwards to align with word boundaries.  The                     indicated screen characters are highlighted and                     saved in a kernel buffer.                     Since Linux 6.7, using this selection mode requires                     theCAP_SYS_ADMINcapability.TIOCL_SELLINE                     Select line-by-line, expanding the selection                     outwards to select full lines.  The indicated screen                     characters are highlighted and saved in a kernel                     buffer.                     Since Linux 6.7, using this selection mode requires                     theCAP_SYS_ADMINcapability.TIOCL_SELPOINTER                     Show the pointer at position (xs,ys) or (xe,ye),                     whichever is later in text flow order.TIOCL_SELCLEAR                     Remove the current selection highlight, if any, from                     the console holding the selection.                     This does not affect the stored selected text.TIOCL_SELMOUSEREPORT                     Make the terminal report (xs,ys) as the current                     mouse location using thexterm(1) mouse tracking                     protocol (seeconsole_codes(4)).  The lower 4 bits                     ofsel_mode (TIOCL_SELBUTTONMASK) indicate the                     desired button press and modifier key information                     for the mouse event.                     If mouse reporting is not enabled for the terminal,                     this operation yields anEINVALerror.                     Since Linux 6.7, using this selection mode requires                     theCAP_SYS_ADMINcapability.subcode=TIOCL_PASTESEL              Paste selection.  The characters in the selection buffer              are written tofd.              Since Linux 6.7, using this subcode requires theCAP_SYS_ADMINcapability.subcode=TIOCL_UNBLANKSCREEN              Unblank the screen.subcode=TIOCL_SELLOADLUT              Sets contents of a 256-bit look up table defining              characters in a "word", for word-by-word selection.  (Since              Linux 1.1.32.)              Since Linux 6.7, using this subcode requires theCAP_SYS_ADMINcapability.subcode=TIOCL_GETSHIFTSTATEargp points to a char which is set to the value of the              kernel variableshift_state.  (Since Linux 1.1.32.)subcode=TIOCL_GETMOUSEREPORTINGargp points to a char which is set to the value of the              kernel variablereport_mouse.  (Since Linux 1.1.33.)subcode=8              Dump screen width and height, cursor position, and all the              character-attribute pairs.  (Linux 1.1.67 through Linux              1.1.91 only.  With Linux 1.1.92 or later, read from/dev/vcsa* instead.)subcode=9              Restore screen width and height, cursor position, and all              the character-attribute pairs.  (Linux 1.1.67 through Linux              1.1.91 only.  With Linux 1.1.92 or later, write to/dev/vcsa* instead.)subcode=TIOCL_SETVESABLANK              Handles the Power Saving feature of the new generation of              monitors.  VESA screen blanking mode is set toargp[1],              which governs what screen blanking does:0Screen blanking is disabled.1The current video adapter register settings are                     saved, then the controller is programmed to turn off                     the vertical synchronization pulses.  This puts the                     monitor into "standby" mode.  If your monitor has an                     Off_Mode timer, then it will eventually power down                     by itself.2The current settings are saved, then both the                     vertical and horizontal synchronization pulses are                     turned off.  This puts the monitor into "off" mode.                     If your monitor has no Off_Mode timer, or if you                     want your monitor to power down immediately when the                     blank_timer times out, then you choose this option.                     (Caution: Powering down frequently will damage the                     monitor.)  (Since Linux 1.1.76.)subcode=TIOCL_SETKMSGREDIRECT              Change target of kernel messages ("console"): by default,              and if this is set to0, messages are written to the              currently active VT.  The VT to write to is a single byte              followingsubcode.  (Since Linux 2.5.36.)subcode=TIOCL_GETFGCONSOLE              Returns the number of VT currently in foreground.  (Since              Linux 2.5.36.)subcode=TIOCL_SCROLLCONSOLE              Scroll the foreground VT by the specified amount oflines              down, or half the screen if0.lines is *(((int32_t              *)&subcode) + 1).  (Since Linux 2.5.67.)subcode=TIOCL_BLANKSCREEN              Blank the foreground VT, ignoring "pokes" (typing): can              only be unblanked explicitly (by switching VTs, to text              mode, etc.).  (Since Linux 2.5.71.)subcode=TIOCL_BLANKEDSCREEN              Returns the number of VT currently blanked,0if none.              (Since Linux 2.5.71.)subcode=16              Never used.subcode=TIOCL_GETKMSGREDIRECT              Returns target of kernel messages.  (Since Linux 2.6.17.)subcode=TIOCL_GETBRACKETEDPASTE              Returns1if the application advertised bracketed paste              compatibility to the terminal,0otherwise.  (Since Linux              6.16.)

RETURN VALUE        top

       On success, 0 is returned (except where indicated).  On failure,       -1 is returned, anderrno is set to indicate the error.

ERRORS        top

EINVALargp is invalid.EPERMInsufficient permission.

STANDARDS        top

       Linux.

SEE ALSO        top

ioctl(2),ioctl_console(2)

COLOPHON        top

       This page is part of theman-pages (Linux kernel and C library       user-space interface documentation) project.  Information about       the project can be found at        ⟨https://www.kernel.org/doc/man-pages/⟩.  If you have a bug report       for this manual page, see       ⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩.       This page was obtained from the tarball man-pages-6.15.tar.gz       fetched from       ⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on       2025-08-11.  If you discover any rendering problems in this HTML       version of the page, or you believe there is a better or more up-       to-date source for the page, or you have corrections or       improvements to the information in this COLOPHON (which isnot       part of the original manual page), send a mail to       man-pages@man7.orgLinux man-pages 6.15            2025-06-11TIOCLINUX(2const)

Pages that refer to this page:ioctl_console(2)ioctl_tty(2)



HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface.

For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere.

Hosting byjambit GmbH.

Cover of TLPI


[8]ページ先頭

©2009-2025 Movatter.jp