Prev | Current Page 174 | Next

Chris Tyler

"X Power Tools"


Several of these tools can be combined to automate the process of creating periodic
screen dumps:
#!/bin/bash
# Produce a screen dump periodically and save as a JPEG
DELAY=5 # seconds between screen dumps
DIR=/tmp/screen # directory to hold screen dumps
I=0 # current image number
mkdir -p ${DIR}
while sleep $DELAY
do
xwd -root | xwdtopnm | cjpeg >${DIR}/screendump.${I}.jpg
((I++))
done
6.12
108 Chapter 6: X Utility Programs
Variations on this script could easily update a web page or create an animation demonstrating
how to do a task.
xwd clearly demonstrates that an X client can access on-screen data
displayed by another client. This poses a serious security risk, which
can be somewhat reduced by the use of the SECURITY extension; see
Section 13.10 (and, of course, you should never open your X server up
to unrestricted network access!).
6.12 Preventing the Screen from Blanking During
Presentations
DPMS (Section 3.11) is a great tool for saving energy and heat. However, having the
screen blank at an inopportune moment??”the middle of a presentation, or the most
exciting point in a movie??”can be very frustrating!
Some applications that may be used for long periods without keyboard or mouse
activity, such as mplayer, automatically disable the screensaver and DPMS, but many
presentation and media player applications do not (surprisingly, this includes some
widely used applications such as OpenOffice.


Pages:
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
taxi szkolenia dla przedsiębiorców zakłady bukmacherskie Imprezy integracyjne Wczasy nad morzem