164 168 N4UCBKOOSQFLMGCUQ7GAOYTPLBWL5E2RJ242XAY




Linux Configuration and Installation:Installing and Configuring XFree86






-->

















Previous
Table of Contents
Next




Setting a Screen Background Image
In X, you can display a bitmap image, a solid color, or a graphics file as your screen background, depending on the program you use to accomplish this task.

The xsetroot program sets the screen background color. It can also set the screen background to a monochrome bitmap. Our .xinitrc file sets the background color to SteelBlue. Other good screen background colors include bisque3 and MediumTurquoise. You can see the whole list of X color names in the text file /usr/lib/X11/rgb.txt. This file contains a number of entries, including:


255 239 213 PapayaWhip
255 235 205 BlanchedAlmond
50 205 50 LimeGreen


The xsetroot program can also be used to set the screen background to a monochrome bitmap, stored in an X bitmap file. The syntax for setting the screen background to a bitmap is:


gilbert:/$ xsetroot -bitmap filename -fg fore -bg back


where filename is the name of the file containing the bitmap and the fore and back are optional parameters that set the image’s foreground and background color, respectively. Use the color names from the rgb.txt file explained earlier.
For example, if you have an X bitmap file named prisoner.xb, you can set it to be tiled over the screen background with the following command:


gilbert:/$ xsetroot -bitmap prisoner.xb


You’ll see a screen like that shown in Figure 3.8.


Figure 3.8  Using a bitmap as the screen background.
Because the image looks good in black and white, we skip the -fg and -bg options to xsetroot (and leave the famous penny-farthing bicycle alone).
If, instead of an X bitmap file, you have a GIF, TIFF, or JPEG image, you can use xv to display the image. Xv is a very neat image and file manager that sports the ability to convert images from one format to another and a way cool Visual Schnauzer. Normally, you display images in xv’s window, but it can also display images on the screen background, also called the root window.
For xv, use the following syntax to display an image on the root window:


gilbert:/$ xv -quit -root -max filename


where filename is the name of the file you want to display. When you run this command on an image file, you’ll see a result like the one in Figure 3.9.

Figure 3.9  Using xv to set an image file for the screen background.

With complicated color images, you can soon fill up your colormap from the screen background image. This may lead to color flashing as X programs run out of colors in the default colormap and therefore create their own colormaps.

The Fvwm Window Manager
The window manager is one of the most important applications you’ll run, as it sits around every application window on the screen and can influence how the windows work. The de facto window manager for Linux is fvwm.
This window manager provides a great deal of control over the way you interact with X, especially because fvwm supports a host of configuration options. While you can run any window manager you want, fvwm seems to be the most popular in the Linux world. It’s not documented in many places or X books, so we’ll show you how to set up fvwm for your Linux system.
You can run only one window manager at a time.
Configuring Fvwm
Most window managers under X support a configuration file. Usually, this file is located in a dot file in your home directory. Most window managers also follow a naming convention for their configuration file. For the mwm window manager, the file is named .mwmrc. For twm, it’s .twmrc. For fvwm, it’s .fvwmrc.
At startup, fvwm will look for your customizations in a file named .fvwmrc in your home directory. If you have no .fvwmrc file (which is likely when you start out), fvwm will look for a system file named /usr/lib/X11/fvwm/system.fvwmrc. If that file, too, is missing, fvwm will exit.
Because fvwm is a very complex window manager, you should copy the system.fvwmrc file or one of the example files to your home directory and name it .fvwmrc. By starting from a working example, you’ll find it a lot easier than creating a .fvwmrc file from scratch.
Once you find the fvwm system directory, you’ll see a number of sample configurations in the sample_configs directory. It’s easiest to configure fvwm from a working model, so you can either copy system.fvwmrc or one of the files in the sample_configs directory.
Once you have copied a working configuration file into your home directory, the next step is to start customizing. The .fvwmrc file is very long, so we’ll provide an overview of the areas you’re most likely to customize and then provide an example .fvwmrc file—a very long example—that you can use. Just browsing this example should give you plenty of ideas. In addition to our example, you may want to look at the fvwm example files mentioned earlier and look at fvwm’s online-manual page.
In the .fvwmrc file, the order of items is very important. It’s best to start with a working example and then search for the items we mention. Change the item’s value, but leave the item itself in the same relative position in the .fvwmrc file.



Previous
Table of Contents
Next














Wyszukiwarka

Podobne podstrony:
164 be grammar verbtenses5
Mój portfel z 22 sierpnia 08 (nr 164)
14 (164)
v 04 164
Mazowieckie Studia Humanistyczne r2001 t7 n1 s162 164
164,24,artykul
1644
Globo 164 Da necessidade de receber

więcej podobnych podstron