++ed by:
1 non-PAUSE user
Author image Slaven Rezić


XTerm::Conf - change configuration of a running xterm


    use XTerm::Conf;
    xterm_conf(-fg => "white", -bg => "black", -title => "Hello, world", ...);


XTerm::Conf provides functions to change some aspects of a running xterm and compatible terminal emulators (e.g. rxvt or urxvt).

xterm_conf(options ...)

The xterm_conf function (exported by default) checks first if the current terminal looks like an xterm, rxvt or urxvt (by looking at the TERM environment variable) and prints the escape sequences for the following options:

-n string
-iconname string

Change name of the associated X11 icon.

-T string
-title string

Change xterm's title name.

-fg color
-foreground color

Change text color. You can use either X11 named colors or the #rrggbb notation.

-bg color
-background color

Change background color.

-cr color
-textcursor color

Change cursor color.

-ms color
-mousefg color
-mouseforeground color

Change the foreground color of the mouse pointer.

-mousebg color
-mousebackground color

Change the background/border color of the mouse pointer.

-tekfg color
-tekforeground color

Change foreground color of Tek window.

-tekbg color
-tekbackground color

Change background color of Tek window.

-highlightcolor color

Change selection background color.


Ring the bell (may be visual or audible, depending on configuration).

-cs utf-8|iso-8859-1

Switch charset. Valid values are utf-8 and iso-8859-1.


Perform a full reset.


Perform a soft reset.


Turn smooth scrolling on or off (which is probably the opposite of jump scroll, see xterm(1)).


Turn reverse video on or off.






Turn auto repeat on or off.




Show or hide the cursor.


rxvt only?


Show the Tek window and switch to Tek mode (XXX -notektronix does not seem to work).








rxvt only?


rxvt only?



-scrollregion ...



Deiconify an iconified xterm window.


Iconify the xterm window.

-geometry geometry

Change the geometry of the xterm window. The geometry is in the usual X11 notation widthxheight+left+top. The numbers are in pixels. The width and height may be suffixed with a c, which means that the numbers are interpreted as characters.


Raise the xterm window.


Lower the xterm window


Force a X11 refresh.


Maximize the xterm window.


Restore to the state before maximization.

-xproperty ...
-x11property ...


-font number

Change font. Number may be from 0 (default font) to 6 (usually the largest font, but this could be changed using Xdefaults).


Use the next font in list.


Use the previous font in list.

-report what

Report to STDOUT:


Return 1.


The cursor position (line column).


The XTerm window position (x y).


The geometry of the window in pixels (width height).


The geometry of the window in characters (widthxheight).




The icon name. This may only be available if the allowWindowOps resource is set to true (e.g. using

    xterm -xrm "*allowWindowOps:true"

). On some operating systems and some terminal emulators (most notable rxvt on Debian/Ubuntu systems) this operation may be forbidden completely.


The title name. See "iconname" for possible restrictions on availability.


If set together with a -report ... option, then print the returned escape sequence as numbers to STDOUT (as an debugging aid).

-resize integer


xterm_conf_string(options ...)

xterm_conf_string just returns a string with the escape sequences for the given options (same as in xterm_conf). No terminal check will be performed here.

xterm_conf_string may be exported.


Return a true value if the given term, or if missing, the current terminal as given by $ENV{TERM}, is supported.

This function may be exported.


Slaven Rezić


xterm-conf, xterm(1), rxvt(1), Term::Title.