In general, users should use the scocolor client when they want to modify the colors that are used by the Desktop and other clients. However, there may be circumstances where a user wants to change the color for a particular aspect of the Graphical Environment display without changing the colors defined in the current palette. For example, a user may run the scoedit client often and want the background of the scoedit window to be a unique color so it stands out on the display. Another user might want the background of all non-active window frames to use a different color than the background of the windows themselves. Color changes of this kind should be made using an .Xdefaults-hostname resource file in the individual user's home directory.
Before you actually make any color resource specifications, however, you should be familiar with the information in ``Understanding resources''.
The following procedure can be undertaken by either root or an individual user. To change the color settings for a particular aspect of a client, perform the following steps.
Save your changes and exit the resource file when you are finished.
Individual users can assign their own color values, instead of palette resource variables, to color resources. A resource that uses a specific color value always has precedence over the same resource set with a palette resource variable.
Specific color resource settings are placed in a file called .Xdefaults-hostname, where hostname is the name of the host, or machine, where the client is running. This file must be located in the user's home directory.
You can add an .Xdefaults-hostname file to a user's home directory in one of two ways:
When the user invokes a client, the client checks to see if an .Xdefaults-hostname file exists in $HOME. If such a file does exist, the resource values specified in the user resource file take precedence over any values assigned to the same resource in the resource database.
As with all resources, color resource specifications must use
the correct format:
client refers to the client you want to affect.
You can supply either the client's binary or class name.
is the actual resource variable you want to define.
You can use either the resource's class or instance name.
color is either the name of the color you
are selecting or the color's hexadecimal RGB
values. If you enter a color name, it must match an entry
in the rgb.txt file.
Hexadecimal RGB values,
however, do not have to exist in the color database.
There are many resources that control the colors used for the Graphical Environment. ``Common color resources'' lists the most commonly used color resources. For a more complete list of color resources that are valid for a client, refer to the client's manual page.
Common color resources
|Resource name||Default value||Effect|
|*foreground||scoForeground||Color of text in windows|
|*activeForeground||scoActiveForeground||Color of text in active window frame|
|*bottomShadowColor||Black||Bottom shadow color of window frame|
|*activeBottomShadowColor||Black||Bottom shadow color of active window frame|
|*normal*foreground||Black||Color of text in Desktop icon labels|
|*background||scoBackground||Window background color|
|*activeBackground||scoActiveBackground||Color of background in active window frame|
|*topShadowColor||scoTopShadow||Top shadow color of window frame|
|*activeTopShadowColor||scoActiveTopShadow||Top shadow color of active window frame|
|*back*background||scoBackground||Directory window background color|
|*desktop*back*background||scoAltBackground||Desktop background color|
|*normal*background||White||Desktop icon label background color|
Whether you are replacing a palette resource variable with a specific color name or specifying a new, more specific resource, the resource line should use the same format. For example, to specify that the background for a scoedit window should be red, add the following resource line to the .Xdefaults-hostname file:
If you generated an .Xdefaults-hostname file for a user from the root account, whether by creating the file or by copying the file from files in /usr/lib/X11/app-defaults, you must assign the file the correct ownership permissions. Run the chown command to assign the correct owner and the chgrp command to assign the correct group to the .Xdefaults-hostname file.
If you created your own .Xdefaults-hostname file, you can omit this step. Your ownership permissions are already correct.
To see your new color settings, start a Graphical Environment session, either through scologin or by running startx from the command line.
Run the desired clients. When a client is started, it reads the $HOME/.Xdefaults-hostname file for your personal resource specifications. The new color settings are noted and specified colors are displayed accordingly.
If you created your own .Xdefaults-hostname file while running a Graphical Environment session, and you want the new color values applied to clients that are currently running, you need to restart the clients.
If you want the Desktop client to reflect your new color specifications, you must end your session and then start the X server again, either by logging in through a scologin window or by running the startx script from the command line.