Next Previous Contents

9. Clients and Application Tips

We have covered a few clients in X, and this section will cover some more. We will limit our discussion here to the most basic and important core items, those which come with X or you are likely to find yourself using with X. If you have installed an integrated desktop environment such as KDE or GNOME, you will have many others to choose from which likely perform many of the same functions. However, it is important to know about and understand many of the fundamental programs in X, because they can be very useful for working with your environment and such. Also X offers many new options that even your normal console applications can take advantage of.

9.1 Screen Savers for X

A common feature of many operating systems is the ability to blank the screen after a specified amount of time, and optionally display some sort of nifty graphics demo thing, a screen saver. There are a couple ways to do that in X, too.

The most basic way to use this feature is by putting a command in your .xinitrc startup file such as xset dpms 2400 3600 4800. The xset program can configure the screen saving features of the X server, not to be confused with the screen blanking that the kernel does when you are at the text console. With the dpms option, X can use the power saving features of your monitor as well. The first option configures how many seconds before the screen blanks, the second option is how many seconds before the power saving feature starts, and the third option is for the "off" mode. Turning on an option implicitly enables the feature, setting a feature to zero explicitly disables it.

Many Linux distributions come with xlock preinstalled, or as an option. This is a pretty basic and fairly nice screen saver. If you run it with the -nolock option, you can see some of the modes that it offers, and if you leave that option off, it will ask you for a password when you move the mouse or press a key, as a security feature. Note that this is no real security, for at a Linux console a user could restart the computer or just drop out of X with a combination of keystrokes. The last method can be disabled, however, and if you are using xdm, it will offer as much security as your login, so it may be that only rebooting will let someone in.

A newer and better program is xscreensaver by Jamie Zawinski. This program offers a great many niceties, for instance, it can run its processes at a nicer priority level, lessening the load to the system while it's running, and it automatically detects when the screen has been powered down by xset and doesn't waste processor time. Also, all of the graphics routines it calls are modular demos, and you can add routines without upgrading the whole package, and it can also call other programs, such as xearth or xdaliclock, as modules.

The latest version of xscreensaver can be found at Once you get it installed and ready to go, here are some nice additions you might wish to add to your .Xdefaults file:

 !!! some XScreenSaver sample defaults
 ! Time out after 3 minutes, cycle mode after each 2
 xscreensaver.timeout: 3
 xscreensaver.cycle: 2
 ! Run very low priority, and fade between modes
 xscreensaver.nice: 12
 xscreensaver.fadeSeconds: 2

9.2 Emacs and XEmacs

If you are a fan of the text editor EMACS, or just someone who uses it a lot, you will find your work even easier in X Windows. If you have not tried XEmacs, you may want to get it for use in X. There are features in XEmacs that are nice even if you are not in X, for instance, your text can be colored to match the markup style you are editing automatically. You should give the following modification to your .emacs file a shot, and read the info pages for more options. Also look for an option to edit faces in the menus.

 (global-font-lock-mode t)
 (setq font-lock-maximum-decoration t)

9.3 Some Useful Programs and Tricks


The appres program prints the resources seen by an application (or sub-hierarchy of an application) with the specified class and instance names. It can be used to determine which resources a particular program will load. Useful for debugging your X defaults and such.


Many distributions come with this nice replacement for xclock, which saves memory, alerts you when your mail comes, and can pop up reminder messages and launch programs. The Battery-Powered Mini-HOWTO contains instructions on patching this utility to show how much battery is left in your laptop, too.


A nice replacement for xterm - uses less memory, works faster, lets you put in a background pixmap, and lets you switch fonts with keyboard hotkeys, rather than menus.


Displays CPU state (idle, nice, system, kernel) statistics, as well as Ethernet information.


Display the earth on your root window, many options for display available. Xscreensaver can use this as a screensaver module, for maximum fun.


A vector drawing program, particularly useful for charts and documentation. Quite useful but hard to get the hang of at first.


Font selection utility for X Window. Try the command xterm -fn `xfontsel -print` & to pick a font and then open the xterm window using that font.


Monitor your memory usage with a moving graph or the lights on your keyboard! If you use Window Maker, look for wmmon to do the same, but prettier.


A magnifying glass for X, with a couple other useful features.


Manual page browser for X. If the little box it starts with gets annoying, launch it with the -notopbox option.


Edit and display the keyboard modifier map and keymap table that are used by client applications to convert event keycodes into keysyms, usually run from user's startup script. An example was given earlier in this document, see the man pages for more info.


Basic bitmap painting program, for any real work you should grab GIMP.


User preference utility for X. You can change all sorts of stuff with this. For instance, xset s 600 sets the screen to blank after ten minutes.


Change the color of your desktop. If you have a color selector program like xcolorsel installed, try a command like xsetroot -solid `xcolorsel` to pick a color and set your desktop to that color.


You can run this program and click on any window for lots of useful information about it.

The Intellimouse

You can use the Intellimouse in X with a great many applications. There is an excellent resource page located at

Next Previous Contents