Synopses & Reviews
As X moves out of the hacker's domain and into the "real world," users can't be expected to master all the ins and outs of setting up and administering their own X software. That will increasingly become the domain of system administrators. Even for experienced system administrators, X raises many issues, both because of subtle changes in the standard UNIX way of doing things and because X blurs the boundaries between different platforms. Under X, users can run applications across the network on systems with different resources (including fonts, colors, and screen size). Many of these issues are poorly understood, and the technology for dealing with them is in rapid flux.This book is the first and only book devoted to the issues of system administration for X and X-based networks, written not just for UNIX system administrators but for anyone faced with the job of administering X (including those running X on stand-alone workstations). The book includes:
- An overview of X that focuses on issues that affect the system administrator's job.
- Information on obtaining, compiling, and installing the X software, including a discussion of the trade-offs between vendor-supplied and the free MIT versions of X.
- How to set up xdm, the X display manager, which takes the place of the login program under X and can be used to create a customized turnkey X session for each user.
- How to set up user accounts under X (includes a comparison of the familiar shell setup files and programs to the new mechanisms provided by X).
- Issues involved in making X more secure. X's security features are not strong, but an understanding of what features are available can be very important, since X makes it possible for users to intrude on each other in new and sometimes unexpected ways.
- How fonts are used by X, including a description of the font server.
- A discussion of the issues raised by running X on heterogenous networks.
- How colors are managed under X and how to get the same colors across multiple devices with different hardware characteristics.
- The administration issues involved in setting up and managing an X terminal.
- How to use PC and Mac X servers to maximize reuse of existing hardware and convert outdated hardware into X terminals.
- How to obtain and install additional public domain software and patches for X.
- Covers features new in R5, including the font server and Xcms.
Synopsis
As X moves out of the hacker's domain and into the "real world," users can't be expected to master all the ins and outs of setting up and administering their own X software. That will increasingly become the domain of system administrators. Even for experienced system administrators, X raises many issues, both because of subtle changes in the standard UNIX way of doing things and because X blurs the boundaries between different platforms. Under X, users can run applications across the network on systems with different resources (including fonts, colors, and screen size). Many of these issues are poorly understood, and the technology for dealing with them is in rapid flux. This book is the first and only book devoted to the issues of system administration for X and X-based networks, written not just for UNIX system administrators, but for anyone faced with the job of administering X (including those running X on stand-alone workstations).
Synopsis
This book is the first and only book devoted to the issues of system administration for X and X-based networks, written not just for UNIX system administrators but for anyone faced with the job of administering X (including those running X on stand-alone workstations).
About the Author
Linda Mui started working for O'Reilly & Associates in 1986. She was first hired as a production assistant, later became an apprentice system administrator, and now is a writer. Her first writing job was for termcap and terminfo, which she co-authored with John Strang and Tim O'Reilly. She also wrote Pick BASIC, on programming applications for Pick systems. In between writing jobs, Linda works on troff macros and tools for the O'Reilly & Associates production staff. Linda was raised in the Bronx, New York and now lives in Cambridge, Massachusetts. Lately she has been trying to improve herself by learning how to swim, play billiards, and accessorize.
Eric Pearce is an author and technical resource for O'Reilly & Associates. In addition to co-authoring this book, he is also responsible for developing CD-ROM companion disks for books produced by O'Reilly & Associates. Eric's interests include promoting public domain software, Internet connectivity, and network services. Before coming to work for O'Reilly & Associates, Eric worked as a systems programmer for Boston University, which he also attended as a student. His favorite activities include bicycling, snowboarding, rock climbing, and dangerous sports.
Table of Contents
Table of Contents
Preface
How to Use this Book
Assumptions
Related Documents
Font Conventions Used in This Book
Request for Comments
Bulk Sales Information
Acknowledgments
Chapter 1. An Introduction to X Administration
1.1 The Design of X11
1.1.1 Display Servers
1.1.2 Clients and Resources
1.1.3 Toolkits and GUIs
1.2 X Administration
1.2.1 Installing X
1.2.2 Supporting Users
1.2.3 Maintaining Software
1.2.4 Maintaining Multiple Machines
1.2.5 A Philosophy of X Administration
Chapter 2. The X User Environment
2.1 The Configured X Session
2.1.1 The Twilight Zone
2.2 Components of the X Environment
2.2.1 Window Managers
2.2.2 Customizing Clients
2.2.2.1 The -fn Command-line Option
2.2.2.2 The -geometry Command-line Option
2.2.2.3 Specifying Colors
2.2.2.4 Using Resources
2.2.3 The Startup Script
2.2.3.1 The Foreground Process
2.3 The Shell Environment
2.3.1 Setting the DISPLAY Variable
2.3.1.1 Complications with Display Names
2.3.2 Redefining the Search Path
2.3.2.1 Setting the Search Path for OpenWindows Support
2.3.2.2 Setting the Search Path for Mixed Environments
2.3.3 xterm Issues
2.3.3.1 xterm and Terminal Emulation
2.3.3.2 The Resize Client
2.3.3.3 xterm and the Login Shell (C Shell)
2.3.4 Starting Remote Clients
2.3.4.1 Starting a Remote Client with rsh
2.4 Startup Methods
2.4.1 xinit and startx
2.4.2 Differences Between .xinitrc and .xsession
2.5 Related Documentation
Chapter 3. The X Display Manager
3.1 xdm Concepts
3.2 xdm Configuration Files
3.3 xdm the Easy Way
3.4 Troubleshooting xdm
3.5 Customizing xdm
3.5.1 The Master Configuration File (xdm-config)
3.5.2 Listing X Servers (the Xservers File)
3.5.2.1 Xservers Syntax
3.5.3 xdm Host Access Control: the Xaccess File (R5 Only)
3.5.3.1 Direct and Broadcast Access
3.5.3.2 Indirect Access and the Chooser
3.5.3.3 Using Macros
3.5.3.4 Advantages and Disadvantages of the Chooser
3.5.4 The Xresources File
3.5.4.1 Configuring the Login Box
3.5.4.2 The xconsole Client
3.5.5 Starting Up Individual X Sessions (the Xsession File)
3.5.5.1 No Home Directory? (R5)
3.5.6 Display Classes
3.6 Testing Your xdm Setup
3.6.1 Resetting the Keyboard
3.6.2 Restarting xdm Using xdm-pid (R4 and Later)
3.6.3 Rereading XDM Configuration Files (R3)
3.7 Permanent Installation of xdm
3.8 Related Documentation
Chapter 4. Security
4.1 Host-based Access Control
4.1.1 The /etc/Xn.hosts File
4.1.2 The xhost Client
4.1.3 Problems with Host-based Access Control
4.2 Access Control with MIT-MAGIC-COOKIE-1
4.2.1 Using MIT-MAGIC-COOKIE-1 with xdm
4.2.2 The xauth Program
4.2.3 Using MIT-MAGIC-COOKIE with xinit
4.2.4 xauth vs. xhost
4.3 The XDM-AUTHORIZATION-1 Mechanism (R5)
4.4 The SUN-DES-1 Mechanism (R5)
4.4.1 Public Key Encryption
4.4.2 Prerequisites for Using SUN-DES-1
4.4.3 Using SUN-DES-1 with xdm
4.4.4 Using SUN-DES-1 with xinit
4.4.5 Adding Another User with SUN-DES-1
4.4.6 xterm and SUN-DES-1
4.4.7 Troubleshooting SUN-DES-1
4.5 xterm and Secure Keyboard
4.6 Other Security Issues
4.6.1 The Console xterm (R4 and Earlier)
4.6.2 The Console and xdm (R5)
4.6.3 Hanging the Server Remotely (R3)
4.6.4 Reading the Framebuffer (Sun Workstations)
4.6.5 Removing Files in /tmp
4.6.6 The Network Design
4.7 Related Documentation
Chapter 5. Font Management
5.1 Fonts on the X Window System
5.1.1 xlsfonts
5.1.2 xfd
5.1.3 xfontsel
5.1.4 The Font Path
5.1.5 The Font Directory File
5.1.6 The fonts.scale File (R5 only)
5.1.7 Wildcards
5.1.8 Aliases
5.1.8.1 The FILE_NAMES_ALIAS Alias
5.2 All About Fonts
5.2.1 Bitmap Versus Outline Fonts
5.2.2 Font Formats
5.2.3 Format Conversion Tools
5.3 Adding New Fonts
5.3.1 Adding a Single Font
5.3.2 Adding Multiple Fonts
5.3.2.1 Multiple Font Example
5.3.3 Problems with Running Vendor-specific Clients
5.3.4 DECWindows Examples
5.3.4.1 Aliasing
5.3.4.2 DECWindows Conversion
5.3.5 AIXWindows Example
5.3.6 OpenWindows Example
5.3.6.1 Aliasing
5.3.6.2 OpenWindows Conversion
5.3.6.3 Converting from X11/NeWS to PCF or SNF
5.3.6.4 More Conversions
5.4 Providing Fonts Over the Network
5.5 The R5 Font Server
5.5.1 The Configuration File
5.5.2 Installing the Font Server
5.5.2.1 Testing By Hand
5.5.2.2 Changing BSD Boot Files
5.5.2.3 Changing System V Boot Files
5.5.2.4 Changing AIX Boot Files
5.5.3 Font Server Name Syntax
5.5.4 Debugging the Font Server
5.5.5 Font Server Clients
5.5.6 The Font Path and the Font Server
5.5.7 Hostname Aliases
5.5.8 A Font Server Example
5.6 Related Documentation
Chapter 6. Color
6.1 Color Specification in Release 4 and Earlier
6.1.1 RGB Color Names
6.1.2 Numeric Color Values
6.1.3 Adding Your Own Color Names (RGB)
6.1.4 Fixing a Corrupted Color Database
6.2 Color Specification in Release 5 (Xcms)
6.2.1 Xcms Color Names
6.2.2 Adding Your Own Color Names in Xcms
6.2.3 Xcms Database Example
6.2.4 Device Profiles
6.3 Related Documentation
Chapter 7. X Terminals
7.1 Buying an X Terminal: What's What
7.1.1 Monitors
7.1.1.1 Screen Size
7.1.1.2 Resolution
7.1.1.3 Depth
7.1.1.4 Refresh Rate
7.1.2 Keyboard and Mouse
7.1.3 X Server Software
7.1.4 Special Features
7.1.5 Memory Configuration
7.1.6 Network Interface
7.2 X Terminal Setup
7.3 Network Setup
7.3.1 Getting the IP Address Using RARP
7.3.2 Getting Information Using BOOTP
7.3.3 Trivial File Transfer Protocol (TFTP)
7.3.4 Setting Up the Network on the X Terminal
7.3.5 Debugging Hints
7.3.5.1 Error Messages
7.3.5.2 Updating the arp Table
7.3.5.3 Name Server Problems
7.4 Fonts on X Terminals
7.4.1 Font Formats
7.4.2 The Font Server (R5)
7.4.3 Choosing TFTP or NFS for Font Access
7.4.3.1 Reading Fonts Using TFTP
7.4.3.2 Reading Fonts Using NFS
7.5 Configuring for the X Display Manager
7.5.1 Configuring the X Terminal for xdm
7.5.2 Configuring an R5 Host
7.5.3 Configuring an R4 Host
7.5.4 Configuring xdm Without XDMCP
7.5.5 Setting Up Server Access Control
7.6 Remote Configuration of X Terminals
7.6.1 Remote Configuration on NCD Terminals
7.6.2 Remote Configuration on Visual Terminals
7.6.3 Remote Configuration on Tektronix Terminals
7.7 Reconfiguring the Host
7.7.1 Increasing the Number of Processes
7.7.2 Increasing the Number of Pseudo-ttys
7.7.3 Increasing the Amount of Swap Space
7.7.3.1 Swapping to a File
7.7.3.2 Swapping to a Disk
7.8 Related Documentation
Chapter 8. Building the X Window System
8.1 Installation Issues
8.1.1 Should You Use MIT Source?
8.1.2 Types of Vendor-supplied X Distributions
8.1.2.1 X from Your OS Vendor
8.1.2.2 X from a Third Party
8.1.3 X Source Code from MIT
8.1.4 Complete or Client-only Distribution?
8.1.5 Installing Multiple X Releases
8.2 Source Preparation
8.2.1 Do You Have Enough Disk Space?
8.2.2 Is Your Platform Supported?
8.2.3 Applying OS Patches
8.2.4 Applying X Patches
8.2.5 Creating a Link Tree (Optional)
8.3 Simplest Case Build
8.4 Host Problems
8.4.1 Disk Space
8.4.1.1 Changing the tmp Directory Using TMPDIR (Ultrix and HP-UX) 199
8.4.1.2 Changing the tmp Directory Using -temp (SunOS)
8.4.2 Shared Library Installation (SunOS)
8.4.3 NFS Installation
8.4.3.1 NFS Installation Without Root Access
8.4.3.2 Installation Over the Network (rdist)
8.4.4 Installing the termcap or terminfo Definition for xterm
8.5 Simple Configuration
8.5.1 Configuration Parameters
8.5.1.1 site.def
8.5.1.2 The ProjectRoot Flag
8.5.1.3 The Platform Configuration File (platform.cf)
8.5.2 Configuration Example 1
8.5.3 Configuration Example 2
8.5.4 Configuration Example 3
8.5.5 Configuration Example 4
8.5.6 Configuration Example 5
8.5.7 Other Build Flags
8.5.7.1 Xterm Build Flags
8.6 Building Programs After X Is Installed
8.6.1 xmkmf
8.6.2 Include Files
8.6.3 Libraries
8.7 More About imake
8.7.1 The make Program
8.7.2 The C Preprocessor
8.7.3 Imake Syntax
8.7.3.1 Comments in imake
8.7.3.2 Multi-line Macros (@@)
8.7.3.3 Concatenating Macros
8.7.3.4 Dealing with Tabs
8.7.4 imake Configuration Files
8.7.4.1 A Quick Tour of Files Used by imake
8.7.5 Using imake to Build X11
8.8 Porting Hints
8.8.1 Undefined Symbols or Functions
8.8.1.1 Missing Header Files
8.8.1.2 Missing Function Definitions
8.8.2 Searching for Preprocessor Symbols
8.9 Related Documentation
Appendix A. Useful Things to Know
A.1 The comp.windows.x Newsgroup
A.2 How to ftp a File
A.2.1 Getting Files Using ftpmail
A.2.2 BITFTP
A.3 The xstuff Mail Archive Server
A.4 Unpacking Files
A.5 Making a Filesystem Available via NFS
A.6 How to Add a Host
A.6.1 Adding a Host to /etc/hosts
A.6.2 Adding a Host Using NIS
A.6.3 DNS
A.7 Adding an Ethernet Address
A.8 Printing Documentation in the MIT X Distribution
A.9 Converting a Number Into Hexadecimal and Back
A.10 Configuring a Sun as an X terminal
A.11 Using More than One Frame Buffer Under SunOS
Appendix B. Compiling Public Domain Software
B.1 Finding the Sources
B.1.1 Using an Archie Server
B.1.2 Get the FAQ
B.1.3 The Usual Suspects
B.2 An Example: xarchie
B.2.1 Getting the xarchie Sources
B.2.2 Untarring the Sources
B.2.3 Editing the Imakefile
B.2.4 Compiling the Source
B.3 Using Patches
B.4 Another Example: xkeycaps
B.5 Related Documentation
Appendix C. X on Non-UNIX Platforms
C.1 X on DOS-based PCs
C.1.1 Requirements for PC X Servers
C.1.2 Installing and Configuring PC X Servers
C.1.3 Problems Particular to PC X Servers
C.2 X on Macintosh Computers
C.2.1 Macintosh-based X Servers
C.2.2 MacTCP and the Communications Toolbox
C.3 X on NeXT Computers
Appendix D. Resources and Keysym Mappings
D.1 Using Resources
D.1.1 Resource Definition Syntax
D.1.1.1 Loose and Tight Bindings
D.1.1.2 The -name Command-line Option
D.1.1.3 xterm Versus XTerm
D.1.2 Where Resources Are Defined
D.1.3 Advantages of xrdb
D.1.4 Translation Tables
D.2 Defining Keys and Button Presses With xmodmap
D.2.1 Using xev to Learn Keysym Mappings
D.3 Related Documentation
Appendix E. The Components of X Products
E.1 MIT X11 Release 5
E.2 OSF/Motif
E.3 Sun OpenWindows
E.4 DECWindows
E.5 AIXWindows
E.6 Silicon Graphics
E.7 A Guide to X11 Libraries
Appendix F. Getting X11
F.1 Where Can I Get X11R5?
F.2 Where Can I Get Patches to X11R5?
F.3 Where Can I Get X11R4?
Appendix G. Error Messages
G.1 X Errors
G.2 UNIX Errors
G.3 Compilation Errors
Figures
1-1 An X server with clients from multiple hosts
2-1 A configured X session
2-2 A root menu
2-3 An unconfigured X session
2-4 Starting a new client
2-5 xclock window over xterm window
2-6 Starting the window manager
2-7 xterm window with new font
2-8 A window with a specified geometry
2-9 An xterm window in reverse video, decorated by twm
2-10 vi using only part of a window
2-11 Logging in with xdm
2-12 Starting the X server with xinit
3-1 xdm flow chart
3-2 Default xdm configuration files
3-3 xdm login box
3-4 Default xdm environment
3-5 XDMCP Direct, Indirect, and Broadcast queries
3-6 The chooser
3-7 An example chooser box
3-8 Chooser box with an R4 host
3-9 Adapted xlogin greeting
4-1 Host-based access control
4-2 XDMCP and the access code
4-3 User-based access control
4-4 Propagating the magic cookie between two hosts
5-1 Components of a font name
5-2 xfd
5-3 xfontsel
5-4 Font conversion utilities
5-5 dxcalendar with the wrong fonts
5-6 dxcalendar with aliases
5-7 cm without aliases
5-8 cm with aliases
6-1 Red, green, and blue color guns
6-2 Xcms vs. RGB color specification
6-3 xtici Edit menu
8-1 oclock without the SHAPE extension
8-2 oclock with the SHAPE extension
8-3 Recursive make
8-4 Files processed by imake
B-1 Xarchie window
B-2 xkeycaps window
D-1 xcalc
Tables
8-1 cpp Symbols
B-1 Archie Servers as of January 3, 1992
E-1 X Distribution Directories
E-2 MIT X11R5 Files
E-3 Motif Files (Motif 1.1.x)
E-4 OpenWindows Files (Sun4, SunOS 4.1.1)
E-5 OPEN LOOK Files
E-6 DECWindows Files (DecStation, Ultrix 4.2)
E-7 AIXWindows files (RS/6000, AIX 3.2)
E-8 Graphics X11 files (Indigo, IRIX 4.0)
F-1 North America anonymous ftp
F-2 Europe/Middle East/Australia anonymous ftp
F-3 Japan anonymous ftp
F-4 UUCP
F-5 Other File Transfer Methods