General purpose mouse

GPM, short for General Purpose Mouse, is a daemon that provides mouse support for Linux virtual consoles.

Installation

Install the gpm package. For touchpad support on a laptop, please see Laptop#Touchpad.

Configuration

The -m parameter precedes the declaration of the mouse to be used. The -t parameter precedes the type of mouse. To get a list of available types for the -t option, run gpm with -t help.

# gpm -m /dev/input/mice -t help

The gpm package needs to be started with a few parameters. These parameters can be recorded by creating the file /etc/conf.d/gpm, or used when running gpm directly. The gpm.service includes the parameters for USB mice (ExecStart=/usr/bin/gpm -m /dev/input/mice -t imps2).

Obviously, it should be edited, preferably in a systemd friendly manner, if there is another mouse type, and the service is used.

  • For PS/2 mice, the parameters are:
    -m /dev/psaux -t ps2
  • And IBM Trackpoints need:
    -m /dev/input/mice -t ps2

Once a suitable configuration has been found, start and enable the gpm.service.

For more information see .

QEMU or VirtualBox

The default mouse emulated by QEMU and VirtualBox has severe problems in both gpm and x with positioning and clicking. The position becomes unsynchronized with the host, so there are areas that cannot be hovered over without repeatedly exiting and re-entering the window. Clicks register in a different location than the cursor was showing at.

Both QEMU and VirtualBox solve this problem by providing emulation for a USB tablet, which gives absolute positioning. ( uses this automatically.)

However, the gpm only knows how to use the emulated mouse in relative positioning mode, so these problems remain. Attempting to use other types via -t fail to get it working properly.

includes a several year old pull request to add USB tablet support for VirtualBox (which also works under QEMU) and modifies the gpm.service file to use it by default.

You may need to change which event is used. (Giving gpm the original will not work.) By default:

/etc/gpm-vm.conf
event="/dev/input/event2"

You can determine the event to use by installing evtest and running:

If you need to give gpm additional options, you can set in .

Once a suitable configuration has been found, start and enable the gpm.service.

gollark: Well, I *do* support invasion of Mars.
gollark: Hmm, I *do* quite like this.
gollark: Perhaps this could be harvested for osmarks internet radioâ„¢.
gollark: I mostly want good answers to questions though.
gollark: I... see.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.