.TH xsetroot "" "" "X Utility"
.PC "Set preferences for the root window"
\fBxsetroot [\-bg \fIcolor\^\fB] [\-bitmap \fIfilename\^\fB] [\-cursor \fIcursorfile maskfile\^\fB] [\-cursor_name \fIcursorname\^\fB]
	[\-def] [\-display \fIdisplay\^\fB] [\-fg \fIcolor\^\fB] [\-gray] [\-grey] [\-help] [\-mod \fIx y\^\fB]
	[\-name \fIstring\^\fB] [\-rv] [\-solid \fIcolor\^\fB]\fR
.PP
.HS
.SH Options:
.IC "\fB\-bg \fIcolor\fR"
Set the background to
.I color
.IC "\fB\-bitmap \fIfile\fR"
Use the bit map specified in
.I file
to tile the background
.IC "\fB-cursor \fIcursorfile maskfile\fR"
Change the mouse cursor to what you want when it is outside of any window
.IC "\fB\-cursor_name\fR \fIcursorname\fR"
Change the mouse cursor to one of the standard
cursors from the cursor font
.IC \fB\-def\fR
Reset all unspecified attributes to their default values
.IC "\fB\-display\fR \fIserver\fR"
Connect to
.I server
.IC "\fB\-fg \fIcolor\fR"
Set foreground to
.I color
.IC \fB\-gray\fR
Make the entire background gray
.IC \fB\-grey\fR
Same as
.B \-gray
.IC \fB\-help\fR
Print a usage message and exit
.IC "\fB\-mod\fR \fIx\fR \fIy\fR"
Draw a plaid-like grid pattern on the screen
.IC "\fB\-name \fIstring\fR"
Set the name of the root window to
.I string
.IC \fB\-rv\fR
Exchange the foreground and background colors, to mimic reverse video
.IC "\fB\-solid \fIcolor\fR"
Set the background of the root window to
.I color
For a list of recognized colors, see the file
.BR /usr/X11/lib/rgb.txt .
.HE
.II "root window, modify"
.II background^modify
.B xsetroot
modifies the appearance of the screen's background \(em 
what is usually called the
.IR "root window" .
.B xsetroot
lets you tailor the appearance of the root window to suite your tastes.
.SH Options
If you invoke
.B xsetroot
with no command-line options,
it resets the root window to its default settings.
.B xsetroot
recognizes the following command-line options:
.IP "\fB\-bg \fIcolor\fR"
Set the background to
.IR color .
.IP "\fB\-bitmap \fIfile\fR"
Use the bit map specified in
.I file
to tile the background.
The entire background is made up of repeated ``tiles'' of the bit map.
.IP "\fB-cursor \fIcursorfile maskfile\fR"
Change the mouse cursor that X displays when the cursor is against the
root window.
.I cursorfile
and
.I maskfile
name bit-mapped images.
For example, the command
.DM
	xsetroot -cursor /usr/X11/include/X11/bitmaps/star \e
		/usr/X11/include/X11/bitmaps/starMask
.DE
.IP
changes the mouse cursor to an asterisk when the cursor is against the
root window.
.IP "\fB\-cursor_name\fR \fIcursorname\fR"
Change the mouse cursor to one of the standard
cursors from the
.B cursor
font.
File
.B /usr/X11/include/X11/cursorfont.h 
names the available cursors (you should ignore the string
.B XC_
that prefixes each name).
The Lexicon article for the X utility
.B xfd
displays the cursors in that font.
.\"Refer to appendix B of the X protocol for
.\"the names (except that the XC_ prefix is elided for this option).
.IP \fB\-def\fR
Reset all unspecified attributes to their default values.
This restores
to the familiar gray mesh and the cursor to the hollow \(mu shape.
If you specify
.B \-def
with other options,
.B xsetroot
sets only the non-specified characteristics to their default states.
.IP "\fB\-display\fR \fIserver\fR"
Connect to
.IR server .
.IP "\fB\-fg \fIcolor\fR"
Set foreground to
.IR color .
Foreground and background colors
are meaningful only in combination with the options
.BR \-cursor ,
.BR \-bitmap ,
and
.BR \-mod .
.IP \fB\-gray\fR
.IS \fB\-grey\fR
Make the entire background gray.
.IP \fB\-help\fR
Print a usage message and exit.
.IP "\fB\-mod\fR \fIx\fR \fIy\fR"
Draw a plaid-like grid pattern on the screen.
.I x
are integers, ranging from one to 16, that give the number of pixels
that separate, respectively, the vertical and horizontal lines.
.\" .IP "\fB\-name \fIstring\fR"
.\" Set the name of the root window to
.\" .IR string .
.\" There is no default value.
.\" Usually a window is named so the
.\" window manager can use a text representation when the window is iconified.
.\" This option is unused because you cannot iconify the background.
.IP \fB\-rv\fR
Exchange the foreground and background colors, to mimic reverse video.
Normally, the foreground color is black and the background color is white.
.IP "\fB\-solid \fIcolor\fR"
Set the background of the root window to
.IR color .
The file
.B /usr/X11/lib/rgb.txt
names all of the colors that X recognizes.
.PP
You can use only one of the options that set the background of the
root window, i.e.,
.BR \-solid ,
.BR \-gray ,
.BR \-grey ,
.BR \-bitmap ,
and
.BR \-mod .
.SH Example
The following command tiles the background of the root window with a bit map:
.DM
	xsetroot -bitmap /usr/X11/include/X11/bitmaps/escherknot
.DE
.PP
When you type it, your screen appears something like the following:
.PH 1 1 \*(XD/xsetroot.eps
.sp
.SH "See Also"
.B
xset,
xrdb,
X utilities
.R
.SH Notes
Copyright \(co 1988, Massachusetts Institute of Technology.
.PP
.II "Lillibridge, Mark"
.B xsetroot
was written by Mark Lillibridge of MIT Project Athena.
