377 lines
10 KiB
HTML
377 lines
10 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SETTERM</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SETTERM</H1>
|
|
Section: User Commands (1)<BR>Updated: May 2014<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
setterm - set terminal attributes
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>setterm</B>
|
|
|
|
[options]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>setterm</B>
|
|
|
|
writes to standard output a character string that will invoke the specified
|
|
terminal capabilities. Where possible
|
|
<I>terminfo</I>
|
|
|
|
is consulted to find the string to use. Some options however (marked "virtual
|
|
consoles only" below) do not correspond to a
|
|
<B><A HREF="/cgi-bin/man/man2html?5+terminfo">terminfo</A></B>(5)
|
|
|
|
capability. In this case, if the terminal type is "con" or "linux" the string
|
|
that invokes the specified capabilities on the PC Minix virtual console driver
|
|
is output. Options that are not implemented by the terminal are ignored.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
For boolean options
|
|
(<B>on</B> or <B>off</B>),
|
|
|
|
the default is
|
|
<B>on</B>.
|
|
|
|
<P>
|
|
|
|
Below, an
|
|
<I>8-color</I>
|
|
|
|
can be
|
|
<B>black</B>,
|
|
|
|
<B>red</B>,
|
|
|
|
<B>green</B>,
|
|
|
|
<B>yellow</B>,
|
|
|
|
<B>blue</B>,
|
|
|
|
<B>magenta</B>,
|
|
|
|
<B>cyan</B>,
|
|
|
|
or
|
|
<B>white</B>.
|
|
|
|
<P>
|
|
|
|
A
|
|
<I>16-color</I>
|
|
|
|
can be an
|
|
<I>8-color</I>,
|
|
|
|
or
|
|
<B>grey</B>,
|
|
|
|
or
|
|
<B>bright</B>
|
|
|
|
followed
|
|
by
|
|
<B>red</B>,
|
|
|
|
<B>green</B>,
|
|
|
|
<B>yellow</B>,
|
|
|
|
<B>blue</B>,
|
|
|
|
<B>magenta</B>,
|
|
|
|
<B>cyan</B>,
|
|
|
|
or
|
|
<B>white</B>.
|
|
|
|
<P>
|
|
|
|
The various color options may be set independently, at least on virtual
|
|
consoles, though the results of setting multiple modes (for example,
|
|
<B>--underline</B>
|
|
|
|
and
|
|
<B>--half-bright</B>)
|
|
|
|
are hardware-dependent.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>--appcursorkeys</B> [<B>on</B>|<B>off</B>] (virtual consoles only)<DD>
|
|
Sets Cursor Key Application Mode on or off. When on, ESC O A, ESC O B, etc.
|
|
will be sent for the cursor keys instead of ESC [ A, ESC [ B, etc. See the
|
|
<I>vi and Cursor-Keys</I>
|
|
|
|
section of the
|
|
<I>Text-Terminal-HOWTO</I>
|
|
|
|
for how this can cause problems for <B>vi</B> users.
|
|
<DT id="2"><B>--append</B> [<I>console_number</I>]<DD>
|
|
Like
|
|
<B>--dump</B>,
|
|
|
|
but appends to the snapshot file instead of overwriting it. Only works if no
|
|
<B>--dump</B>
|
|
|
|
options are given.
|
|
<DT id="3"><B>--background</B> <I>8-color</I>|<B>default</B><DD>
|
|
Sets the background text color.
|
|
<DT id="4"><B>--blank</B> [<B>0-60</B>|<B>force</B>|<B>poke</B>] (virtual consoles only)<DD>
|
|
Sets the interval of inactivity, in minutes, after which the screen will be
|
|
automatically blanked (using APM if available). Without an argument, it gets
|
|
the blank status (returns which vt was blanked, or zero for an unblanked vt).
|
|
<DT id="5"><DD>
|
|
The
|
|
<B>force</B>
|
|
|
|
option keeps the screen blank even if a key is pressed.
|
|
<DT id="6"><DD>
|
|
The
|
|
<B>poke</B>
|
|
|
|
option unblanks the screen.
|
|
<DT id="7"><B>--bfreq</B> [<I>number</I>] (virtual consoles only)<DD>
|
|
Sets the bell frequency in Hertz. Without an argument, it defaults to
|
|
<B>0</B>.
|
|
|
|
<DT id="8"><B>--blength</B> [<B>0-2000</B>] (virtual consoles only)<DD>
|
|
Sets the bell duration in milliseconds. Without an argument, it defaults to
|
|
<B>0</B>.
|
|
|
|
<DT id="9"><B>--blink</B> [<B>on</B>|<B>off</B>]
|
|
|
|
<DD>
|
|
Turns blink mode on or off. Except on a virtual console,
|
|
<B>--blink off</B>
|
|
|
|
turns off all attributes (bold, half-brightness, blink, reverse).
|
|
<DT id="10"><B>--bold</B> [<B>on</B>|<B>off</B>]
|
|
|
|
<DD>
|
|
Turns bold (extra bright) mode on or off. Except on a virtual console,
|
|
<B>--bold off</B>
|
|
|
|
turns off all attributes (bold, half-brightness, blink, reverse).
|
|
<DT id="11"><B>--clear</B> [<B>all</B>|<B>rest</B>]<DD>
|
|
Without an argument or with the argument
|
|
<B>all</B>,
|
|
|
|
the entire screen is cleared and the cursor is set to the home position,
|
|
just like
|
|
<B><A HREF="/cgi-bin/man/man2html?1+clear">clear</A></B>(1)
|
|
|
|
does. With the argument
|
|
<B>rest</B>,
|
|
|
|
the screen is cleared from the current cursor position to the end.
|
|
<DT id="12"><B>--clrtabs</B> [<I>tab1 tab2 tab3</I> ...] (virtual consoles only)<DD>
|
|
Clears tab stops from the given horizontal cursor positions, in the range
|
|
<B>1-160</B>.
|
|
|
|
Without arguments, it clears all tab stops.
|
|
<DT id="13"><B>--cursor</B> [<B>on</B>|<B>off</B>]
|
|
|
|
<DD>
|
|
Turns the terminal's cursor on or off.
|
|
<DT id="14"><B>--default</B><DD>
|
|
Sets the terminal's rendering options to the default values.
|
|
<DT id="15"><B>--dump</B> [<I>console_number</I>]<DD>
|
|
Writes a snapshot of the virtual console with the given number
|
|
to the file specified with the
|
|
<B>--file</B>
|
|
|
|
option, overwriting its contents; the default is
|
|
<I>screen.dump</I>.
|
|
|
|
Without an argument, it dumps the current virtual console. This overrides
|
|
<B>--append</B>.
|
|
|
|
<DT id="16"><B>--file</B> <I>filename</I><DD>
|
|
Sets the snapshot file name for any
|
|
<B>--dump</B>
|
|
|
|
or
|
|
<B>--append</B>
|
|
|
|
options on the same command line. If this option is not present, the default
|
|
is
|
|
<I>screen.dump</I>
|
|
|
|
in the current directory. A path name that exceeds the system maximum will be
|
|
truncated, see PATH_MAX from linux/limits.h for the value.
|
|
<DT id="17"><B>--foreground</B> <I>8-color</I>|<B>default</B><DD>
|
|
Sets the foreground text color.
|
|
<DT id="18"><B>--half-bright</B> [<B>on</B>|<B>off</B>]
|
|
|
|
<DD>
|
|
Turns dim (half-brightness) mode on or off. Except on a virtual console,
|
|
<B>--half-bright off</B>
|
|
|
|
turns off all attributes (bold, half-brightness, blink, reverse).
|
|
<DT id="19"><B>--hbcolor</B> <I>16-color</I><DD>
|
|
Sets the color for half-bright characters.
|
|
<DT id="20"><B>--initialize</B><DD>
|
|
Displays the terminal initialization string, which typically sets the
|
|
terminal's rendering options, and other attributes to the default values.
|
|
<DT id="21"><B>--inversescreen</B> [<B>on</B>|<B>off</B>]
|
|
|
|
<DD>
|
|
Swaps foreground and background colors for the whole screen.
|
|
<DT id="22"><B>--linewrap</B> [<B>on</B>|<B>off</B>]
|
|
|
|
<DD>
|
|
Makes the terminal continue on a new line when a line is full.
|
|
<DT id="23"><B>--msg</B> [<B>on</B>|<B>off</B>] (virtual consoles only)
|
|
|
|
<DD>
|
|
Enables or disables the sending of kernel
|
|
<B>printk</B>()
|
|
|
|
messages to the console.
|
|
<DT id="24"><B>--msglevel</B> <B>0-8</B> (virtual consoles only)<DD>
|
|
Sets the console logging level for kernel
|
|
<B>printk()</B>
|
|
|
|
messages. All messages strictly more important than this will be printed, so a
|
|
logging level of
|
|
<B>0</B>
|
|
|
|
has the same effect as
|
|
<B>--msg on</B>
|
|
|
|
and a logging level of
|
|
<B>8</B>
|
|
|
|
will print all kernel messages.
|
|
<B><A HREF="/cgi-bin/man/man2html?8+klogd">klogd</A></B>(8)
|
|
|
|
may be a more convenient interface to the logging of kernel messages.
|
|
<DT id="25"><B>--powerdown</B> [<B>0-60</B>]<DD>
|
|
Sets the VESA powerdown interval in minutes. Without an argument, it defaults
|
|
to
|
|
<B>0</B>
|
|
|
|
(disable powerdown). If the console is blanked or the monitor is in suspend
|
|
mode, then the monitor will go into vsync suspend mode or powerdown mode
|
|
respectively after this period of time has elapsed.
|
|
<DT id="26"><B>--powersave</B> <B>off</B><DD>
|
|
Turns off monitor VESA powersaving features.
|
|
<DT id="27"><B>--powersave</B> <B>on</B>|<B>vsync</B><DD>
|
|
Puts the monitor into VESA vsync suspend mode.
|
|
<DT id="28"><B>--powersave</B> <B>powerdown</B><DD>
|
|
Puts the monitor into VESA powerdown mode.
|
|
<DT id="29"><B>--powersave</B> <B>hsync</B><DD>
|
|
Puts the monitor into VESA hsync suspend mode.
|
|
<DT id="30"><B>--regtabs</B> [<B>1-160</B>] (virtual consoles only)<DD>
|
|
Clears all tab stops, then sets a regular tab stop pattern, with one tab every
|
|
specified number of positions. Without an argument, it defaults to
|
|
<B>8</B>.
|
|
|
|
<DT id="31"><B>--repeat</B> [<B>on</B>|<B>off</B>] (virtual consoles only)
|
|
|
|
<DD>
|
|
Turns keyboard repeat on or off.
|
|
<DT id="32"><B>--reset</B><DD>
|
|
Displays the terminal reset string, which typically resets the terminal to
|
|
its power-on state.
|
|
<DT id="33"><B>--resize</B><DD>
|
|
Reset terminal size by assessing maximum row and column. This is useful
|
|
when actual geometry and kernel terminal driver are not in sync. Most
|
|
notable use case is with serial consoles, that do not use
|
|
<B><A HREF="/cgi-bin/man/man2html?3+ioctl">ioctl</A></B>(3)
|
|
|
|
but just byte streams and breaks.
|
|
<DT id="34"><B>--reverse</B> [<B>on</B>|<B>off</B>]<DD>
|
|
Turns reverse video mode on or off. Except on a virtual console,
|
|
<B>--reverse off</B>
|
|
|
|
turns off all attributes (bold, half-brightness, blink, reverse).
|
|
<DT id="35"><B>--store</B> (virtual consoles only)<DD>
|
|
Stores the terminal's current rendering options (foreground and background
|
|
colors) as the values to be used at reset-to-default.
|
|
<DT id="36"><B>--tabs</B> [<I>tab1 tab2 tab3</I> ...]<DD>
|
|
Sets tab stops at the given horizontal cursor positions, in the range
|
|
<B>1-160</B>.
|
|
|
|
Without arguments, it shows the current tab stop settings.
|
|
<DT id="37"><B>--term</B> <I>terminal_name</I><DD>
|
|
Overrides the TERM environment variable.
|
|
<DT id="38"><B>--ulcolor</B> <I>16-color</I> (virtual consoles only)<DD>
|
|
Sets the color for underlined characters.
|
|
<DT id="39"><B>--underline</B> [<B>on</B>|<B>off</B>]
|
|
|
|
<DD>
|
|
Turns underline mode on or off.
|
|
<DT id="40"><B>--version</B><DD>
|
|
Displays version information and exits.
|
|
<DT id="41"><B>--help</B><DD>
|
|
Displays a help text and exits.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>COMPATIBILITY</H2>
|
|
|
|
Since version 2.25
|
|
<B>setterm</B>
|
|
|
|
has support for long options with two hyphens, for example
|
|
<B>--help</B>,
|
|
|
|
beside the historical long options with a single hyphen, for example
|
|
<B>-help</B>.
|
|
|
|
In scripts it is better to use the backward-compatible single hyphen
|
|
rather than the double hyphen. Currently there are no plans nor good
|
|
reasons to discontinue single-hyphen compatibility.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+stty">stty</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+tput">tput</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?4+tty">tty</A></B>(4),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+terminfo">terminfo</A></B>(5)
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
Differences between the Minix and Linux versions are not documented.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>AVAILABILITY</H2>
|
|
|
|
The setterm command is part of the util-linux package and is available from
|
|
|
|
Linux Kernel Archive
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="42"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="43"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="44"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="45"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="46"><A HREF="#lbAF">COMPATIBILITY</A><DD>
|
|
<DT id="47"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
<DT id="48"><A HREF="#lbAH">BUGS</A><DD>
|
|
<DT id="49"><A HREF="#lbAI">AVAILABILITY</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:27 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|