-->

Previous | Table of Contents | Next

Page 115

These values tell the xpaint client to draw a vertical toolbox. If you'd like a horizontal toolbox instead, you can resize the toolbox, note the dimensions shown by the window manager during the resize operation, and use the new settings to change the initial size of the toolbox in its default resource settings file, for example:


...

!  The top level operation/toolbox menu

!

XPaint.width:                   702

XPaint.height:                  122

...



For details about X resources, see the X man page. For details about different client resources, see the program's manual page or other documentation.

CAUTION
Make sure your changes reflect your supported screen size, or programs might start off-screen, or with windows too large to be useful. Always use the exclamation character for comments, and if you edit the default, or original application resource file, copy the original settings first to a comment line.

Changing X11 Mouse and Cursor Modes

When you use X11, you might want to change the way your mouse works, or switch the order of the mouse buttons. This is especially handy if you're left-handed or if your mouse responds differently than the desired setup. You can also change the type of cursor used by your window manager.

In order to change your root window cursor, you need to know what cursors are available. You'll find a list of cursors in the cursorfont.h file under the /usr/X11R6/include/X11 directory, for example:


...

#define XC_exchange 50

#define XC_fleur 52

#define XC_gobbler 54

#define XC_gumby 56

#define XC_hand1 58

#define XC_hand2 60

#define XC_heart 62

#define XC_icon 64

...

As you can see, many types of cursors are listed in this file. Knowing these different type of cursors, you can then use the xsetroot client, or root window utility program, to set your root cursor image, for example:


# xsetroot -cursor_name hand1

Page 116

This will change the root cursor to look like a right-pointing hand. If you are left-handed, you might want to use the left-pointing hand2 cursor!

TIME SAVER
An easy way to see all the cursors is to use the xfd, or X11 font display, client found under the /usr/X11R6/bin directory. Used with the -fn command-line option, the xfd client will display the entire character set of the cursor font, cursor, located in the /usr/X11R6/lib/X11/fonts/misc directory.

If you find the left and right mouse buttons inconvenient, you can change how these buttons are ordered on your mouse by using the xmodmap client, found under the /usr/X11R6/bin directory. For example, to reverse the order of your mouse buttons, you can try


# xmodmap -e "pointer 3 2 1"

This example, from the xmodmap manual page, might help left-handed users.

JUST A MINUTE
The xmodmap client can also be used to change or alter the keys on your keyboard. See the xmodmap manual page for more information.

You can also customize other mouse settings using the xset, or user preference, client. For example, if you want to speed up your mouse acceleration, or how fast it travels across the screen, you can try these settings:


# xset m "40 4"

If this is too fast for you, try the following:


# xset m "4 8"

Experiment with different settings. You can really slow down your mouse with the xset m "0 1000" command line. See the xset client manual page for other X11 settings you can change, and see if some work with your system.

How to Copy and Paste in X11

Copying and pasting information in X11 involves transferring text between terminal windows, or graphics from one X11 client to another. For example, you can use the xmag program to select a portion of your desktop, then paste the copied graphic into an open xpaint drawing window (see Hour 16, "Graphics Tools"). To do this, first run the xpaint client, go to the File menu, and select New Canvas. Then start the xmag client. You'll see a tiny corner cursor. If you click over an area of the screen you'd like to magnify, the xmag client

Page 117

will then display the selection in a window. You would then move your cursor to the xpaint drawing window, go to the Edit menu, and select Paste. Your selected graphic will be pasted in the xpaint window.

If you're running a word processor or the command line in your terminal windows, you can also copy and paste text between windows. Both the xterm and rxvt terminals support copy and paste operations using your mouse cursor and mouse buttons. To copy text, you'll need to highlight the text first. If you just want a word, double-click on the word with your left mouse button. If you want a line of text, triple-click on the line. But if you want more than a word or a line, you'll need to highlight regions of text.

You can select text regions in terminal windows in two ways: You can move your cursor to the beginning or end of the text, and then drag with the left mouse button held down to highlight the selected text. You can also click at the beginning of the text with your left mouse button, then click at the end of the text to highlight your selection. There are also two ways to paste text into another window. One way to paste text is to use your keyboard by holding down the Shift key, and then pressing the Insert key. The other way is to press the middle mouse button (or the left and right mouse buttons simultaneously if you're using a two-button mouse to emulate three buttons).

You can also use the xcutsel client to copy from one window to another. When you run this client, you'll see two buttons called "copy PRIMARY to 0" and "copy 0 to PRIMARY." To copy text from one window to another, first highlight text in one window. Then click on the "copy PRIMARY to 0" button. You can then click on the "copy 0 to PRIMARY" button, then move to the window where you want to paste the text, and use either your keyboard or mouse to paste the text.

Another X11 client for copying and pasting text is the xclipboard client. This program is especially handy for copying sections of text from messages, FAQs, HOWTOs, or other files. Like the xcutsel client, xclipboard places the copied text into a buffer, but has the added benefit of displaying the text, which you can then save into a file, or copy into other windows or programs.

If you'd like to do more than just copy small bits of graphics or text, you can also capture pictures of whole windows or your desktop. The next section shows you how to capture, save, and display pictures from your X11 desktop.

Capturing and Dumping X11 Window

You can capture pictures of windows or your entire desktop using several X11 clients included on your CD-ROM. The first is the xwd, or X11 window dump, program. You can use this client to take snapshots of your screen, or any desired window.

The xwd program is easy to use. You'll want to specify a file on the command line, because

Previous | Table of Contents | Next