X − a Portable, Network-Transparent Window System the X Window
Total Page:16
File Type:pdf, Size:1020Kb
XX ( (55))XXVVeerrssiioonn1111XX((55)) RR ee ll ee aa ss ee 66..44 NN AA MM EE X−aportable, network-transparent windowsystem SS YY NN OO PP SS II SS The X WindowSystem is a network transparent windowsystem which runs on a wide range of computing and graphics machines. It should be relatively straight- forward to build the X WindowSystem software distribution on most ANSI C and POSIX compliant systems. Commercial implementations are also available for a wide range of platforms. The Open Group requests that the following names be used when referring to this software: X XWindowSystem XVersion 11 XWindowSystem, Version 11 X11 XWindow System is a trademark of The Open Group. DD EE SS CC RR II PP TT II OO NN XWindowSystem servers run on computers with bitmap displays. The server distributes user input to and accepts output requests from various client programs through a variety of different interprocess communi- cation channels. Although the most common case is for the client programs to be running on the same machine as the server,clients can be run transparently from other machines (including machines with dif- ferent architectures and operating systems) as well. Xsupports overlapping hierarchical subwindows and text and graphics operations, on both monochrome and color displays. Forafull explanation of the functions that are available, see the Xlib - C Language X Interface manual, the XWindow System Protocol specification, the XToolkit Intrinsics - C Language Inter- face manual, and various toolkit documents. The number of programs that use X is quite large. Programs provided in the core X WindowSystem distri- bution include: a terminal emulator, xterm;awindowmanager, twm;adisplay manager, xdm;aconsole redirect program, xconsole;amail interface, xmh;abitmap editor, bitmap;resource listing/manipulation tools, appres, editres;access control programs, xauth, xhost,and iceauth;user preference setting programs, xrdb, xcmsdb, xset, xsetroot, xstdcmap,and xmodmap;clocks, xclock and oclock;afont displayer,(xfd;util- ities for listing information about fonts, windows, and displays, xlsfonts, xwininfo, xlsclients, xdpyinfo, xlsatoms,and xprop;screen image manipulation utilities, xwd, xwud,and xmag;aperformance measure- ment utility, x11perf;afont compiler, bdftopcf;afont server and related utilities, xfs, fsinfo, fslsfonts, fstobdf;anXImage Extension exerciser, xieperf;adisplay server and related utilities, Xserver, rgb, mkfont- dir;remote execution utilities, rstart and xon;aclipboard manager, xclipboard;keyboard description com- piler and related utilities, xkbcomp, xkbprint, xkbbell, xkbevd, xkbvleds,and xkbwatch;autility to terminate clients, xkill;anoptimized X protocol proxy, lbxproxy;afirewall security proxy, xfwp;aproxy manager to control them, proxymngr;autility to find proxies, xfindproxy;Netscape Navigator Plug-ins, libxrx.so and libxrxnest.so;anRXMIME-type helper program, xrx;and a utility to cause part or all of the screen to be redrawn, xrefresh. Manyother utilities, windowmanagers, games, toolkits, etc. are included as user-contributed software in the X WindowSystem distribution, or are available using anonymous ftp on the Internet. See your site administrator for details. SS TT AARRTTIINNGGUUPP There are twomain ways of getting the X server and an initial set of client applications started. The partic- ular method used depends on what operating system you are running and whether or not you use other -1- Formatted: February 2, 1998 XX ( (55))XXVVeerrssiioonn1111XX((55)) RR ee ll ee aa ss ee 66..44 windowsystems in addition to X. xdm (the X Display Manager) If you want to always have X running on your display,your site administrator can set your machine up to use the X Display Manager xdm.This program is typically started by the system at boot time and takes care of keeping the server running and getting users logged in. If you are running xdm,you will see a windowonthe screen welcoming you to the system and asking for your username and password. Simply type them in as you would at a normal terminal, pressing the Return key after each. If you makeamistake, xdm will display an error message and ask you to try again. After you have successfully logged in, xdm will start up your X environment. By default, if you have anexecutable file named .xsession in your home directory, xdm will treat it as aprogram (or shell script) to run to start up your initial clients (such as terminal emulators, clocks, a windowmanager,user settings for things likethe background, the speed of the pointer, etc.). Your site administrator can provide details. xinit (run manually from the shell) Sites that support more than one windowsystem might choose to use the xinit program for start- ing X manually.Ifthis is true for your machine, your site administrator will probably have pro- vided a program named "x11", "startx", or "xstart" that will do site-specific initialization (such as loading convenient default resources, running a windowmanager,displaying a clock, and starting several terminal emulators) in a nice way.Ifnot, you can build such a script using the xinit pro- gram. This utility simply runs one user-specified program to start the server,runs another to start up anydesired clients, and then waits for either to finish. Since either or both of the user-speci- fied programs may be a shell script, this givessubstantial flexibility at the expense of a nice inter- face. For this reason, xinit is not intended for end users. DD II SS PP LL AA YY NN AA MM EE SS From the user’sperspective,every X server has a display name of the form: hostname:displaynumber.screennumber This information is used by the application to determine howitshould connect to the server and which screen it should use by default (on displays with multiple monitors): hostname The hostname specifies the name of the machine to which the display is physically connected. If the hostname is not given, the most efficient way of communicating to a server on the same machine will be used. displaynumber The phrase "display" is usually used to refer to collection of monitors that share a common keyboard and pointer (mouse, tablet, etc.). Most workstations tend to only have one keyboard, and therefore, only one display.Larger,multi-user systems, however, frequently have sev eral dis- plays so that more than one person can be doing graphics work at once. To avoid confusion, each display on a machine is assigned a display number (beginning at 0) when the X server for that display is started. The display number must always be giveninadisplay name. screennumber Some displays share a single keyboard and pointer among twoormore monitors. Since each monitor has its own set of windows, each screen is assigned a screen number (beginning at 0) when the X server for that display is started. If the screen number is not given, screen 0 will be used. On POSIX systems, the default display name is stored in your DISPLAYenvironment variable. This vari- able is set automatically by the xterm terminal emulator.Howev er, when you log into another machine on a -2- Formatted: February 2, 1998 XX ( (55))XXVVeerrssiioonn1111XX((55)) RR ee ll ee aa ss ee 66..44 network, you will need to set DISPLAYbyhand to point to your display.For example, %setenvDISPLAYmyws:0 $DISPLAY=myws:0; export DISPLAY The xon script can be used to start an X program on a remote machine; it automatically sets the DISPLAY variable correctly. Finally,most X programs accept a command line option of -display displayname to temporarily override the contents of DISPLAY. This is most commonly used to pop windows on another person'sscreen or as part of a "remote shell" command to start an xterm pointing back to your display.For example, %xeyes -display joesws:0 -geometry 1000x1000+0+0 %rsh big xterm -display myws:0 -ls </dev/null & Xservers listen for connections on a variety of different communications channels (network byte streams, shared memory,etc.). Since there can be more than one way of contacting a givenserver,The hostname part of the display name is used to determine the type of channel (also called a transport layer) to be used. Xservers generally support the following types of connections: local The hostname part of the display name should be the empty string. Forexample: :0, :1,and :0.1. The most ef®cient local transport will be chosen. TCP IP The hostname part of the display name should be the server machine'sIPaddress name. Full Internet names, abbreviated names, and IP addresses are all allowed. For example: x.org:0, expo:0, 198.112.45.11:0, bigmachine:1,and hydra:0.1. DECnet The hostname part of the display name should be the server machine'snodename, followed by twocolons instead of one. Forexample: myws::0, big::1,and hydra::0.1. AA CCCCEESSSSCCOONNTTRROOLL An X server can use several types of access control. Mechanisms provided in Release 6 are: Host Access Simple host-based access control. MIT-MAGIC-COOKIE-1 Shared plain-text "cookies". XDM-AUTHORIZATION-1 Secure DES based private-keys. SUN-DES-1 Based on Sun'ssecure rpc system. MIT-KERBEROS-5 Kerberos Version 5 user-to-user. Xdm initializes access control for the server and also places authorization information in a ®le accessible to the user.Normally,the list of hosts from which connections are always accepted should be empty,sothat only clients with are explicitly authorized can connect to the display.When you add entries to the host list (with xhost), the server no longer performs anyauthorization on connections from those machines. Be careful with this. The ®le from which Xlib extracts authorization data can be speci®ed with the environment variable XAU- THORITY,and defaults to the ®le .Xauthority in the home directory. Xdm uses $HOME/.Xauthority and will create it or merge in authorization records if it already exists when a user logs in.