LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.





Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.



gpm

gpm [options]

System administration command. Provide a mouse server and cut-and-paste utility for use on the Linux console. gpm acts like a daemon, responding to both mouse events and client input. If no clients are connected to the active console, gpm provides cut-and-paste services.

Options

-2

Force two buttons. If there is a middle button, it is treated as the right button.

-3

Force three buttons. With a three-button mouse, the left button makes a selection, the right button extends the selection, and the middle button pastes it. Using this option with a two-button mouse results in being unable to paste.

-a accel

Set the acceleration for a single motion longer than the delta specified with the -d option.

-A [limit]

Start up with pasting disabled for security. If specified, limit gives the time in seconds during which a selection can be pasted. If too much time has passed, the paste is not allowed.

-b baud

Specify the baud rate.

-B seq

Set a three-digit button sequence, mapping the left, middle, and right buttons to buttons 1, 2, and 3. The default is 123. The sequence 321 is useful if you are left-handed, or 132 for a two-button mouse.

-d delta

Set the delta value for use with -a. When a mouse motion event is longer than the specified delta, use accel as a multiplier. delta must be 2 or greater.

-D

Debugging mode. When set, gpm does not put itself into the background, and it logs messages to standard error instead of syslog.

-g num

For a glidepoint device, specify the button to be emulated by a tap. num must be 1, 2, or 3 and refers to the button number before any remapping is done by the -B option. Applies to mman and ps2 protocol decoding.

-h

Print a help message and exit.

-i interval

Specify the upper time limit, in milliseconds, between mouse clicks for the clicks to be considered a double or triple click.

-k

Kill a running gpm. For use with a bus mouse to kill gpm before running X. See also -R.

-l charset

Specify the inword( ) lookup table, which determines which characters can appear in a word. charset is a list of characters. The list can include only printable characters. Specify a range with -, and use \ to escape the following character or to specify an octal character.

-m filename

Specify the mouse file to open. The default is /dev/mouse.

-M

Enable the use of more than one mouse. Options appearing before -M apply to the first mouse; those appearing after it apply to the second mouse. Forces the use of -R.

-o extra-options

Specify a comma-separated list of additional mouse-specific options. See the gpm info page for a description of the mouse types and the possible options.

-p

Keep the pointer visible while text is being selected. The default is not to show the pointer.

-r num

Specify the responsiveness. A higher number causes the cursor to move faster.

-R name

Act as a repeater and pass any mouse data received while in graphical mode to the fifo /dev/gpmdata in the protocol specified by name (default is msc). In addition to certain protocol types available with -t, you can specify raw to repeat the data with no protocol translation.

-s num

Specify the sample rate for the mouse device.

-S [commands]

Enable special-command processing (see the next section). Custom commands can be specified as a colon-separated list to associate commands with the left button, middle button, and right button. If a command is omitted, it defaults to sending a signal to init.

-t type

Specify the mouse protocol type. Use -t help for a list of types; those marked with an asterisk (*) can be used with -R.

-v

Print version information and exit.

-V [increment]

Make gpm more or less verbose by the specified increment. The default verbosity level is 5, and the default increment is 1. A larger value of increment causes more messages to be logged. The increment can be negative, but must be specified with no space (e.g., -V-3).

Special commands

Special commands, activated with the -S option, are associated with each mouse button. You can also use -S to customize the commands. To execute a special command, triple-click the left and right buttons (hold down one of the buttons and triple-click the other). A message appears on the console, and the speaker beeps twice. At this point, release the buttons and press the desired button within three seconds to activate the associated special command. The default special commands are:

Left button

Reboot by signalling init.

Middle button

Shut down the system with /sbin/shutdown -h now.

Right button

Reboot with /sbin/shutdown -r now.