DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Changing fonts

Setting fonts from the command line

You can specify any resource setting on the command line that you would otherwise put into a resource file, including font resources.

To change a font resource from the command line, use the -xrm option when launching a client from a scoterm window:

client -xrm 'client*resource_namefontname' &

If you specify a font resource from the command line, the font is only set for the current client session. Subsequent sessions return to the default font specification for the client.


NOTE: If you are using scosession and you end your current session with a client that was run from the command line still open on the display, the client is restored when you resume your session. Any command line options that were used to define the client are also restored. In this way, command line options can define client behavior on a more permanent basis.

See also:

Using the -xrm option

The -xrm option allows you to set any resource value, including font specifications, from the command line. You must enter the resource specification as well as the desired font name when using this option. For example, to change the text font for scoterm to a smaller fixed-width font, you would enter the following at the command line:

scoterm -xrm 'ScoTerm*font: 5x8' &

When using the -xrm option, you should be aware of the following:


Resource values specified at the command line only exist for the client session you are invoking. The resource values do not become part of the resource database and the values are not recreated the next time you run the client unless you use the -xrm option again.

Note that a font resource specified at the command line does not take effect if a font resource that takes precedence has already been loaded with xrdb. (See ``Precedence rules for resource specifications'' for more information.) For example, say you loaded a resource file that includes the specification:

   ScoTerm*font: 9x15
In this case, the following command line specification would not result in the scoterm client using a different font:

scoterm -xrm '*font: 5x8' &

Because the ScoTerm*font designation is more specific, the *font entry on the command line cannot override the font setting in the resource database.

To override the resource database, and get the 5x8 font, you would need to use a resource equally or more specific than the default setting. For example, the resource ScoTerm*font would provide the desired font change.

Other command line font options

You can also specify different fonts at the command line for some clients with an option other than -xrm. Most clients also accept the -fn option:

client -fn fontname

The -fn option can be useful in that you only need to know the name or alias of the font you want to specify; you do not need to be concerned with specifying font resources. However, if the resource database or your personal resource file sets this font value with a more specific resource, you do not see any changes when you use the -fn option.


Next topic: Creating a font alias
Previous topic: Step 4: Starting a Graphical Environment session

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003