gpm
TLDR
Start gpm with a PS/2 mouse
SYNOPSIS
gpm [options]
DESCRIPTION
gpm (General Purpose Mouse) provides mouse support for the Linux virtual console (text mode). It enables copy/paste functionality, mouse cursor movement, and mouse button events in console applications.
Text selection is done by holding the left button and dragging. Middle button pastes selected text. Right button extends selection. This provides clipboard functionality similar to X11 in pure text mode.
In repeater mode (-R), gpm can pass mouse events to X server, allowing both console and X applications to share the mouse device.
PARAMETERS
-m DEVICE
Mouse device (e.g., /dev/input/mice, /dev/ttyS0)-t TYPE
Mouse type (ps2, ms, imps2, etc.)-R [TYPE]
Repeater mode for X server; optionally specify output type-D
Debug mode; run in foreground-k
Kill running gpm daemon-B SEQUENCE
Button sequence (1, 2, 3 or permutation)-2
Force two-button mouse emulation-3
Force three-button mouse emulation
CAVEATS
Only works in Linux virtual consoles, not terminal emulators or SSH sessions. Requires root privileges. May conflict with X server mouse handling if not configured for repeater mode. Modern systems often use systemd to manage gpm.
HISTORY
gpm was created by Alessandro Rubini in 1994 to bring mouse support to the Linux console. It became essential for text-mode applications and system administration before graphical desktops became prevalent. The project remains maintained for console-based systems.


