Using the X Window System
Total Page:16
File Type:pdf, Size:1020Kb
Using the X Window System HP 9000 Series 300/800 Computers HP Part Number 98794-90001 Flin- HEWLETT ~~ PACKARD Hewlett-Packard Company 1000 NE Circle Blvd., Corvallis OR 97330 Notice The information contained in this document is subject to change without notice. HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MANUAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material. warranty A copy of the specific warranty terms applicable to your Hewlett-Packard product and replacement parts can be obtained from your local Sales and Service Office. UNIX is a registered trademark of AT&T in the USA and other countries. Courier, Helvetica, and Times © 1984, 1987 Adobe Systems, Inc. Portions © 1988 Digital Equipment Corporation. Helvetica is registered trademark of Linotype. Microsoft and Presentation Manager are registered trademarks of Microsoft. OSF /Motif is a trademark of the Open Software Foundation, Inc. in the USA and other countries. Certification of conformance with the OSF /Motif user environment is pending. © 1989 Hewlett-Packard Printing History The manual printing date and part number indicate its current edition. The printing date will change when a new edition is printed. Minor changes may be made at reprint without changing the printing date. The manual part number will change when extensive changes are made. Manual updates may be issued between editions to correct errors or document product changes. To ensure that you receive these updates or new editions, you should subscribe to the appropriate product support service. See your HP sales representative for details. December 1988 ... Edition 2 September 1989 ... Edition 3 iii Contents 1. How to Improve Your X Life How This Manual Is Organized 1-1 Conventions . 1-3 Running HP-UX: Some Tips . 1-4 What Is HP-UX and the X Window System? 1-4 Why Background Processing Is IInportant . 1-5 Case Sensitivity and Other Typographical Tips 1-5 Working with HP-UX Manuals 1-6 Logging In to HP-UX 1-6 For More Information 1-6 Where to Go Next 1-8 2. Understanding Window Systems What Is the X Window System? . 2-1 XII Is Based on the Server-Client Interaction Model 2-2 Multi-Tasking Makes XII a Powerful Tool . 2-3 X Allows Both Local and Remote Access ...... 2-3 The X Window System Allows Multi-Vendor Networking. 2-4 The Parts of a Typical X Window System 2-4 The Computer Hardware System 2-5 The SPU Does the Computing 2-5 The Hard Disk Stores Data 2-5 The Keyboard Enters Text . 2-5 The Pointing Device (Mouse) Points and Selects 2-6 The Screen Displays Output . 2-6 The LAN Connects to the Network . 2- 6 Other Pointing Devices ... 2- 7 The X Server Controls Communication 2- 7 The Window Manager Controls Your Windows 2-7 The Window and Root Menus . 2- 7 Contents-1 Icons . 2-8 Window Frame Decoration . 2-10 Application Programs Run in Your X Environment 2-10 Window-Smart Programs Are Called Clients 2-10 Terminal-Based Programs Must Be Fooled . 2-10 The Distributed Computing Environment . 2-12 Workstations Provide Local and Remote Processing . 2-13 Application Servers Handle Process-Intensive Applications 2-14 File Servers Supply Data Storage . ~ . 2-14 Print Servers Control the Printers. 2-15 Graphics Station for Specialized Graphics Applications 2-16 Multi-Vendor Communications 2-16 Where to Go Next ................ 2-17 3. Using the X Window System Starting the X Window System . 3-1 Command-Line Options for x11start . 3-2 Client Options 3-2 Server Options . 3-2 Examples ......... 3-2 Starting X on a Multi-Seat System 3-3 Starting Seat 0 . 3-3 Starting Seat 1 . .'. 3-3 What to Expect When X Starts 3-4 The Server Creates the Root Window 3-4 A Terminal Window Appears on the Root Window 3-4 What to Do If XII Doesn't Start 3-6 Working With Windows . 3-7 Which Mouse Button Does What . 3-8 The Anatomy of an mwm Window Frame 3-9 Activating a Window . 3-10 Displaying and Selecting from the Window Menu 3-11 U sing a Sticky Window Menu ...... 3-11 U sing a Pulldown Window Menu . 3-12 Using the Keyboard to Display the Window Menu 3-12 Window Manager Selections . 3-12 Moving a Window around the Screen . 3-13 Changing the Size of a Window 3-14 Contents-2 Raising a Window to the Top of the Window Stack 3-16 Iconifying a Window ...... 3-18 Turning an Icon Back into a Window . 3-20 More Work with Icons ........... 3-21 Displaying and Selecting from an Icon's Menu 3-21 Moving Icons around the Screen ..... 3-21 Displaying and Selecting from the Root Menu 3-22 Exiting From the X Window System ..... 3-23 Stopping Application Programs . 3-24 Following the Program's Normal Exit Procedure 3-24 Closing the Window . 3-24 Stopping the Window System 3-24 What Next .......... 3-25 4. Running from the Command Line Meeting the XII Clients . 4-2 What the XII Clients Do 4-2 Specifying the General Syntax for Command-Line Starts 4-4 Specifying the Syntax . 4-5 Choosing Background Processing 4-5 Starting Programs .... 4-6 Starting Local Clients . 4-6 Starting Local Non-Clients 4-6 Starting Remote Clients . 4-7 Gaining Remote Access 4- 7 Starting the Client 4-8 Selecting the Display 4-8 Examples of Starting Remote Clients 4-9 Example 1: Logging In to a Remote Host the Wrong Way 4-9 Example 2: Logging In before Running the Client in Background . 4-9 Example 3: Using a Remote Shell to Start a Client . 4-10 Starting Remote Non-Clients . 4-10 Example 1: Logging In to a Remote Host before Running the Non-Client . 4-11 Example 2: Starting a Window That Starts a Remote Non-Client . 4-11 Example 3: Starting a Remote Non-Client Window . 4-12 Contents-3 Stopping Programs . 4-12 Stopping Clients 4-12 Stopping Non-Clients 4-13 Killing Programs That Won't Stop 4-13 Other Ways to Stop a Program 4-13 Killing the Program's Process 4-13 Terminal Emulation Clients 4-14 Emulating an HP Terminal with the 'hpterm' Client. 4-14 Syntax .............. 4-15 Using 'hpterm' Terminal Window Softkeys 4-15 Coloring 'hpterm' Scrollbars . 4-16 Emulating a DEC or Tektronix Terminal. 4-16 Syntax ........ 4-16 Using 'xterm' Scroll Features .. 4-16 Using 'xterm' Menus ..... 4-17 Special Terminal Emulator Options 4-17 Making a Login Window . 4-17 Cutting and Pasting with the Mouse 4-17 To cut and paste using 'hpterm' 4-18 To cut and paste using 'xterm' 4-18 Scrollbars . 4-19 Window Titles and Icon Names 4-20 Telling Times with 'xclock' 4-20 Syntax ....... 4-20 Some 'xclock' Options . 4-21 Marking the Half Hours 4-21 Selecting the Clock Format . 4-21 Updating the Time . 4-21 Examples ........ 4-22 Viewing System Load with 'xload' 4-22 Syntax and Options . 4-22 Some 'xload' Options . 4-23 Updating the Load . 4-23 Scaling the Histogram Graph . 4-23 Example ......... 4-23 Working with Common Client Options 4-24 Color Options ... 4-24 Available Client Color Options 4-24 Contents-4 Using Hexadecimal Color Values on the Command Line 4-25 Examples . 4-25 Specifying Size and Location on the Command Line 4-26 The Syntax of the '-geometry' Option 4-26 Placing Clients on the Root Window 4-27 Example. .. 4-28 Specifying the Display on the Command Line . 4- 28 The Syntax for the '-display' Option . 4-28 Example. 4-29 Specifying the Font in the Command Line . 4-29 Working with Fonts 4-29 Example. 4-30 Where to Go Next 4-30 5. Customizing Your Local X Environment Before You Begin Customizing . 5-1 How to Begin Customizing . 5-2 Making Backup Copies of Your Work . 5-2 Making Incremental Changes . 5-2 Choosing a Text Editor 5-2 Where to Begin Customizing . 5-3 Customizing the Colors of Clients 5-3 Copying 'sys.Xdefaults' to '.Xdefaults' . 5-4 Changing Client Colors . 5-4 Determining Which Elements to Color 5-5 Syntax ...... 5-6 Examples ............ 5-6 What Colors Are Available . 5-7 Where to Find the Available Color Names 5-8 Determining Where to Color Your Environment 5-9 Coloring a Single Instance of a Client . 5-9 Coloring Windows that Start Automatically 5-9 Coloring Windows that Start from Menus 5-10 Coloring 'hpterm' Softkeys and Scrollbars 5-10 Changing the Clients that Start When You Start X 5-11 Copying 'sys.x11start' to '.x11start' . 5-11 Viewing XII Start Error Messages . 5-12 Starting a Different Window Manager 5-12 Contents-5 Starting Programs Automatically . 5-13 Syntax and Examples 5-13 Starting Clients. 5-13 Starting Non-Clients 5-14 Discovering Your Options 5-15 Starting XII at Login . 5-17 Modifying Login Files . 5-18 Finding Out Which Shell You Use 5-18 Edi ting the File. 5-18 Viewing the Result of Your Edit 5-19 Using the 'SAM' Program . 5-20 Creating Custom Bitmaps with 'bitmap' . 5-20 Syntax and Options . 5-20 Using 'bitmap' . 5-21 Examples ...... 5-25 Creating an Icon Image 5-25 Creating Root Window Tiles 5-26 Creating Custom Cursors and Masks 5-27 Customizing the Root Window with 'xsetroot' 5-30 Syntax and Options .