-->
Previous | Table of Contents | Next |
xgrab is an interactive front end for xgrabsc, an X Windows image grabber. xgrab was written by Bruce Schuchardt (bruce@slc.com) and many other people, who retain a loose copyright on the program. xgrab lets you grab arbitrary rectangular images from an xserver and writes them to files or commands (such as lpr) in a variety of formats.
Read the man page for xgrabsc for a description of the options presented by xgrab. After selecting options from the various categories presented, click OK to have xgrab run xgrabsc to let you grab an image from the screen. After you click OK, xgrabs window disappears, and xgrabsc gains control until the grabbing process is finished. Afterward, the xgrab window reappears.
xgrab responds to the standard application options, such as -_display. See the man page for X Windows for a complete list. You can also override the default xgrab settings in your .Xdefaults file. See the Examples section for instructions.
Resources
The xgrab resource file, XGrab.ad, contains a complete specification of the resources of all the widgets used in the xgrab window. Widgets are resource specifications for such items as buttons and menus. Global resources, such as default font and color, are at the bottom of the file.
Examples
The ToCommand output option may be used to pipe xgrabsc output to programs. The most common commands are lpr for PostScript output and xwud for X Windows Dump output. Programs that dont accept piped input shouldnt be used with ToCommand.
TIP: 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 window.
Default settings for xgrab can be made in your .Xdefaults file. For the Athena toolkit version of xgrab, toggle buttons can be set or unset through their .state attribute, and text-field strings can be set through their *string attribute. For the Motif toolkit version, which has diamond-shaped buttons for radio buttons, toggle buttons can be set or unset through their .set attribute and text-field strings can be set through their *value attribute. For example, to set the default paper size for PostScript output, put these lines in .Xdefaults (use xrdb to load them into the server):
XGrab*.pageWidthText*string: 8.5 XGrab*.pageHeightText*string: 11.0
or
XGrab*.pageWidthText*value: 8.5 XGrab*.pageHeightText*value: 10.0
To set the default output type to XWD, put these lines in .Xdefaults:
XGrab*.ps.state: 0 XGrab*.xwd.state: 1
Patrick J. Naughton (naughton@eng.sun.com) wrote xlock and released it to the world. The xlock program locks the local X Windows display until the user enters their password at the keyboard. While xlock is running, all new server connections are refused, the screen saver is disabled, the mouse cursor is turned off, and the screen is blanked and a changing pattern is put on-screen. If a key or a mouse button is pressed, the user is prompted for the password of the user who started xlock.
If the correct password is entered, the screen is unlocked and the X server is restored. When youre typing the password, <Ctrl-Shift-u> and <Ctrl-Shift-h> are active as kill and erase commands, respectively. To return to the locked screen, click the small icon version of the changing pattern.
The best is always saved for last. Why run XFree86 under Linux? Because ID Software, Inc. has made a version of their shareware game DOOM available. While superseded by other first-person shooter games (such as Id Softwares Quake), DOOM is an enthralling shoot-em-up adventure game still played the world over. Using realistic 3-D graphics, youre a space marine going into an unholy, terror-filled space colony located on one of the moons of Mars. You must find your way through the labs and various sites, looking for your lost comrades. All you find instead are hideous monsters and other space marines who have turned against you.
The X Windows version supplied on the accompanying Slackware CD-ROM in the /contrib directory is a complete shareware version. (The Red Hat distribution automatically installs the game during installation.) Although this version runs on 386 computers, it was built to run on high-end 486 systems. If you run DOOM on a 386 with a small amount of physical RAM, be prepared to be disappointed; the game will be too slow to be enjoyable. You need lots of horsepower to play DOOM under Linux.
DOOM is installed by default with the Red Hat distribution and can be started by selecting xdoom from the Start, Programs, Games menu.
Under Slackware, DOOM is stored in a series of archived files under the ///slackware/y2 directory. If you chose to install the games package while installing Linux, DOOM should already be installed. If not, you can use pkgtool to install it now, or you can perform the following steps:
cd /usr cp /cdrom/contrib/linuxdoom/*.
zip -d filename
tar -xfv archive-file
See Using tar, p. 229
Previous | Table of Contents | Next |