Difference between revisions of "Console mouse support"

From ArchWiki
Jump to: navigation, search
m (add russian i18n link)
(Clean up. No need to add the summary box.)
(35 intermediate revisions by 23 users not shown)
Line 1: Line 1:
[[Category:Daemons and system services (English)]]
+
[[es:Console Mouse Support]]
[[Category:Input devices (English)]]
+
[[it:Console Mouse Support]]
[[Category:HOWTOs (English)]]
+
[[ko:Console Mouse Support]]
{{i18n_links_start}}
+
[[ru:Console Mouse Support]]
{{i18n_entry|English|How to use a mouse in the console}}
+
[[zh-CN:Console Mouse Support]]
{{i18n_entry|Italiano|How to use a mouse in the console (Italiano)}}
+
[[Category:Mice]]
{{i18n_entry|Русский|Как использовать мышь в консоли}}
+
GPM, short for General Purpose Mouse, is a daemon that provides mouse support for Linux virtual consoles.
{{i18n_links_end}}
+
==Installing==
====Q: How do I configure a mouse to be used in the console?====
+
===Desktop===
<b>A: </b>To use your mouse in the console, you need the '''gpm''' package. If it is not installed, get it with:
+
Install {{Pkg|gpm}} with [[pacman]].
  
<code>pacman -S gpm</code>.
+
===Laptop===
 +
Install {{Pkg|gpm}} and {{Pkg|xf86-input-synaptics}} with [[pacman]].
  
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:
+
==Configuring==
 +
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>
+
If the mouse only has 2 buttons, pass {{ic|-2}} to {{ic|GPM_ARGS}} and button-2 will perform the paste function.
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 {{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 {{ic|gpm}} directly.
 +
* 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"
  
<pre>
+
Once a suitable configuration has been found, {{ic|gpm}} can be started by [[systemd]]:
#
+
systemctl start gpm.service
# Parameters to be passed to gpm
+
and enabled at boot time with:
#
+
systemctl enable gpm.service
GPM_ARGS="-m /dev/input/mice -t ps2"
+
</pre>
+
  
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.
+
For more information see {{ic|man gpm}}.
 
+
For more info see <code>man gpm</code>.
+

Revision as of 06:15, 16 December 2012

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

Installing

Desktop

Install gpm with pacman.

Laptop

Install gpm and xf86-input-synaptics with pacman.

Configuring

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

If the mouse only has 2 buttons, pass -2 to GPM_ARGS and button-2 will perform the paste function.

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.

  • 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"

Once a suitable configuration has been found, gpm can be started by systemd:

systemctl start gpm.service

and enabled at boot time with:

systemctl enable gpm.service

For more information see man gpm.