-->

Previous | Table of Contents | Next

Page 118

if you don't, the file is sent to the standard output, and will scroll up your terminal window.


# xwd > mydump.xwd

After you type this command, your cursor will turn to a crosshair (+). If you click on the root desktop, the xwd client will dump, or capture, a picture of your entire screen. If you click in a window, the xwd client will capture the contents of the window, even if it is hidden or overlapped by another window.

This is handy if you want to capture a series of pictures of a running client, show off high scores of games, or create quick slideshows. The file is in an X11 windows dump format, but you'll find a number of clients you can use to view the image. One is the xwud (X11 window undump) client. To see your screenshot, you can use


# xwud -in mydump.xwd

You can also create a slideshow of your images with the xloadimage client, found under the /usr/X11R6/bin directory. For example, if you create a series of screen dumps, you can build a looping slideshow of the screenshots with


# xloadimage -fit 1.xwd 2.xwd 3.xwd -goto 1.xwd

Using this command line, you can repeatedly page through the dump files by pressing the N character on your keyboard, or press the Q character on your keyboard to quit. The xloadimage client has many features, and can also save your screen dump files into different graphics file formats. See the xloadimage manual page for more information.

JUST A MINUTE
Many other graphic utilities are included on your CD-ROM. See Hour 16 for an overview of paint and drawing programs, graphics conversion utilities, and other image viewers, such as the xv client, which not only captures screenshots, but edits, converts, saves, and prints graphics.

Customizing the X11 Root Window and Using Screensavers

If you have a color monitor, you might want to change the default color or pattern of the root, or desktop window. You can do this quickly and easily with several X11 clients. I'll also show you how to put pictures into your background, and how to set up and use screensavers in X11.

Setting the Background Color

Page 119

You can change the background color of your display with the xsetroot, or root window utility, which is found under the /usr/X11R6/bin directory. Your choice of color, as I mentioned previously, depends on the number of color depth of your X11 server. If you're using the SVGA server, you'll have a choice of 256 colors. For example, you can change the color with


# xsetroot -solid red

Setting the Background Pattern

If a solid color is too hard on your eyes, or too plain for your tastes, you can also use one of nearly 90 different bitmap graphics files from the /usr/include/X11/bitmaps directory to set a desktop pattern. For example, to get a red basket-weave pattern for your desktop, use


# xsetroot -bitmap /usr/include/X11/bitmaps/wide_weave -bg red

This command line tells the xsetroot client to load the bitmap graphic file wide_weave from the X11 bitmap graphics directory, and display the pattern with a background color.

TIME SAVER
Experiment with different colors and patterns. When you find one you like, place the xsetroot command line in your .xinitrc file so your background will be set the next time you run an X11 session.

If you're running a monochrome display, you're out of luck with colors. But you can change the pattern and apparent shade of your background display with different bitmap files. Try the dimple1, dimple3, or flipped_gray bitmap files.

Displaying Pictures on the Root Display

Many users like to display a favorite picture in the root window. If you have a favorite photograph you've scanned, or a graphic you like, you can display your image on the desktop with the xsetroot client, but the image must be in the X11 bitmap format.

You can use a client that's already been discussed—xloadimage. You can find out what graphics file format the xloadimage client recognizes with the -supported command-line option, for example:


# xloadimage -supported

Type Name  Can Dump Description

---------- -------- ----------

niff       Yes      Native Image File Format (NIFF)

sunraster  No       Sun Rasterfile

gif        No       GIF Image

jpeg       Yes      JFIF-style JPEG Image

Page 120


fbm        No       FBM Image

cmuraster  No       CMU WM Raster

pbm        Yes      Portable Bit Map (PBM, PGM, PPM)

faces      No       Faces Project

rle        No       Utah RLE Image

xwd        No       X Window Dump

vff        No       Sun Visualization File Format

mcidas     No       McIDAS areafile

vicar      No       VICAR Image

pcx        No       PC Paintbrush Image

gem        No       GEM Bit Image

macpaint   No       MacPaint Image

xpm        No       X Pixmap

xbm        No       X Bitmap



The file formats xloadimage can use are listed in the left column. If you have a graphic you'd like to display, you can use


# xloadimage -onroot cathy.gif

This would load the graphic file, cathy.gif, and display it (depending on its size) in a tiled, or multiple-view, format. If you only want one large version of your graphic in the root display, use the -fullscreen command-line option, for example:


# xloadimage -onroot -fullscreen cathy.gif

This will cause the xsetroot command to load the graphic and zoom to fit the display. You'll have to experiment with different size graphics to get the best effect for your graphic.

Screensaver Settings and Programs

Although displaying a colored pattern or picture on your desktop can be fun, X11 screensavers also offer password control. Even though the utility of screensavers with late-model computer monitors might be questioned (most modern displays won't suffer from the "burn-in" effect of a continuous display), you'll find a variety of interesting screensavers included on your CD-ROM.

You can use the xset client, introduced earlier, to manage screensaving under X11. If you'd like to see the current settings, use the q command-line option (note that there is no hyphen used), for example:


# xset q

...

Screen Saver:

  prefer blanking:  yes    allow exposures:  yes

  timeout:  0    cycle:  600

...

You can turn on screensaving with the xset client by using the s command-line option,

Previous | Table of Contents | Next