1X(7)                   Miscellaneous Information Manual                   X(7)
2
3
4

NAME

6       X - a portable, network-transparent window system
7

OVERVIEW

9       The  X  Window System is a network transparent window system which runs
10       on a wide range of computing and graphics machines.  It should be rela‐
11       tively straightforward to build the X.Org Foundation software distribu‐
12       tion on most ANSI C and POSIX compliant systems.  Commercial  implemen‐
13       tations are also available for a wide range of platforms.
14
15       The  X.Org  Foundation  requests  that the following names be used when
16       referring to this software:
17
18
19                                          X
20                                   X Window System
21                                    X Version 11
22                             X Window System, Version 11
23                                         X11
24
25       X Window System is a trademark of The Open Group.
26

DESCRIPTION

28       X Window System servers run on computers  with  bitmap  displays.   The
29       server distributes user input to and accepts output requests from vari‐
30       ous client programs through a variety of different interprocess  commu‐
31       nication  channels.   Although  the  most common case is for the client
32       programs to be running on the same machine as the server,  clients  can
33       be  run transparently from other machines (including machines with dif‐
34       ferent architectures and operating systems) as well.
35
36       X supports overlapping hierarchical subwindows and  text  and  graphics
37       operations, on both monochrome and color displays.  For a full explana‐
38       tion of the functions that are available, see the Xlib - C  Language  X
39       Interface  manual,  the  X  Window System Protocol specification, the X
40       Toolkit Intrinsics - C Language Interface manual, and  various  toolkit
41       documents.
42
43       The number of programs that use X is quite large.  Programs provided in
44       the core X.Org Foundation distribution include:  a  terminal  emulator,
45       xterm;  a  window manager, twm; a display manager, xdm; a console redi‐
46       rect program, xconsole; a mail interface, xmh; a bitmap editor, bitmap;
47       resource  listing/manipulation  tools,  appres, editres; access control
48       programs, xauth, xhost, and iceauth; user preference setting  programs,
49       xrdb, xcmsdb, xset, xsetroot, xstdcmap, and xmodmap; clocks, xclock and
50       oclock; a font displayer, xfd; utilities for listing information  about
51       fonts, windows, and displays, xlsfonts, xwininfo, xlsclients, xdpyinfo,
52       xlsatoms, and xprop; screen image manipulation  utilities,  xwd,  xwud,
53       and  xmag; a performance measurement utility, x11perf; a font compiler,
54       bdftopcf; a font server and related utilities, xfs, fsinfo,  fslsfonts,
55       fstobdf;  a display server and related utilities, Xserver, rgb, mkfont‐
56       dir; a clipboard manager, xclipboard; keyboard description compiler and
57       related  utilities,  xkbcomp, setxkbmap xkbprint, xkbbell, xkbevd, xkb‐
58       vleds, and xkbwatch; a utility to terminate clients, xkill; a  firewall
59       security  proxy,  xfwp;  a  proxy manager to control them, proxymngr; a
60       utility to find proxies, xfindproxy; web  browser  plug-ins,  libxrx.so
61       and  libxrxnest.so;  an RX MIME-type helper program, xrx; and a utility
62       to cause part or all of the screen to be redrawn, xrefresh.
63
64       Many other  utilities,  window  managers,  games,  toolkits,  etc.  are
65       included as user-contributed software in the X.Org Foundation distribu‐
66       tion, or are available on the Internet.  See  your  site  administrator
67       for details.
68

STARTING UP

70       There  are  two main ways of getting the X server and an initial set of
71       client applications started.  The particular  method  used  depends  on
72       what  operating system you are running and whether or not you use other
73       window systems in addition to X.
74
75       Display Manager
76               If you want to always have X running on your display, your site
77               administrator  can set your machine up to use a Display Manager
78               such as xdm, gdm, or kdm.  This program is typically started by
79               the  system  at  boot time and takes care of keeping the server
80               running and getting users logged in.  If you are running one of
81               these  display  managers, you will normally see a window on the
82               screen welcoming you to the system and asking  for  your  login
83               information.  Simply type them in as you would at a normal ter‐
84               minal.  If you make a mistake, the display manager will display
85               an error message and ask you to try again.  After you have suc‐
86               cessfully logged in, the display manager will start up  your  X
87               environment.  The documentation for the display manager you use
88               can provide more details.
89
90       xinit (run manually from the shell)
91               Sites that support more than one window system might choose  to
92               use the xinit program for starting X manually.  If this is true
93               for your machine, your site administrator  will  probably  have
94               provided a program named "x11", "startx", or "xstart" that will
95               do site-specific initialization  (such  as  loading  convenient
96               default  resources,  running  a  window  manager,  displaying a
97               clock, and starting several terminal emulators) in a nice  way.
98               If  not,  you  can build such a script using the xinit program.
99               This utility simply runs one user-specified  program  to  start
100               the  server,  runs another to start up any desired clients, and
101               then waits for either to finish.  Since either or both  of  the
102               user-specified  programs may be a shell script, this gives sub‐
103               stantial flexibility at the expense of a nice  interface.   For
104               this reason, xinit is not intended for end users.
105

DISPLAY NAMES

