Difference between revisions of "Console mouse support"

From ArchWiki
Jump to: navigation, search
(Added note about 2-button mice and suggestion for USB mouse settings)
Line 1: Line 1:
{{i18n_links_start}}
+
[[Category:Daemons and system services (English)]]
 +
[[Category:Other desktop user's resources (English)]]
 +
[[Category:HOWTOs (English)]]
 +
{{Article summary start|Summary}}
 +
{{Article summary text|Installing and enabling the GPM daemon.}}
 +
{{Article summary heading|Language}}
 
{{i18n_entry|English|How to use a mouse in the console}}
 
{{i18n_entry|English|How to use a mouse in the console}}
 
{{i18n_entry|Italiano|How to use a mouse in the console (Italiano)}}
 
{{i18n_entry|Italiano|How to use a mouse in the console (Italiano)}}
Line 5: Line 10:
 
{{i18n_entry|简体中文|在 console 中使用鼠标 (简体中文)}}
 
{{i18n_entry|简体中文|在 console 中使用鼠标 (简体中文)}}
 
{{i18n_entry|Español|Como usar un mouse en la consola (Español)}}
 
{{i18n_entry|Español|Como usar un mouse en la consola (Español)}}
{{i18n_links_end}}
+
<!--
 +
{{Article summary heading|Related}}
 +
{{Article summary wiki|}}
 +
-->
 +
{{Article summary end}}
 +
'''GPM''', short for ''g''eneral ''p''urpose ''m''ouse, is a daemon that provides mouse support for Linux virtual consoles. It is included in most Linux distributions.
  
To use your mouse in the console, you need the '''gpm''' package. Get it with:
+
==Installing==
  # pacman -S gpm
+
Codeline|gpm}} provides console mouse support:
 +
  # pacman -S  
  
To use it, you can load gpm from the {{Filename|[[rc.conf|/etc/rc.conf]]}} file, adding it to the DAEMONS line. Here is an example of this line, including gpm:
+
==Configuring==
 +
The {{Codeline|-m}} parameter precedes the declaration of the mouse to be used. The {{Codeline|-t}} parameter precedes the type of mouse. To get a list of available types for the {{Codeline|-t}} option, run gpm with {{Codeline|-t help}}.
 +
$ gpm -m /dev/input/mice -t help
  
<pre>
+
If the mouse only has 2 buttons, pass {{Codeline|-2}} to {{Codeline|GPM_ARGS}} and button-2 will preform the paste function.
# -----------------------------------------------------------------------
+
# DAEMONS
+
# -----------------------------------------------------------------------
+
#
+
# Daemons to start at boot-up (in this order)
+
#  - prefix a daemon with a ! to disable it
+
#  - prefix a daemon with a @ to start it up in the background
+
#
+
DAEMONS=(syslog-ng network netfs crond gpm)
+
</pre>
+
  
The gpm package needs to be started with a few parameters. These parameters can be added in the file {{Filename|/etc/conf.d/gpm}}. Here is an example of the content of the file:
+
The gpm package needs to be started with a few parameters. These parameters can be added in the file {{Filename|/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"
  
<pre>
+
Once a suitable configuration has been found, adding {{Codeline|gpm}} into the {{codeline|DAEMONS}} array in {{Filename|/etc/rc.conf}} will make {{Codeline|gpm}} load at boot. Example:
#
+
DAEMONS=(syslog-ng '''gpm''' network netfs crond)
# Parameters to be passed to gpm
+
#
+
GPM_ARGS="-m /dev/psaux -t imps2"
+
</pre>
+
  
GPM_ARGS="-m /dev/input/mice -t imps2" seems to work with most usb mice.
+
For more information see {{Codeline|man gpm}}.
 
+
The {{Codeline|-m}} parameter precedes the declaration of the mouse to be used. The {{Codeline|-t}} parameter precedes the type of mouse you are using (An IBM PS/2 mouse in this case). To get a list of available types for the {{Codeline|-t}} option, run gpm with {{Codeline|-t help}}.
+
 
+
$ gpm -m /dev/psaux -t help
+
 
+
If you only have a 2-button mouse, you can pass {{Codeline|-2}} to {{Codeline|GPM_ARGS}} and button-2 will preform the paste function.
+
 
+
For more info see {{Codeline|man gpm}}.
+
 
+
[[Category:Daemons and system services (English)]]
+
[[Category:Other desktop user's resources (English)]]
+
[[Category:HOWTOs (English)]]
+

Revision as of 04:54, 21 December 2009

Summary help replacing me
Installing and enabling the GPM daemon.
Language

Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry

GPM, short for general purpose mouse, is a daemon that provides mouse support for Linux virtual consoles. It is included in most Linux distributions.

Installing

Codeline|gpm}} provides console mouse support:

# pacman -S 

Configuring

The Template:Codeline parameter precedes the declaration of the mouse to be used. The Template:Codeline parameter precedes the type of mouse. To get a list of available types for the Template:Codeline option, run gpm with Template:Codeline.

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

If the mouse only has 2 buttons, pass Template:Codeline to Template:Codeline and button-2 will preform the paste function.

The gpm package needs to be started with a few parameters. These parameters can be added in the file Template:Filename 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, adding Template:Codeline into the Template:Codeline array in Template:Filename will make Template:Codeline load at boot. Example:

DAEMONS=(syslog-ng gpm network netfs crond)

For more information see Template:Codeline.