Skip to content
Related Articles

Related Articles

gpm Command in Linux with Examples

View Discussion
Improve Article
Save Article
  • Difficulty Level : Medium
  • Last Updated : 13 Aug, 2020
View Discussion
Improve Article
Save Article

GPM (“General Purpose Mouse”) software provides support for mouse devices in Linux virtual consoles. This package provides a daemon that captures mouse events when the system console is active and delivers events to applications through a library. By default, the daemon provides a ‘selection’ mode, in order that cut-and-paste with the mouse works on the console even as it does under X. It is used to select the text, drag the mouse while holding the left button, or to paste text within the same or another console, press the center button. The right button is employed to increase the choice. Two-button mice use the right button to paste the text.


It is included in most Linux distributions, but in case it is not, then run this command to install gpm.  

sudo apt-get install gpm


sudo gpm [options]

Working with gpm command

1. This option will display the list of all options along with their usage and function.

gpm -h


2. Displays the version of gpm that is installed on your system.

gpm -v

3. These options set the acceleration value. The default value is 2. 

sudo gpm -a accel_value

4. Startup with selection pasting disabled.

sudo gpm -A limit_value

5.  Set the baud rate. The default value is 1200. 

sudo gpm -b baud_rate_value


6. Set the button sequence. 123 is the normal sequence, 321 are often employed by left-handed people, and 132 are often useful with two-button mice. All the button permutations are allowable.

sudo gpm -B button_sequence

7. Set the delta value. When one motion event is longer than delta, accel is employed as a multiplying factor. (Must be 2 or above). 

sudo gpm -d delta_value

8. Do not automatically enter background operation when started, and log messages to the standard error stream, not the syslog mechanism. This is useful for debugging. 

sudo gpm -D

9. Sets the button (1-3) that is emulated by tapping on a glide point mouse, none by default. 

sudo gpm -g 2

10. The maximum time interval for multiple clicks. The default value is 250. 

sudo gpm -i 300

11. Kill a running gpm, to start X with a busmouse

sudo gpm -k

12.  Loads the inword() LUT (default ‘-a-zA-Z0-9_./?-??-??-?’) 

sudo gpm -l utf-8

13.  Forces the pointer to be visible while selecting. The default is not to show the pointer, which can be confusing. 

sudo gpm -p

14. Sets the responsiveness. The default value is 10. 

sudo gpm -r 1

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!