📄 0118-0120.html
字号:
<HTML>
<HEAD>
<TITLE>Sams Teach Yourself Linux in 24 Hours:Using the X Window System:EarthWeb Inc.-</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311623 //-->
<!-- TITLE=Sams Teach Yourself Linux in 24 Hours//-->
<!-- AUTHOR=Bill Ball//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=07 //-->
<!-- PAGES=0103-0126 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0115-0117.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0121-0123.html">Next</A>
</CENTER></P>
<A NAME="PAGENUM-118"><P>Page 118</P></A>
<P>
if you don't, the file is sent to the standard output, and will scroll up your terminal window.
</P>
<!-- CODE SNIP //-->
<PRE>
# xwd > mydump.xwd
</PRE>
<!-- END CODE SNIP //-->
<P>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.
</P>
<P>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
</P>
<!-- CODE SNIP //-->
<PRE>
# xwud -in mydump.xwd
</PRE>
<!-- END CODE SNIP //-->
<P>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
</P>
<!-- CODE SNIP //-->
<PRE>
# xloadimage -fit 1.xwd 2.xwd 3.xwd -goto 1.xwd
</PRE>
<!-- END CODE SNIP //-->
<P>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.
</P>
<TABLE BGCOLOR=#FFFF99>
<TR><TD>JUST A MINUTE</TD></TR>
<TR><TD>
<BLOCKQUOTE>
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.
</BLOCKQUOTE>
</TD></TR>
</TABLE>
<H4><A NAME="ch07_ 18">
Customizing the X11 Root Window and Using Screensavers
</A></H4>
<P>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.
</P>
<P><B>
Setting the Background Color
</B></P>
<A NAME="PAGENUM-119"><P>Page 119</P></A>
<P>
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
</P>
<!-- CODE SNIP //-->
<PRE>
# xsetroot -solid red
</PRE>
<!-- END CODE SNIP //-->
<P><B>
Setting the Background Pattern
</B></P>
<P>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
</P>
<!-- CODE SNIP //-->
<PRE>
# xsetroot -bitmap /usr/include/X11/bitmaps/wide_weave -bg red
</PRE>
<!-- END CODE SNIP //-->
<P>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.
</P>
<TABLE BGCOLOR=#FFFF99>
<TR><TD>TIME SAVER</TD></TR>
<TR><TD>
<BLOCKQUOTE>
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.
</BLOCKQUOTE>
</TD></TR>
</TABLE>
<P>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.
</P>
<P><B>
Displaying Pictures on the Root Display
</B></P>
<P>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.
</P>
<P>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:
</P>
<!-- CODE //-->
<PRE>
# 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<BR>
</PRE>
<!-- END CODE //-->
<A NAME="PAGENUM-120"><P>Page 120</P></A>
<!-- CODE //-->
<PRE>
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
</PRE>
<!-- END CODE //-->
<P>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
</P>
<!-- CODE SNIP //-->
<PRE>
# xloadimage -onroot cathy.gif
</PRE>
<!-- END CODE SNIP //-->
<P>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:
</P>
<!-- CODE SNIP //-->
<PRE>
# xloadimage -onroot -fullscreen cathy.gif
</PRE>
<!-- END CODE SNIP //-->
<P>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.
</P>
<P><B>
Screensaver Settings and Programs
</B></P>
<P>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.
</P>
<P>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:
</P>
<!-- CODE //-->
<PRE>
# xset q
...
Screen Saver:
prefer blanking: yes allow exposures: yes
timeout: 0 cycle: 600
...
</PRE>
<!-- END CODE //-->
<P>You can turn on screensaving with the xset client by using the
s command-line option,
</P>
<P><CENTER>
<a href="0115-0117.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0121-0123.html">Next</A>
</CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -