Download Volume Three X Window System User's Guide

Transcript
Volume Three
X Window System
User's Guide
OSF/Motif1.2 Edition
by Valerie Quercia and Tim O'Reilly
Technische Universifat Darmstadt
FACHBEREICH INFORMATIK
B 1 B L 1 O T H E K
Sachgabiate:
Slandort:
O'Reilly & Associates, Inc.
Table of Contents
Page
Preface
, XXV
Do I Have To Read This WHOLE Book?
A Quick Start Approach to X
Assumptions
What's New in Release 5?
New Client Programs
Defunct Programs
Clients that Work Differently in Release 4 and Release 5
Available Fonts
Available Colors
Screen-specific Resources
Bulk Sales Infonnation
Acknowledgements
Font and Character Conventions
xxv
xxv
xxviii
xxviii
xxviii
xxix
xxix
xxx
xxx
xxx
xxx
xxxi
xxxii
PART ONE: Using X
l
Chapter 1 An Introduction to the X Window System
5
Anatomy of an X Display
Standard X Clients versus Motif Clients
X Architecture Overview
The X Display Server
Clients
:
The Window Manager
The xterm Terminal Emulator
The Display Manager
Other Standard X Clients
Customizing Clients
'.
6
15
19
21
21
22
23
23
24
25
Chapter 2 Getting Started
29
Starting X
Logging On in the Special xdm Window
Logging In at a Full Screen Prompt
Starting X Manually
29
30
32
33
Starting the mwm Window Manager
Typing In a Window Once mwm is Running
34
35
Chapter 3 Working in the X Environment
41
Creating Other Windows
Using the Pointer
Managing Windows Using the mwm Frame
Converting a Window to an Icon
Converting an Icon to a Window
Maximizing a Window
Raising a Window or Icon
Moving a Window
Moving an Icon
Resizing a Window
Closing a Window: The Window Menu Button
Exiting from an xterm Window
Starting Additional Clients
Command-line Options
Window Geometry: Specifying Size and Location
Running a Client on Another Machine: Specifying the Display r.
The DISPLAY Environment Variable
Using-display
Once You Run a Remote xterm Using -display
Logging In to a Remote System
Monitoring the Load on a Remote System
Putting It All Together
Customizing a Program
Customizing the X Environment
Where to Go from Here
41
43
44
45
46
.47
49
50
51
52
55
56
58
59
59
63
64
65
66
67
67
68
71
72
74
Chapter 4 More About the mwm Window Manager
77
Using Special Keys
Input Focus and the Window Manager
Focusing Input on an Icon
Changing the Stacking Order with Keystrokes
Transferring (Explicit) Focus with Keystrokes
What To Do if mwm Dies and the Focus Is Lost
A Quick Review of Frame Features
Using the Window Menu
Invoking Window Menu Items
Pointer Commands to Manage Icons
Using the Window Menu on Icons
The Root Menu
78
79
80
80
81
82
82
83
85
86
87
88
VI
Chapter 5 The xterm Terminal Emulator
93
Terminal Emulation and the xterm Terminal Type
Resizing and Terminal Emulation
Running xterm with a Scrollbar
The Athena Scrollbar
How to Use the Scrollbar
Copying and Pasting Text Selections
Selecting Text to Copy
Extending a Selection
Pasting Text Selections
The Text Selection Mechanism and xclipboard
Saving Multiple Selections with xclipboard
Problems with Large Selections
Editing Text Saved in the xclipboard
The xterm Menus
The Main Options Menu
VT Options Menu
VT Fonts Menu
Tek Options Menu
94
95
96
97
98
100
100
102
105
106
107
Ill
112
112
114
117
119
120
Chapter 6 Font Specification
125
What's New in Release 5?
If You Just Want to Pick a Font
Font Naming Conventions
Font Families
Stroke Weight and Slant
The Size of Bitmap and Outline Fonts
Other Information in the Font Name
Font Name Wildcarding
Specifying Scalable Fonts
The Font Search Path
:
Modifying the Font Search Path
The fonts.dir Files
Font Name Aliasing
Making the Server Aware of Aliases
Utilities for Displaying Information about Fonts
The Font Displayer: xfd
'.
Previewing and Selecting Fonts: xfontsel
Previewing Fonts with the xfontsel Menus
Selecting a Font Name
Changing Fonts in xterm Windows
The Great Escape
The Selection Menu Item
Using the Font Server
The Font Server config File
126
127
128
129
132
133
135
137
140
140
141
143
144
146
146
146
148
149
152
153
153
154
155
156
VII
Running the Font Server
Adding a Server to the Font Path
Font Server Clients
156
157
158
Chapter 7 Graphics Utilities
163
Overview of the bitmap Editor
Menu Bar
Editing Command Buttons
Editing Area
Image Size Versus Window Size
What's New in Release 5
bitmap Editing Commands
Pointer Commands to Draw
Bitmap Command Buttons
Undo
Drawing: Point, Curve, Line, Rectangle, Circle
Filling in a Shape: Flood Fill
Clear, Set, and Invert
Marking an Area for Editing or Pasting
Copying or Moving an Area Within the Bitmap Window
Rotating or Moving with Arrow Buttons
Setting and Clearing a Hot Spot
Using the Menus
Dialog Boxes and Command Buttons
The File Menu
Inserting a File
The Edit Menu
Transferring Bitmap Images Using the Edit Menu
Magnifying Portions of the Screen: xmag
Selecting an Area to Magnify
xmag Command Buttons
Magnifying A Different Source Area: replace or new
Copying and Pasting Images: select and paste
What xmag Shows You
Removing an xmag Window: close
.Creating a Bitmap from a Cursor
The Portable Bitmap Toolkit
164
164
164
165
167
168
169
169
170
170
170
175
177
178
181
183
185
185
186
188
190
191
193
196
197
198
198
199
200
201
201
204
Chapter 8 Other Clients
209
Redrawing the Screen: xrefresh
Desk Accessories
Clock Programs: xclock and oclock
Removing an xclock or oclock
A Scientific Calculator: xcalc
210
210
211
214
215
viii
Terminating the Calculator
Mail Notification Client: xbiff
Monitoring System Load Average: xload
Browsing Reference Pages: xman
The xedit Text Editor
Printing Utilities: xwd, xpr, xdpr
Killing a Client Window with xkill
Problems with Killing a Client
Window and Display Information Clients
Displaying Infonnation About a Window: xwininfo
Examining the Window Hierarchy
Listing the Currently Running Clients: xlsclients
Generating Information About the Display: xdpyinfo
User-contributed Clients
Previewing Colors for Your Monitor: xcol
Creating Colors of Your Own: xcoloredit and xtici
xcoloredit
Using a Color Within an Application
Saving Multiple Colors Using the Color Cells
What Are the H, S, and V Sliders For?
Quitting xcoloredit
xtici (TheTekColor Editor)
Choosing a Hue to Edit
Changing the Hue with the Hue Bar
Adjusting the Color with the Hue Leaf
Selecting and Pasting the Numeric Color Value
Working with the Numeric Color Values
Problems Allocating Color Cells
Quitting xtici
216
216
217
218
222
229
231
232
233
233
236
239
240
241
241
245
246
248
249
251
251
251
253
254
256
257
257
258
259
PART TWO: Customizing X
261
Chapter 9 Working with Motif Applications
265
Pointer Button Usage
The Periodic Table of Motif Widgets
Menus
Pull-down Menus
Pop-up Menus
Option Menus
Tear-off Menus
Push Buttons
Radio Boxes and Toggle Buttons
The Motif Scrollbar
Text Windows
Dialog Boxes
Prompt Dialog
265
266
267
267
269
269
270
272
274
276
277
279
281
ix
Selection Dialog
File Selection Dialog
Selecting a File from the Files Box
Choosing a File from Another Directory in the Directories Box
Choosing a File from Another Directory on the System
Command Box
Scale
Drag and Drop
282
283
284
284
285
285
287
289
Chapter 10 Command-line Options
293
Display and Geometry
Window Title and Application Name
Starting a Client Window as an Icon
Specifying Fonts on the Command Line
Reverse Video
Border Width
Specifying Color
294
295
297
298
298
298
299
Chapter 11 Setting Resources
303
Resource Naming Syntax
Syntax of Toolkit Client Resources
Tight Bindings and Loose Bindings
Instances and Classes
Wildcarding a Component Name with ?
Precedence Rules for Resource Specification
Some Common Resources
Event Translations
The Syntax of Event Translations
xterm Translations to Use xclipboard
Entering Frequently Used Commands with Function Keys
Other Clients that Recognize Translations
How to Set Resources
A Sample Resources File
Specifying Resources from the Command Line
The -xrm Option
How -name Affects Resources
Setting Resources with xrdb
Querying the Resource Database
Loading New Values into the Resource Database
Saving Active Resource Definitions in a File
Removing Resource Definitions
Listing the Current Resources for a Client: appres
Other Sources of Resource Definition
Setting Resources for Color Versus Monochrome Screens
304
305
306
307
308
309
311
312
313
315
316
318
319
320
321
321
322
323
323
324
324
325
325
327
328
;
Loading Custom Application Defaults Files
Setting Screen-specific Resources
Testing and Editing Resources witheditres
What Widget Is That, Anyway?
editres Menus
Displaying the Widget Tree
Tracking Down the Widgets
Using the Resource Box to Create a Specification
Other Ways to Specify the Same Resource
328
330
331
332
333
334
335
336
340
Chapter 12 Specifying Color
343
What Color Names Can I Use?
Available RGB Colors
Surveying the RGB Database: rgb.txt
Alternative Release 5 RGB Color Databases
Specifying RGB Colors as Hexadecimal Numbers
The Xcms Color Spaces
A Mixed Bag: Using Both RGB and Xcms
Beyond the Rainbow: Inside the Color Models
The RGB Color Model
The X Color Management System
How Many Colors Are Available on My Screen?
Adding New Color Names
Changing the RGB Color Name Database
Finding the Color Values
•.
Editing and Compiling the Database
Fixing a Corrupted RGB Database
Creating an Xcms Color Database
Device-Specific Tuning
343
345
346
348
348
349
351
351
351
353
354
356
356
356
357
358
359
360
Chapter 13 Customizing mwm
365
Activating Changes to the Window Manager
Switching Between Custom Version and System Defaults
The system.mwmrc File
mwm Functions
Menu Specifications
Key Bindings
Button Bindings
Customizing the Root Menu
Creating New Menus
Cascading Menus
Setting mwm Resources
Component Appearance Resources
mwm-specific Appearance and Behavior Resources
366
366
368
371
371
373
375
376
378
378
380
381
382
XI
Client-specific Resources
Setting the Focus Policy
Using an Icon Box
383
384
385
Chapter 14 Setup Clients
391
When Should I Set Preferences?
Setting Display and Keyboard Preferences: xset
Keyboard Bell
Bug Compatibility Mode (Release 4)
Keyclick Volume
Enabling or Disabling Autorepeat
Changing or Rehashing the Font Path
Keyboard LEDs
Pointer Acceleration
Screen Saver
Color Definition
Help with xset Options
Setting Root Window Characteristics: xsetroot
Setting Root Window Patterns
Foreground Color, Background Color, and Reverse Video
Changing the Root Window Pointer
Modifier Key and Pointer Customization: xmodmap
Keycodes and Keysyms
Procedure to Map Modifier Keys
Displaying the Current Modifier Key Map
Determining the Default Key Mappings
Matching Keysyms with Physical Keys Using xev
Changing the Map with xmodmap
Expressions to Change the Key Map
Key Mapping Examples
Displaying and Changing the Pointer Map
391
393
393
394
394
395
395
395
396
396
397
397
398
398
399
400
401
403
404
404
405
406
407
408
409
411
<
PART THREE: Client Reference Pages
413
Intro
X
Xserver
appres
bdftopcf
bdftosnf
bitmap
editres
fs
fsinfo
fslsfonts
417
419
437
444
447
449
450
463
471
475
477
XII
fstobdf
listres
mkfontdir
mwm
oclock
resize
sessreg
showfont
showrgb
showsnf
viewres
xauth
xbiff
xcalc
xclipboard
xclock
xcmsdb
xcol
xcoloredit
xconsole
xcrtca
xditview
xdm
xdpr
xdpyinfo
xedit
xev
xfd
xfontsel
xhost
xinit
xkill
xload
xlogo
xlsatoms
xlsclients
xlsfonts
xlswins
xmag
xman
xmh
xmodmap
xpr
xprop
xrdb
xrefresh
xsccd
xset
,
•:
479
480
482
484
509
512
514
516
518
519
520
525
529
532
539
542
546
548
551
553
556
558
561
579
581
585
596
598
601
605
607
610
612
615
617
618
619
621
623
627
635
660
665
670
675
680
682
683
XIII
xsetroot
xstdcmap
xterm
686
689
691
xtici
xwd
xwininfo
xwud
725
:
729
731
735
PART FOUR: Appendices
739
Appendix A Managing Your Environment
743
Including X in Your Search Path
A Startup Shell Script
What Should Go in the Script
Server Access Control
Host-based Access and the xhost Client
User-based Access: xdm and the .Xauthority File
Console Messages
743
744
744
748
748
749
750
Appendix B Release 5 Standard Fonts
753
Appendix C Standard Bitmaps
795
Appendix D Standard Cursors
801
Appendix E xterm Control Sequences
807
Definitions
VTlOOMode
Mouse Tracking
Tektronix 4014 Mode
807
808
813
814
Appendix F Translation Table Syntax
819
Event Types and Modifiers
Detail Field
Modifiers
'.
Complex Translation Examples
819
821
822
822
xiv
Appendix G Widget Resources
827
The Widget Class Hierarchy
Widgets in the Application
What All This Means
Complications
Athena Widget Resources
Box
Command
Dialog
Form
Grip
Label
List
MenuButton
Paned
Panner
Porthole
Repeater
Scrollbar
Simple
SimpleMenu
Sme
SmeBSB
SmeLine
StripChart
Text
Toggle
Tree
Viewport
Motif Widget Resources
ArrowButton
BulletinBoard
CascadeButton
Command
DialogShell
Display
DrawingArea
DrawnButton
FileSelectionBox
Form
Frame
Gadget
Label
List
MainWindow
Manager
MenuShell
827
830
832
833
834
836
836
837
837
839
839
840
841
842
844
845
846
846
848
848
849
850
851
851
852
854
855
856
857
858
858
859
860
861
861
862
863
863
864
866
867
868
869
871
871
873
xv
MessageBox
PanedWindow
Primitive
PushButton
RowColumn
Scale
Screen
ScrollBar
ScrolledWindow
SelectionBox
Separator
Text
TextField
ToggleButton
VendorShell
873
874
876
877
878
881
883
884
885
886
888
888
891
892
894
Appendix H Obtaining Example Programs
899
FTP
FTPMAIL
BITFTP
UUCP
899
900
901
901
Glossary
905
Index
911
XVI