21.C: Adding an Application | 16: Customizing | 16.A: Creating an Alias |
A neat way to change your work environment is to change the colors, fonts and sizes of windows. (Everyone believes the defaults colors are awful.) To do this, modify the .twmrc. or .mwmrc window manager initiation file. Here is what you might find in one such file:
> more .twmrc
Color { DefaultBackground "maroon" DefaultForeground "gray" BorderColor "black" TitleBackground "maroon" TitleForeground "gray" MenuBackground "midnightblue" MenuForeground "yellow" MenuTitleBackground "midnightblue" MenuTitleForeground "yellow" IconBackground "gray" IconForeground "black" IconBorderColor "gray" IconManagerBackground "gray" IconManagerForeground "black" }
The word "Color " tells Unix that we want to set the colors. The brackets indicate which lines contain color information. Each of the remaining lines has a type of area (e.g. DefaultBackground) and a color (maroon) which is enclosed in parentheses.
If you do not like the colors currently in the list, you can try asking the system to show you its reds, greens and blues:
> showrgb | more
Your should get a response like:
220 220 220 gainsboro 240 255 240 honeydew 255 228 225 mistyrose 112 128 144 slategrey 135 206 235 skyblue 176 196 222 light steel blue 224 255 255 lightcyan 50 205 50 limegreen 154 205 50 yellowgreen 218 165 32 goldenrod 205 133 63 peru 255 160 122 light salmon
The numbers indicate the intensity of red, green and blue (hence the rgb) and the name is the description of the color used in .twmrc.
Before you modify your colors, make a backup copy of .twmrc. Then edit it with your favorite editor, sign off, sign on, and see what happens. If for some reason you cannot use your account after you have modified your colors (an old practical joke is to change all of the colors to black so that the machine will appear broken), you can always login using a telnet session and restore your backup (cp backup .twmrc).
You can modify the colors for individual applications by changing the .Xdefaults file. The format for the colors here is (either)
application.parameter: value
application*parameter: value
For example,
emacs.Background: black
You modify fonts in a similar fashion. The command
> xfontsel
helps you select a font by giving you samples. Click and drag your mouse on "fndry" to select the machine. The font is displayed in the next line. This can be a tricky process because all fonts may not be available with your application. Also, be aware that most fonts have aliases (you remember those, right), so the names in xfontsel (like xfntsel) may not match the names in .twmrc or .Xdefaults.
Now let's look at another way to change the appearance of your screen, loading applications.
21.C: Adding an Application | 16: Customizing | 16.A: Creating an Alias |