107       From  the  user's perspective, every X server has a display name of the
108       form:
109
110              hostname:displaynumber.screennumber
111
112       This information is used by the application to determine how it  should
113       connect  to  the  server  and which screen it should use by default (on
114       displays with multiple monitors):
115
116       hostname
117               The hostname specifies the name of the  machine  to  which  the
118               display is physically connected.  If the hostname is not given,
119               the most efficient way of communicating to a server on the same
120               machine will be used.
121
122       displaynumber
123               The  phrase  "display" is usually used to refer to a collection
124               of monitors that share a common set of input devices (keyboard,
125               mouse,  tablet, etc.).  Most workstations tend to only have one
126               display.  Larger, multi-user systems, however, frequently  have
127               several  displays  so  that  more  than one person can be doing
128               graphics work at once.  To avoid confusion, each display  on  a
129               machine  is assigned a display number (beginning at 0) when the
130               X server for that display is started.  The display number  must
131               always be given in a display name.
132
133       screennumber
134               Some displays share their input devices among two or more moni‐
135               tors.  These may be configured  as  a  single  logical  screen,
136               which  allows  windows to move across screens, or as individual
137               screens, each with their own set  of  windows.   If  configured
138               such  that each monitor has its own set of windows, each screen
139               is assigned a screen number (beginning at 0) when the X  server
140               for  that  display  is  started.   If  the screen number is not
141               given, screen 0 will be used.
142
143       On POSIX systems, the default display name is stored  in  your  DISPLAY
144       environment  variable.  This variable is set automatically by the xterm
145       terminal emulator.  However, when you log into  another  machine  on  a
146       network,  you may need to set DISPLAY by hand to point to your display.
147       For example,
148
149           % setenv DISPLAY myws:0
150           $ DISPLAY=myws:0; export DISPLAY
151
152       The ssh program can be used to start an X program on a remote  machine;
153       it automatically sets the DISPLAY variable correctly.
154
155       Finally,  most X programs accept a command line option of -display dis‐
156       playname to temporarily override the contents of DISPLAY.  This is most
157       commonly used to pop windows on another person's screen or as part of a
158       "remote shell" command to start an xterm pointing back to your display.
159       For example,
160
161           % xeyes -display joesws:0 -geometry 1000x1000+0+0
162           % rsh big xterm -display myws:0 -ls </dev/null &
163
164       X  servers  listen for connections on a variety of different communica‐
165       tions channels (network byte  streams,  shared  memory,  etc.).   Since
166       there  can be more than one way of contacting a given server, The host‐
167       name part of the display name is used to determine the type of  channel
168       (also  called  a transport layer) to be used.  X servers generally sup‐
169       port the following types of connections:
170
171       local
172               The hostname part of the  display  name  should  be  the  empty
173               string.   For  example:   :0, :1, and :0.1.  The most efficient
174               local transport will be chosen.
175
176       TCPIP
177               The hostname part of the display  name  should  be  the  server
178               machine's  hostname or IP address.  Full Internet names, abbre‐
179               viated names,  IPv4  addresses,  and  IPv6  addresses  are  all
180               allowed.     For    example:    x.org:0,    expo:0,    [::1]:0,
181               198.112.45.11:0, bigmachine:1, and hydra:0.1.
182

ACCESS CONTROL

184       An X server can use several types of access control.   Mechanisms  pro‐
185       vided in Release 7 are:
186
187       Host Access           Simple host-based access control.
188       MIT-MAGIC-COOKIE-1    Shared plain-text "cookies".
189       XDM-AUTHORIZATION-1   Secure DES based private-keys.
190       SUN-DES-1             Based on Sun's secure rpc system.
191       Server Interpreted    Server-dependent methods of access control
192
193       Xdm  initializes  access  control for the server and also places autho‐
194       rization information in a file accessible to the user.
195
196       Normally, the list of hosts from which connections are always  accepted
197       should  be  empty,  so that only clients with are explicitly authorized
198       can connect to the display.  When you add  entries  to  the  host  list
199       (with  xhost),  the server no longer performs any authorization on con‐
200       nections from those machines.  Be careful with this.
201
202       The file from which Xlib extracts authorization data can  be  specified
203       with  the  environment  variable  XAUTHORITY,  and defaults to the file
204       .Xauthority in the home directory.  Xdm uses $HOME/.Xauthority and will
205       create it or merge in authorization records if it already exists when a
206       user logs in.
207
208       If you use several machines and share a common  home  directory  across
209       all of the machines by means of a network file system, you never really
210       have to worry about authorization files, the system  should  work  cor‐
211       rectly  by default.  Otherwise, as the authorization files are machine-
212       independent, you can simply copy the files to share  them.   To  manage
213       authorization  files,  use  xauth.   This program allows you to extract
214       records and insert them into other files.  Using  this,  you  can  send
215       authorization  to remote machines when you login, if the remote machine
216       does not share a common home directory with your local  machine.   Note
217       that  authorization  information transmitted ``in the clear'' through a
218       network file system or using ftp or rcp can be ``stolen'' by a  network
219       eavesdropper,  and  as  such  may  enable unauthorized access.  In many
220       environments, this level of security is not a concern, but  if  it  is,
221       you  need  to  know the exact semantics of the particular authorization
222       data to know if this is actually a problem.
223
224       For more information on access control,  see  the  Xsecurity(7)  manual
225       page.
226

GEOMETRY SPECIFICATIONS

