xgrab - interactive front for xgrabsc, an X-Windows image grabber
lets you grab arbitrary rectangular images from an X server and
writes them to files or commands (such as lpr) in a variety of formats.
is a front for the xgrabsc program. Read the man page for
for a description of the options presented by xgrab. The
xgrabsc program has more options than are presented through the xgrab
interface. In particular, xgrab does not allow you to grab areas of the screen
by specifying numeric coordinates, or grab subareas of a window through offset
After selecting options from the various categories presented, press the
button to have xgrab run xgrabsc to let you grab an image from the
screen. After you press OK
, xgrab's window will disappear and xgrabsc
will gain control until the grabbing process is finished. Afterwards, the
xgrab window will reappear.
Xgrab responds to the standard application options, such as -display
the man page for X
for a complete list.
You can also override the default xgrab settings in your .Xdefaults. See the
examples section below for instructions.
The XGrab resource file, XGrab.ad, contains a complete specification of the
resources of all the widgets used in the xgrab window. Global resources, such
as default font and color, are at the bottom of the file.
The To Command
output option may be used to pipe xgrabsc output to
programs. The most common commands are lpr
for Postscript output, and
for X-Window Dump output. Programs that do not accept piped input
should not be used in To Command
You can also get fancy and pipe the output through more than one command, such
as tee screen.dmp | xwud
, to store the grabbed image and get a preview
Default settings for xgrab can be made in your .Xdefaults file. For the Athena
toolkit version of xgrab, Toggle buttons can be set/unset through their
attribute, and text field strings can be set through their
attribute. For the Motif toolkit version (which has
diamond-shaped buttons for radio buttons), toggle buttons can be set/unset
through their .set
attribute and text field strings can be set through
For example, to set the default paper size for postscript output, put these
lines in your .Xdefaults (and use xrdb to load them into the server!):
To set the default output type to XWD
, put these lines in your
See the limitations listed in the xgrabsc man page.
See the xgrabsc man page, and the Acks file in the xgrabsc distribution for a
list of acknowledgements.
Copyright (c) 1991-93 Bruce Schuchardt
is copywritten material with a very loose copyright allowing
unlimited modification and distribution if the copyright notices are left
intact. Various portions are copywritten by various people, but all use a
modification of the MIT copyright notice. Please check the source for complete
copyright information. The intent is to keep the source free, not to stifle
its distribution, so please write to me if you have any questions.
THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
X(1X), xgrabsc(1X), xhost(1), xwd(1X), xwud(1X), xloadimage(1X), xpm(1X),