Unix Power ToolsUnix Power ToolsSearch this book

6.7. How -name Affects Resources

The command-line option -name lets you name one instance of an application; the server identifies the single instance of the application by this name. The name of an application affects how resources are interpreted. This option is supported by all X Window System clients written with the X Toolkit.

For example, the following command sets the xterm instance name to bigxterm:

% xterm -name bigxterm &

When this command is run, the client uses any resources specified for bigxterm rather than for xterm.

The -name option allows you to create different instances of the same application, each using different resources. For example, you could put the following entries into a resource file such as .Xresources:

XTerm*Font:          8x13
smallxterm*Font:     6x10
smallxterm*Geometry: 80x10
bigxterm*Font:       9x15
bigxterm*Geometry:   80x55

You could then use these commands to create xterms of different specifications. The command:

% xterm &

would create an xterm with the default specifications, while:

% xterm -name bigxterm &

would create a big xterm, 80 characters across by 55 lines down, displaying in the font 9x15. The command:

% xterm -name smallxterm &

would create a small xterm, 80 characters across by 10 lines down, displaying in the font 6x10.

--VQ and SJC



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.