228       One of the advantages of using window systems instead of hardwired ter‐
229       minals is that applications don't have to be restricted to a particular
230       size  or  location  on the screen.  Although the layout of windows on a
231       display is controlled by the window manager that the  user  is  running
232       (described  below),  most  X programs accept a command line argument of
233       the form -geometry WIDTHxHEIGHT+XOFF+YOFF (where WIDTH,  HEIGHT,  XOFF,
234       and  YOFF are numbers) for specifying a preferred size and location for
235       this application's main window.
236
237       The WIDTH and HEIGHT parts of the geometry  specification  are  usually
238       measured  in either pixels or characters, depending on the application.
239       The XOFF and YOFF parts are measured in pixels and are used to  specify
240       the  distance  of  the window from the left or right and top and bottom
241       edges of the screen, respectively.  Both types of offsets are  measured
242       from  the indicated edge of the screen to the corresponding edge of the
243       window.  The X offset may be specified in the following ways:
244
245       +XOFF   The left edge of the window is to be placed XOFF pixels in from
246               the left edge of the screen (i.e., the X coordinate of the win‐
247               dow's origin will be XOFF).  XOFF may  be  negative,  in  which
248               case the window's left edge will be off the screen.
249
250       -XOFF   The  right  edge  of  the window is to be placed XOFF pixels in
251               from the right edge of the screen.  XOFF may  be  negative,  in
252               which case the window's right edge will be off the screen.
253
254       The Y offset has similar meanings:
255
256       +YOFF   The  top  edge of the window is to be YOFF pixels below the top
257               edge of the screen (i.e., the Y coordinate of the window's ori‐
258               gin  will  be  YOFF).   YOFF may be negative, in which case the
259               window's top edge will be off the screen.
260
261       -YOFF   The bottom edge of the window is to be YOFF  pixels  above  the
262               bottom edge of the screen.  YOFF may be negative, in which case
263               the window's bottom edge will be off the screen.
264
265       Offsets must be given as pairs; in other words,  in  order  to  specify
266       either XOFF or YOFF both must be present.  Windows can be placed in the
267       four corners of the screen using the following specifications:
268
269       +0+0    upper left hand corner.
270
271       -0+0    upper right hand corner.
272
273       -0-0    lower right hand corner.
274
275       +0-0    lower left hand corner.
276
277       In the following examples, a terminal emulator is placed in roughly the
278       center of the screen and a load average monitor, mailbox, and clock are
279       placed in the upper right hand corner:
280
281           xterm -fn 6x10 -geometry 80x24+30+200 &
282           xclock -geometry 48x48-0+0 &
283           xload -geometry 48x48-96+0 &
284           xbiff -geometry 48x48-48+0 &
285

WINDOW MANAGERS

287       The layout of windows on the screen is controlled by  special  programs
288       called window managers.  Although many window managers will honor geom‐
289       etry specifications as given, others may choose to ignore them (requir‐
290       ing  the user to explicitly draw the window's region on the screen with
291       the pointer, for example).
292
293       Since window managers are regular (albeit complex) client  programs,  a
294       variety  of  different user interfaces can be built.  The X.Org Founda‐
295       tion distribution comes with a window manager named twm which  supports
296       overlapping  windows,  popup  menus,  point-and-click  or click-to-type
297       input models, title bars, nice icons (and an icon manager for those who
298       don't like separate icon windows).
299
300       See  the user-contributed software in the X.Org Foundation distribution
301       for other popular window managers.
302

FONT NAMES

304       Collections of characters for displaying text  and  symbols  in  X  are
305       known  as  fonts.  A font typically contains images that share a common
306       appearance and look nice together (for example, a  single  size,  bold‐
307       ness,  slant, and character set).  Similarly, collections of fonts that
308       are based on a common type face  (the  variations  are  usually  called
309       roman, bold, italic, bold italic, oblique, and bold oblique) are called
310       families.
311
312       Fonts come in various sizes.  The X  server  supports  scalable  fonts,
313       meaning it is possible to create a font of arbitrary size from a single
314       source for the font.  The server supports scaling  from  outline  fonts
315       and bitmap fonts.  Scaling from outline fonts usually produces signifi‐
316       cantly better results than scaling from bitmap fonts.
317
318       An X server can obtain fonts from individual files stored  in  directo‐
319       ries  in  the  file system, or from one or more font servers, or from a
320       mixtures of directories and font  servers.   The  list  of  places  the
321       server looks when trying to find a font is controlled by its font path.
322       Although most installations will choose to have  the  server  start  up
323       with  all  of  the commonly used font directories in the font path, the
324       font path can be changed at any time with the xset  program.   However,
325       it  is  important  to  remember  that  the  directory  names are on the
326       server's machine, not on the application's.
327
328       Bitmap font files are usually  created  by  compiling  a  textual  font
329       description  into binary form, using bdftopcf.  Font databases are cre‐
330       ated by running the mkfontdir program in the directory  containing  the
331       source  or compiled versions of the fonts.  Whenever fonts are added to
332       a directory, mkfontdir should be rerun so that the server can find  the
333       new fonts.  To make the server reread the font database, reset the font
334       path with the xset program.  For example, to add a font  to  a  private
335       directory, the following commands could be used:
336
337           % cp newfont.pcf ~/myfonts
338           % mkfontdir ~/myfonts
339           % xset fp rehash
340
341       The  xfontsel  and  xlsfonts programs can be used to browse through the
342       fonts available on a server.  Font names tend to be fairly long as they
343       contain  all  of the information needed to uniquely identify individual
344       fonts.  However, the X server supports wildcarding of  font  names,  so
345       the full specification
346
347           -adobe-courier-medium-r-normal--10-100-75-75-m-60-iso8859-1
348
349       might be abbreviated as:
350
351           -*-courier-medium-r-normal--*-100-*-*-*-*-iso8859-1
352
353       Because  the  shell  also  has special meanings for * and ?, wildcarded
354       font names should be quoted:
355
356           % xlsfonts -fn '-*-courier-medium-r-normal--*-100-*-*-*-*-*-*'
357
358       The xlsfonts program can be used to list all of the fonts that match  a
359       given  pattern.  With no arguments, it lists all available fonts.  This
360       will usually list the same font at many different sizes.  To  see  just
361       the base scalable font names, try using one of the following patterns:
362
363           -*-*-*-*-*-*-0-0-0-0-*-0-*-*
364           -*-*-*-*-*-*-0-0-75-75-*-0-*-*
365           -*-*-*-*-*-*-0-0-100-100-*-0-*-*
366
367       To  convert  one of the resulting names into a font at a specific size,
368       replace one of the first two zeros with a  nonzero  value.   The  field
369       containing the first zero is for the pixel size; replace it with a spe‐
370       cific height in pixels to name a font at that size.  Alternatively, the
371       field containing the second zero is for the point size; replace it with
372       a specific size in decipoints (there are 722.7 decipoints to the  inch)
373       to  name a font at that size.  The last zero is an average width field,
374       measured in tenths of pixels; some servers will anamorphically scale if
375       this value is specified.
376

FONT SERVER NAMES

378       One  of  the  following  forms  can  be used to name a font server that
379       accepts TCP connections:
380
381           tcp/hostname:port
382           tcp/hostname:port/cataloguelist
383
384       The hostname specifies the name (or decimal  numeric  address)  of  the
385       machine  on  which the font server is running.  The port is the decimal
386       TCP port on which the font server is listening  for  connections.   The
387       cataloguelist  specifies a list of catalogue names, with '+' as a sepa‐
388       rator.
389
390       Examples: tcp/x.org:7100, tcp/198.112.45.11:7100/all.
391

COLOR NAMES

393       Most applications provide ways of tailoring (usually through  resources
394       or  command  line arguments) the colors of various elements in the text
395       and graphics they display.  A color  can  be  specified  either  by  an
396       abstract color name, or by a numerical color specification.  The numer‐
397       ical specification can identify  a  color  in  either  device-dependent
398       (RGB) or device-independent terms.  Color strings are case-insensitive.
399
400       X supports the use of abstract color names, for example, "red", "blue".
401       A value for this abstract name is obtained by  searching  one  or  more
402       color  name  databases.   Xlib  first searches zero or more client-side
403       databases; the number, location, and  content  of  these  databases  is
404       implementation  dependent.   If  the  name  is  not found, the color is
405       looked up in the X server's database.  The text form of  this  database
406       is commonly stored in the file usr/share/X11/rgb.txt.
407
408       A  numerical  color  specification consists of a color space name and a
409       set of values in the following syntax:
410
411           <color_space_name>:<value>/.../<value>
412
413       An RGB Device specification is identified by the prefix "rgb:" and  has
414       the following syntax:
415
416           rgb:<red>/<green>/<blue>
417
418               <red>, <green>, <blue> := h | hh | hhh | hhhh
419               h := single hexadecimal digits
420
421       Note  that  h indicates the value scaled in 4 bits, hh the value scaled
422       in 8 bits, hhh the value scaled in 12 bits, and hhhh the  value  scaled
423       in  16  bits,  respectively.  These values are passed directly to the X
424       server, and are assumed to be gamma corrected.
425
426       The eight primary colors can be represented as:
427
428
429                            black     rgb:0/0/0
430                            red       rgb:ffff/0/0
431                            green     rgb:0/ffff/0
432                            blue      rgb:0/0/ffff
433                            yellow    rgb:ffff/ffff/0
434                            magenta   rgb:ffff/0/ffff
435                            cyan      rgb:0/ffff/ffff
436                            white     rgb:ffff/ffff/ffff
437
438       For backward compatibility, an older syntax  for  RGB  Device  is  sup‐
439       ported, but its continued use is not encouraged.  The syntax is an ini‐
440       tial sharp sign character followed by a numeric specification,  in  one
441       of the following formats:
442
443
444                           #RGB            (4 bits each)
445                           #RRGGBB         (8 bits each)
446                           #RRRGGGBBB      (12 bits each)
447                           #RRRRGGGGBBBB   (16 bits each)
448
449       The  R,  G, and B represent single hexadecimal digits.  When fewer than
450       16 bits each are specified, they represent the most-significant bits of
451       the  value (unlike the "rgb:" syntax, in which values are scaled).  For
452       example, #3a7 is the same as #3000a0007000.
453
454       An RGB intensity specification is identified by the prefix "rgbi:"  and
455       has the following syntax:
456
457           rgbi:<red>/<green>/<blue>
458
459       The red, green, and blue are floating point values between 0.0 and 1.0,
460       inclusive.  They represent linear intensity values, with 1.0 indicating
461       full  intensity,  0.5  half intensity, and so on.  These values will be
462       gamma corrected by Xlib before being sent to the X server.   The  input
463       format for these values is an optional sign, a string of numbers possi‐
464       bly containing a decimal point, and an optional exponent field contain‐
465       ing an E or e followed by a possibly signed integer string.
466
467       The  standard device-independent string specifications have the follow‐
468       ing syntax:
469
470
471                       CIEXYZ:<X>/<Y>/<Z>   (none, 1, none)
472                       CIEuvY:<u>/<v>/<Y>   (~.6, ~.6, 1)
473                       CIExyY:<x>/<y>/<Y>   (~.75, ~.85, 1)
474                       CIELab:<L>/<a>/<b>   (100, none, none)
475                       CIELuv:<L>/<u>/<v>   (100, none, none)
476                       TekHVC:<H>/<V>/<C>   (360, 100, 100)
477
478       All of the values (C, H, V, X, Y, Z, a, b, u, v,  y,  x)  are  floating
479       point  values.   Some  of the values are constrained to be between zero
480       and some upper bound; the upper bounds are given in parentheses  above.
481       The syntax for these values is an optional '+' or '-' sign, a string of
482       digits possibly containing a decimal point, and  an  optional  exponent
483       field  consisting  of  an 'E' or 'e' followed by an optional '+' or '-'
484       followed by a string of digits.
485
486       For more information on device independent color, see the  Xlib  refer‐
487       ence manual.
488

KEYBOARDS

490       The  X keyboard model is broken into two layers:  server-specific codes
491       (called keycodes) which represent the physical keys,  and  server-inde‐
492       pendent  symbols  (called keysyms) which represent the letters or words
493       that appear on the keys.  Two tables are kept in the  server  for  con‐
494       verting keycodes to keysyms:
495
496       modifier list
497               Some  keys (such as Shift, Control, and Caps Lock) are known as
498               modifier and are used to  select  different  symbols  that  are
499               attached  to  a single key (such as Shift-a generates a capital
500               A, and Control-l generates a control character ^L).  The server
501               keeps  a list of keycodes corresponding to the various modifier
502               keys.  Whenever a key is pressed or released, the server gener‐
503               ates an event that contains the keycode of the indicated key as
504               well as a mask that specifies which of the  modifier  keys  are
505               currently  pressed.  Most servers set up this list to initially
506               contain the various shift, control, and shift lock keys on  the
507               keyboard.
508
509       keymap table
510               Applications  translate  event keycodes and modifier masks into
511               keysyms using a keysym table which contains one  row  for  each
512               keycode and one column for various modifier states.  This table
513               is initialized by the server to correspond to normal typewriter
514               conventions.   The  exact  semantics of how the table is inter‐
515               preted to produce keysyms depends on  the  particular  program,
516               libraries,  and  language  input method used, but the following
517               conventions for the first four keysyms in each row  are  gener‐
518               ally adhered to:
519
520       The  first  four  elements  of  the  list  are split into two groups of
521       keysyms.  Group 1 contains the first and second keysyms; Group  2  con‐
522       tains  the  third  and fourth keysyms.  Within each group, if the first
523       element is alphabetic and the the second element is the special  keysym
524       NoSymbol,  then  the group is treated as equivalent to a group in which
525       the first element is the lowercase letter and the second element is the
526       uppercase letter.
527
528       Switching between groups is controlled by the keysym named MODE SWITCH,
529       by attaching that keysym to some key and attaching that key to any  one
530       of  the  modifiers  Mod1  through  Mod5.   This  modifier is called the
531       ``group modifier.''  Group 1 is used when the group  modifier  is  off,
532       and Group 2 is used when the group modifier is on.
533
534       Within a group, the modifier state determines which keysym to use.  The
535       first keysym is used when the Shift and Lock modifiers  are  off.   The
536       second keysym is used when the Shift modifier is on, when the Lock mod‐
537       ifier is on and the second keysym is uppercase alphabetic, or when  the
538       Lock  modifier  is on and is interpreted as ShiftLock.  Otherwise, when
539       the Lock modifier is on and is interpreted as CapsLock,  the  state  of
540       the  Shift  modifier  is  applied first to select a keysym; but if that
541       keysym is lowercase alphabetic, then the corresponding uppercase keysym
542       is used instead.
543

OPTIONS

545       Most  X programs attempt to use the same names for command line options
546       and arguments.  All applications written with the X Toolkit  Intrinsics
547       automatically accept the following options:
548
549       -display display
550               This option specifies the name of the X server to use.
551
552       -geometry geometry
553               This option specifies the initial size and location of the win‐
554               dow.
555
556       -bg color, -background color
557               Either option specifies the color to use for the  window  back‐
558               ground.
559
560       -bd color, -bordercolor color
561               Either option specifies the color to use for the window border.
562
563       -bw number, -borderwidth number
564               Either  option specifies the width in pixels of the window bor‐
565               der.
566
567       -fg color, -foreground color
568               Either option specifies the color to use for text or graphics.
569
570       -fn font, -font font
571               Either option specifies the font to use for displaying text.
572
573       -iconic
574               This option indicates that  the  user  would  prefer  that  the
575               application's  windows  initially not be visible as if the win‐
576               dows had be immediately iconified by the user.  Window managers
577               may choose not to honor the application's request.
578
579       -name
580               This  option  specifies  the name under which resources for the
581               application should be found.  This option is  useful  in  shell
582               aliases  to  distinguish between invocations of an application,
583               without resorting to creating links  to  alter  the  executable
584               file name.
585
586       -rv, -reverse
587               Either  option  indicates  that  the  program  should  simulate
588               reverse video if possible, often by swapping the foreground and
589               background colors.  Not all programs honor this or implement it
590               correctly.  It is usually only used on monochrome displays.
591
592       +rv
593               This option indicates that  the  program  should  not  simulate
594               reverse  video.   This  is  used to override any defaults since
595               reverse video doesn't always work properly.
596
597       -selectionTimeout
598               This option specifies the timeout in milliseconds within  which
599               two  communicating applications must respond to one another for
600               a selection request.
601
602       -synchronous
603               This option indicates that requests to the X server  should  be
604               sent synchronously, instead of asynchronously.  Since Xlib nor‐
605               mally buffers requests to the server, errors do not necessarily
606               get  reported  immediately after they occur.  This option turns
607               off the buffering so that the application can be debugged.   It
608               should never be used with a working program.
609
610       -title string
611               This  option  specifies  the  title to be used for this window.
612               This information is sometimes used by a window manager to  pro‐
613               vide some sort of header identifying the window.
614
615       -xnllanguage language[_territory][.codeset]
616               This  option specifies the language, territory, and codeset for
617               use in resolving resource and other filenames.
618
619       -xrm resourcestring
620               This option specifies a resource name and value to override any
621               defaults.   It  is  also very useful for setting resources that
622               don't have explicit command line arguments.
623

RESOURCES

625       To make the tailoring of applications to personal preferences easier, X
626       provides  a  mechanism for storing default values for program resources
627       (e.g. background color, window title, etc.) that is  used  by  programs
628       that  use  toolkits  based  on  the X Toolkit Intrinsics library libXt.
629       (Programs using the common Gtk+ and Qt toolkits use other configuration
630       mechanisms.)   Resources are specified as strings that are read in from
631       various places when an application  is  run.   Program  components  are
632       named  in a hierarchical fashion, with each node in the hierarchy iden‐
633       tified by a class and an instance name.  At the top level is the  class
634       and  instance name of the application itself.  By convention, the class
635       name of the application is the same as the program name, but with   the
636       first  letter capitalized (e.g. Bitmap or Emacs) although some programs
637       that begin with the letter ``x'' also capitalize the second letter  for
638       historical reasons.
639
640       The precise syntax for resources is:
641
642       ResourceLine    =       Comment | IncludeFile | ResourceSpec | <empty line>
643       Comment         =       "!" {<any character except null or newline>}
644       IncludeFile     =       "#" WhiteSpace "include" WhiteSpace FileName WhiteSpace
645       FileName        =       <valid filename for operating system>
646       ResourceSpec    =       WhiteSpace ResourceName WhiteSpace ":" WhiteSpace Value
647       ResourceName    =       [Binding] {Component Binding} ComponentName
648       Binding         =       "." | "*"
649       WhiteSpace      =       {<space> | <horizontal tab>}
650       Component       =       "?" | ComponentName
651       ComponentName   =       NameChar {NameChar}
652       NameChar        =       "a"-"z" | "A"-"Z" | "0"-"9" | "_" | "-"
653       Value           =       {<any character except null or unescaped newline>}
654
655       Elements  separated by vertical bar (|) are alternatives.  Curly braces
656       ({...}) indicate zero or more repetitions  of  the  enclosed  elements.
657       Square brackets ([...]) indicate that the enclosed element is optional.
658       Quotes ("...") are used around literal characters.
659
660       IncludeFile lines are interpreted by replacing the line with  the  con‐
661       tents  of the specified file.  The word "include" must be in lowercase.
662       The filename is interpreted relative to the directory of  the  file  in
663       which  the line occurs (for example, if the filename contains no direc‐
664       tory or contains a relative directory specification).
665
666       If a ResourceName contains a contiguous sequence of two or more Binding
667       characters,  the sequence will be replaced with single "." character if
668       the sequence contains only "." characters, otherwise the sequence  will
669       be replaced with a single "*" character.
670
671       A  resource  database  never  contains  more than one entry for a given
672       ResourceName.  If a resource file contains multiple lines with the same
673       ResourceName, the last line in the file is used.
674
675       Any  whitespace  character  before  or  after  the  name  or colon in a
676       ResourceSpec are ignored.  To allow a Value to begin  with  whitespace,
677       the  two-character sequence ``\space'' (backslash followed by space) is
678       recognized and replaced by a space  character,  and  the  two-character
679       sequence  ``\tab'' (backslash followed by horizontal tab) is recognized
680       and replaced by a horizontal tab character.  To allow a Value  to  con‐
681       tain  embedded newline characters, the two-character sequence ``\n'' is
682       recognized and replaced by a newline character.  To allow a Value to be
683       broken across multiple lines in a text file, the two-character sequence
684       ``\newline'' (backslash followed by newline) is recognized and  removed
685       from the value.  To allow a Value to contain arbitrary character codes,
686       the four-character sequence ``\nnn'', where each n is a digit character
687       in  the  range of ``0''-``7'', is recognized and replaced with a single
688       byte that contains the octal value specified by the sequence.  Finally,
689       the  two-character  sequence  ``\\''  is recognized and replaced with a
690       single backslash.
691
692       When an application looks for the value of a resource, it  specifies  a
693       complete  path  in  the  hierarchy, with both class and instance names.
694       However, resource values are usually given with only  partially  speci‐
695       fied names and classes, using pattern matching constructs.  An asterisk
696       (*) is a loose binding and is used to represent any number of interven‐
697       ing components, including none.  A period (.) is a tight binding and is
698       used to separate immediately adjacent components.  A question mark  (?)
699       is  used to match any single component name or class.  A database entry
700       cannot end in a loose binding; the final  component  (which  cannot  be
701       "?")  must  be  specified.   The lookup algorithm searches the resource
702       database for the entry that most closely matches (is most specific for)
703       the  full  name  and  class being queried.  When more than one database
704       entry matches the full name and class, precedence  rules  are  used  to
705       select just one.
706
707       The  full  name  and class are scanned from left to right (from highest
708       level in the hierarchy to lowest), one component at a  time.   At  each
709       level,  the  corresponding  component  and/or  binding of each matching
710       entry is determined, and these matching  components  and  bindings  are
711       compared  according  to precedence rules.  Each of the rules is applied
712       at each level, before moving to the next level, until a rule selects  a
713       single entry over all others.  The rules (in order of precedence) are:
714
715       1.   An  entry that contains a matching component (whether name, class,
716            or "?")  takes precedence over entries that elide the level  (that
717            is, entries that match the level in a loose binding).
718
719       2.   An  entry  with a matching name takes precedence over both entries
720            with a matching class and entries that match using "?".  An  entry
721            with  a  matching  class  takes precedence over entries that match
722            using "?".
723
724       3.   An entry preceded by a tight binding takes precedence over entries
725            preceded by a loose binding.
726
727       Programs  based  on  the X Toolkit Intrinsics obtain resources from the
728       following sources (other programs usually support some subset of  these
729       sources):
730
731       RESOURCE_MANAGER root window property
732               Any global resources that should be available to clients on all
733               machines should be stored in the RESOURCE_MANAGER  property  on
734               the  root  window  of  the first screen using the xrdb program.
735               This is frequently taken care of when  the  user  starts  up  X
736               through the display manager or xinit.
737
738       SCREEN_RESOURCES root window property
739               Any  resources  specific  to  a given screen (e.g. colors) that
740               should be available to clients on all machines should be stored
741               in  the  SCREEN_RESOURCES  property  on the root window of that
742               screen.  The xrdb program will sort resources automatically and
743               place  them  in RESOURCE_MANAGER or SCREEN_RESOURCES, as appro‐
744               priate.
745
746       application-specific files
747               Directories named by the environment variable  XUSERFILESEARCH‐
748               PATH  or  the  environment  variable XAPPLRESDIR (which names a
749               single directory and should end with a '/' on  POSIX  systems),
750               plus   directories   in   a   standard   place  (usually  under
751               /usr/share/X11/, but this can be  overridden  with  the  XFILE‐
752               SEARCHPATH  environment variable) are searched for for applica‐
753               tion-specific  resources.   For  example,  application  default
754               resources  are  usually  kept  in /usr/share/X11/app-defaults/.
755               See the X Toolkit Intrinsics - C Language Interface manual  for
756               details.
757
758       XENVIRONMENT
759               Any  user-  and  machine-specific resources may be specified by
760               setting the XENVIRONMENT environment variable to the name of  a
761               resource  file to be loaded by all applications.  If this vari‐
762               able is not defined, a file named $HOME/.Xdefaults-hostname  is
763               looked  for  instead,  where  hostname  is the name of the host
764               where the application is executing.
765
766       -xrm resourcestring
767               Resources can also be specified from  the  command  line.   The
768               resourcestring  is  a  single  resource name and value as shown
769               above.  Note that if the string contains characters interpreted
770               by the shell (e.g., asterisk), they must be quoted.  Any number
771               of -xrm arguments may be given on the command line.
772
773       Program resources are organized into groups  called  classes,  so  that
774       collections   of   individual  resources  (each  of  which  are  called
775       instances) can be set all at once.  By convention, the instance name of
776       a  resource begins with a lowercase letter and class name with an upper
777       case letter.  Multiple word resources are concatenated with  the  first
778       letter  of the succeeding words capitalized.  Applications written with
779       the X Toolkit Intrinsics will have at least the following resources:
780
781       background (class Background)
782               This resource specifies the color to use for the  window  back‐
783               ground.
784
785       borderWidth (class BorderWidth)
786               This  resource specifies the width in pixels of the window bor‐
787               der.
788
789       borderColor (class BorderColor)
790               This resource specifies the color to use for the window border.
791
792       Most applications using the X Toolkit Intrinsics also have the resource
793       foreground (class Foreground), specifying the color to use for text and
794       graphics within the window.
795
796       By combining class and instance specifications, application preferences
797       can be set quickly and easily.  Users of color displays will frequently
798       want to set Background and Foreground classes to  particular  defaults.
799       Specific  color  instances  such as text cursors can then be overridden
800       without having to define all of the related resources.  For example,
801
802           bitmap*Dashed:  off
803           XTerm*cursorColor:  gold
804           XTerm*multiScroll:  on
805           XTerm*jumpScroll:  on
806           XTerm*reverseWrap:  on
807           XTerm*curses:  on
808           XTerm*Font:  6x10
809           XTerm*scrollBar: on
810           XTerm*scrollbar*thickness: 5
811           XTerm*multiClickTime: 500
812           XTerm*charClass:  33:48,37:48,45-47:48,64:48
813           XTerm*cutNewline: off
814           XTerm*cutToBeginningOfLine: off
815           XTerm*titeInhibit:  on
816           XTerm*ttyModes:  intr ^c erase ^? kill ^u
817           XLoad*Background: gold
818           XLoad*Foreground: red
819           XLoad*highlight: black
820           XLoad*borderWidth: 0
821           emacs*Geometry:  80x65-0-0
822           emacs*Background:  rgb:5b/76/86
823           emacs*Foreground:  white
824           emacs*Cursor:  white
825           emacs*BorderColor:  white
826           emacs*Font:  6x10
827           xmag*geometry: -0-0
828           xmag*borderColor:  white
829
830       If these resources were stored in a file  called  .Xresources  in  your
831       home  directory,  they  could be added to any existing resources in the
832       server with the following command:
833
834           % xrdb -merge $HOME/.Xresources
835
836       This is frequently how user-friendly startup  scripts  merge  user-spe‐
837       cific  defaults  into any site-wide defaults.  All sites are encouraged
838       to set up convenient ways of automatically loading resources.  See  the
839       Xlib manual section Resource Manager Functions for more information.
840

ENVIRONMENT

842       DISPLAY
843              This  is  the only mandatory environment variable. It must point
844              to an X server. See section "Display Names" above.
845
846       XAUTHORITY
847              This must point to a file that contains authorization data.  The
848              default   is   $HOME/.Xauthority.  See  Xsecurity(7),  xauth(1),
849              xdm(1), Xau(3).
850
851       ICEAUTHORITY
852              This must point to a file that contains authorization data.  The
853              default is $HOME/.ICEauthority.
854
855       LC_ALL, LC_CTYPE, LANG
856              The  first non-empty value among these three determines the cur‐
857              rent locale's facet for character handling,  and  in  particular
858              the   default   text   encoding.  See  locale(7),  setlocale(3),
859              locale(1).
860
861       XMODIFIERS
862              This variable can  be  set  to  contain  additional  information
863              important  for  the  current  locale  setting.  Typically set to
864              @im=<input-method> to enable  a  particular  input  method.  See
865              XSetLocaleModifiers(3).
866
867       XLOCALEDIR
868              This  must point to a directory containing the locale.alias file
869              and Compose and XLC_LOCALE file hierarchies for all locales. The
870              default value is /usr/share/X11/locale.
871
872       XENVIRONMENT
873              This must point to a file containing X resources. The default is
874              $HOME/.Xdefaults-<hostname>.  Unlike  $HOME/.Xresources,  it  is
875              consulted each time an X application starts.
876
877       XFILESEARCHPATH
878              This  must  contain  a  colon  separated list of path templates,
879              where libXt will search for resource files.  The  default  value
880              consists of
881
882                  /etc/X11/%L/%T/%N%C%S:\
883                  /etc/X11/%l/%T/%N%C%S:\
884                  /etc/X11/%T/%N%C%S:\
885                  /etc/X11/%L/%T/%N%S:\
886                  /etc/X11/%l/%T/%N%S:\
887                  /etc/X11/%T/%N%S:\
888                  /usr/share/X11/%L/%T/%N%C%S:\
889                  /usr/share/X11/%l/%T/%N%C%S:\
890                  /usr/share/X11/%T/%N%C%S:\
891                  /usr/share/X11/%L/%T/%N%S:\
892                  /usr/share/X11/%l/%T/%N%S:\
893                  /usr/share/X11/%T/%N%S:\
894                  /usr/lib/X11/%L/%T/%N%C%S:\
895                  /usr/lib/X11/%l/%T/%N%C%S:\
896                  /usr/lib/X11/%T/%N%C%S:\
897                  /usr/lib/X11/%L/%T/%N%S:\
898                  /usr/lib/X11/%l/%T/%N%S:\
899                  /usr/lib/X11/%T/%N%S
900
901              A path template is transformed to a pathname by substituting:
902
903                  %D => the implementation-specific default path
904                  %N => name (basename) being searched for
905                  %T => type (dirname) being searched for
906                  %S => suffix being searched for
907                  %C => value of the resource "customization"
908                        (class "Customization")
909                  %L => the locale name
910                  %l => the locale's language (part before '_')
911                  %t => the locale's territory (part after '_` but before '.')
912                  %c => the locale's encoding (part after '.')
913
914       XUSERFILESEARCHPATH
915              This  must  contain  a  colon  separated list of path templates,
916              where libXt will search for user dependent resource  files.  The
917              default value is:
918
919                  $XAPPLRESDIR/%L/%N%C:\
920                  $XAPPLRESDIR/%l/%N%C:\
921                  $XAPPLRESDIR/%N%C:\
922                  $HOME/%N%C:\
923                  $XAPPLRESDIR/%L/%N:\
924                  $XAPPLRESDIR/%l/%N:\
925                  $XAPPLRESDIR/%N:\
926                  $HOME/%N
927
928              $XAPPLRESDIR defaults to $HOME, see below.
929
930              A path template is transformed to a pathname by substituting:
931
932                  %D => the implementation-specific default path
933                  %N => name (basename) being searched for
934                  %T => type (dirname) being searched for
935                  %S => suffix being searched for
936                  %C => value of the resource "customization"
937                        (class "Customization")
938                  %L => the locale name
939                  %l => the locale's language (part before '_')
940                  %t => the locale's territory (part after '_` but before '.')
941                  %c => the locale's encoding (part after '.')
942
943       XAPPLRESDIR
944              This  must  point  to a base directory where the user stores the
945              application dependent  resource  files.  The  default  value  is
946              $HOME. Only used if XUSERFILESEARCHPATH is not set.
947
948       XKEYSYMDB
949              This  must point to a file containing nonstandard keysym defini‐
950              tions.  The default value is /usr/share/X11/XKeysymDB.
951
952       XCMSDB This must point to a color name database file. The default value
953              is
954               /usr/lib/X11/Xcms.txt.
955
956       RESOURCE_NAME
957              This  serves  as  main identifier for resources belonging to the
958              program being executed. It defaults to the basename of  pathname
959              of the program.
960
961       SESSION_MANAGER
962              Denotes the session manager to which the application should con‐
963              nect. See xsm(1), rstart(1).
964
965       XF86BIGFONT_DISABLE
966              Setting  this  variable  to  a  non-empty  value  disables   the
967              XFree86-Bigfont  extension.  This  extension  is  a mechanism to
968              reduce the memory consumption of big fonts by use of shared mem‐
969              ory.
970
971       XKB_FORCE
972       XKB_DISABLE
973       XKB_DEBUG
974       _XKB_CHARSET
975       _XKB_LOCALE_CHARSETS
976       _XKB_OPTIONS_ENABLE
977       _XKB_LATIN1_LOOKUP
978       _XKB_CONSUME_LOOKUP_MODS
979       _XKB_CONSUME_SHIFT_AND_LOCK
980       _XKB_IGNORE_NEW_KEYBOARDS
981       _XKB_CONTROL_FALLBACK
982       _XKB_COMP_LED _XKB_COMP_FAIL_BEEP
983
984       These variables influence the X Keyboard Extension.
985

EXAMPLES

987       The  following  is a collection of sample command lines for some of the
988       more frequently used commands.  For more information  on  a  particular
989       command, please refer to that command's manual page.
990
991           %  xrdb $HOME/.Xresources
992           %  xmodmap -e "keysym BackSpace = Delete"
993           %  mkfontdir /usr/local/lib/X11/otherfonts
994           %  xset fp+ /usr/local/lib/X11/otherfonts
995           %  xmodmap $HOME/.keymap.km
996           %  xsetroot -solid 'rgbi:.8/.8/.8'
997           %  xset b 100 400 c 50 s 1800 r on
998           %  xset q
999           %  twm
1000           %  xmag
1001           %  xclock -geometry 48x48-0+0 -bg blue -fg white
1002           %  xeyes -geometry 48x48-48+0
1003           %  xbiff -update 20
1004           %  xlsfonts '*helvetica*'
1005           %  xwininfo -root
1006           %  xdpyinfo -display joesworkstation:0
1007           %  xhost -joesworkstation
1008           %  xrefresh
1009           %  xwd | xwud
1010           %  bitmap companylogo.bm 32x32
1011           %  xcalc -bg blue -fg magenta
1012           %  xterm -geometry 80x66-0-0 -name myxterm $*
1013

DIAGNOSTICS

1015       A  wide  variety of error messages are generated from various programs.
1016       The default error handler in Xlib (also used  by  many  toolkits)  uses
1017       standard  resources to construct diagnostic messages when errors occur.
1018       The   defaults   for   these   messages   are   usually    stored    in
1019       usr/share/X11/XErrorDB.   If  this  file is not present, error messages
1020       will be rather terse and cryptic.
1021
1022       When the X Toolkit  Intrinsics  encounter  errors  converting  resource
1023       strings  to the appropriate internal format, no error messages are usu‐
1024       ally printed.  This is convenient when it is desirable to have one  set
1025       of  resources  across a variety of displays (e.g. color vs. monochrome,
1026       lots of fonts vs. very few, etc.), although it can  pose  problems  for
1027       trying to determine why an application might be failing.  This behavior
1028       can be overridden by the setting the StringConversionWarnings resource.
1029
1030       To force the X Toolkit Intrinsics to  always  print  string  conversion
1031       error  messages,  the  following  resource should be placed in the file
1032       that gets loaded onto the RESOURCE_MANAGER property using the xrdb pro‐
1033       gram  (frequently called .Xresources or .Xres in the user's home direc‐
1034       tory):
1035
1036           *StringConversionWarnings: on
1037
1038       To have conversion messages printed for just a particular  application,
1039       the appropriate instance name can be placed before the asterisk:
1040
1041           xterm*StringConversionWarnings: on
1042

SEE ALSO

1044       XOrgFoundation(7), XStandards(7), Xsecurity(7), appres(1), bdftopcf(1),
1045       bitmap(1), editres(1), fsinfo(1), fslsfonts(1), fstobdf(1), iceauth(1),
1046       imake(1), makedepend(1), mkfontdir(1), oclock(1), proxymngr(1), rgb(1),
1047       resize(1), rstart(1), smproxy(1), twm(1),  x11perf(1),  x11perfcomp(1),
1048       xauth(1),  xclipboard(1),  xclock(1),  xcmsdb(1),  xconsole(1), xdm(1),
1049       xdpyinfo(1),  xfd(1),   xfindproxy(1),   xfs(1),   xfwp(1),   xhost(1),
1050       xinit(1),  xkbbell(1), xkbcomp(1), xkbevd(1), xkbprint(1), xkbvleds(1),
1051       xkbwatch(1),  xkill(1),  xlogo(1),  xlsatoms(1),  xlsclients(1),   xls‐
1052       fonts(1),  xmag(1), xmh(1), xmodmap(1), xprop(1), xrdb(1), xrefresh(1),
1053       xrx(1), xset(1), xsetroot(1), xsm(1),  xstdcmap(1),  xterm(1),  xwd(1),
1054       xwininfo(1),   xwud(1).    Xserver(1),   Xorg(1),  Xdmx(1),  Xephyr(1),
1055       Xnest(1), Xquartz(1), Xvfb(1), Xvnc(1), XWin(1).  Xlib - C  Language  X
1056       Interface, and X Toolkit Intrinsics - C Language Interface
1057

TRADEMARKS

1059       X Window System is a trademark of The Open Group.
1060

AUTHORS

1062       A  cast of thousands, literally.  Releases 6.7 and later are brought to
1063       you by the X.Org Foundation. The names of all  people  who  made  it  a
1064       reality will be found in the individual documents and source files.
1065
1066       Releases  6.6  and  6.5  were done by The X.Org Group.  Release 6.4 was
1067       done by The X Project Team.  The Release 6.3 distribution was from  The
1068       X  Consortium,  Inc.  The staff members at the X Consortium responsible
1069       for that release were: Donna Converse (emeritus), Stephen Gildea (emer‐
1070       itus),  Kaleb  Keithley,  Matt Landau (emeritus), Ralph Mor (emeritus),
1071       Janet O'Halloran, Bob Scheifler, Ralph Swick, Dave Wiggins  (emeritus),
1072       and Reed Augliere.
1073
1074       The X Window System standard was originally developed at the Laboratory
1075       for Computer Science at the Massachusetts Institute of Technology,  and
1076       all  rights  thereto  were  assigned  to the X Consortium on January 1,
1077       1994.  X Consortium, Inc. closed its doors on December 31,  1996.   All
1078       rights to the X Window System have been assigned to The Open Group.
1079
1080
1081
1082X Version 11                    xorg-docs 1.7.1                           X(7)
Impressum