DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Configuring window size and location

Specifying geometry for the entire system

To change the geometry of a client window for all users, perform the following steps. You must be logged in as root to do this task.

  1. Open the desired client resource file for editing:

  2. Make the desired geometry resource specification(s): When you are finished, save your changes and exit the resource file.

  3. If users are running clients that are affected by the new configuration at the time you make these changes, they must restart the clients to see the new geometry designations.

Step 1: Editing the client resource file

Default resources for clients are stored in files in two locations on the system: /usr/lib/X11/sco/startup and /usr/lib/X11/app-defaults. These directories contain several files, each named for the specific client they represent. The resource specifications defined in these files control the appearance and behavior of their specific client.

The files in /usr/lib/X11/sco/startup contain server-specific resources. The values of these resources are loaded into the resource database and stored in the X server by the xrdb client when a Graphical Environment session is first started. These resource specifications are available for all clients that you run, regardless of the actual host that is running the applications.

The files in /usr/lib/X11/app-defaults contain the majority of resource specifications for the clients on your system. The resources in these files are host-specific and only affect clients that are run on your machine. These resource files are read by the resource manager when the corresponding client is run.

If you want to configure a client to use a particular geometry, regardless of the machine on which the client is run, you should edit the client's resource file in /usr/lib/X11/sco/startup.

If you want to configure a client to use a particular geometry only when it is run on the local system, edit the appropriate client file in /usr/lib/X11/app-defaults. If you intend to modify any of the files discussed here, it is recommended that you either make a backup copy of the file before you enter your resource changes, or comment out old resource values, using the ``!'' comment character, before entering new ones. This way you are assured of regaining the default values, if needed.

See also:

Step 2: Setting the geometry resource

As with all resources, geometry resource specifications must use the correct format. The syntax of the geometry resource variable is:

client*geometry: [widthxheight][±xoff±yoff]

client refers to the client you want to affect. You can supply either the client's binary or class name. geometry is the resource variable you are setting. The width and height arguments represent the size of the client window; most client windows are measured in pixels; however, terminal emulators such as scoterm and xterm are measured in characters. The xoff and yoff arguments represent the x and y coordinates of the client window, respectively.

Both xoff and yoff are measured in pixels from the edge of the screen. They must always be specified in pairs, and xoff must always be specified first. Both specifications can be either negative or positive numbers.

The xoff argument represents the distance of a window from the left or right edge of the screen. A window with a +0 (plus zero) x-offset is located on the left side of your screen. A window with a -0 (negative zero) x-offset is located on the right side of your screen.

The yoff argument represents the distance of a window from the top or bottom edge of the screen. A window with a +0 (plus zero) y-offset is located at the top of your screen. A window with a -0 (negative zero) y-offset is located at the bottom of your screen.

For example, to position a window in one of the four corners of the screen, use one of the following xoff and yoff combinations:

`` Display coordinates'' shows the x and y corner coordinates of any given display.

 Display coordinates

Because xoff and yoff are measured in pixels, which are small units, it is difficult to specify a location and know exactly where that location is on your screen. Because corner locations are always +0 or -0, it's much easier to specify an exact corner location than it is to specify a location somewhere in the middle of your screen.

The following is an example geometry specification:

   ScoTerm*geometry: 80x25+0+0
The size of this scoterm window is defined to be 80 characters wide by 25 characters high. It is located at the top, left edge of the screen.

You can specify both the size and location of a client window, or you can specify one or the other. For example, to change the size of a scoterm window only, specify:

ScoTerm*geometry: 70x20

The scoterm window size is defined to be 70 characters wide by 20 characters high. Either the scoterm client provides a default x and y coordinate position, or if the scoterm client does not have a default position defined, the window manager automatically positions the scoterm window.

Likewise, you can specify only the location of a client and rely on the client or the window manager to provide default size specifications. For example, to define the scoterm window so it appears in the bottom, right edge of your screen, specify:

ScoTerm*geometry: -0-0

See also:

Step 3: Activating the new geometry settings

Once you have made the desired geometry changes to the client resources files, the new specifications are immediately available to all users. However, if users were running the affected clients while you set the new geometry values, they need to restart the clients before the windows reflect the new geometry settings.


Next topic: Specifying geometry for individual users
Previous topic: Configuring window geometry

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