Difference between revisions of "General purpose mouse"

From ArchWiki
Jump to: navigation, search
m (Adding a category)
(update interlanguage links)
(Tag: wiki-scripts)
 
(57 intermediate revisions by 35 users not shown)
Line 1: Line 1:
[[Category:Daemons and system services (English)]]
+
[[Category:Linux console]]
====Q: How do I configure a mouse to be used in the console?====
+
[[Category:Mice]]
<b>A: </b>To use your mouse in the console, you need the '''pgm''' package. If it is not installed, get it with:
+
[[es:General purpose mouse]]
 +
[[it:General purpose mouse]]
 +
[[ja:コンソールマウスサポート]]
 +
[[ko:General purpose mouse]]
 +
[[ru:General purpose mouse]]
 +
[[zh-hans:General purpose mouse]]
 +
GPM, short for General Purpose Mouse, is a daemon that provides mouse support for Linux virtual consoles.
  
<code>pacman -S gpm</code>.
+
== Installation ==
  
To use it, you can load gpm from the /etc/rc.conf file, adding it to the daemons line. Here is an example of this line, including gpm:
+
[[Install]] the {{Pkg|gpm}} package. For touchpad support on a laptop you may also need to install {{Pkg|xf86-input-synaptics}}.
  
<pre>
+
== Configuration ==
DAEMONS=(syslog-ng !hotplug !pcmcia network netfs openntpd crond cups gpm)
 
</pre>
 
  
The gpm package needs to be started with a few parameters. These parameters can be added in the file ''/etc/conf.d/gpm''. Here is an example of the content of the file:
+
The {{ic|-m}} parameter precedes the declaration of the mouse to be used. The {{ic|-t}} parameter precedes the type of mouse. To get a list of available types for the {{ic|-t}} option, run {{ic|gpm}} with {{ic|-t help}}.
 +
# gpm -m /dev/input/mice -t help
  
<pre>
+
The {{Pkg|gpm}} package needs to be started with a few parameters. These parameters can be added in the file {{ic|/etc/conf.d/gpm}}, or used when running ''gpm'' directly. As of 2016, the {{ic|gpm.service}} file for [[systemd]] includes the parameters for a USB mice. Obviously, it should be edited if there is another mice type, and the file is used.
#
+
* For PS/2 mice, replace the existing line with:
# Parameters to be passed to gpm
+
GPM_ARGS="-m /dev/psaux -t ps2"
#
+
* Whereas USB mice should use:
GPM_ARGS="-m /dev/input/mice -t ps2"
+
GPM_ARGS="-m /dev/input/mice -t imps2"
</pre>
+
* And IBM Trackpoints need:
 +
GPM_ARGS="-m /dev/input/mice -t ps2"
  
The -m parameter precedes the declaration of the mouse to be used. The -t parameter precedes the type of mouse you are using (A PS2 mouse in this case). If you do not know what types are there to be chosen, load the package using a fake name (e.g. "helpme"). In this way you will get a list of available types.
+
{{Note|If the mouse has only 2 buttons, pass {{ic|-2}} to {{ic|GPM_ARGS}} and second button will perform the paste function.}}
  
For more info see <code>man gpm</code>.
+
Once a suitable configuration has been found, [[start]] and [[enable]] the {{ic|gpm.service}}.
 +
 
 +
For more information see {{man|8|gpm}}.
 +
 
 +
== See also ==
 +
 
 +
* [[Gentoo:GPM]]

Latest revision as of 20:34, 12 August 2018

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 you may also need to install xf86-input-synaptics.

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 added in the file /etc/conf.d/gpm, or used when running gpm directly. As of 2016, the gpm.service file for systemd includes the parameters for a USB mice. Obviously, it should be edited if there is another mice type, and the file is used.

  • For PS/2 mice, replace the existing line with:
GPM_ARGS="-m /dev/psaux -t ps2"
  • Whereas USB mice should use:
GPM_ARGS="-m /dev/input/mice -t imps2"
  • And IBM Trackpoints need:
GPM_ARGS="-m /dev/input/mice -t ps2"
Note: If the mouse has only 2 buttons, pass -2 to GPM_ARGS and second button will perform the paste function.

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

For more information see gpm(8).

See also