Difference between revisions of "Console mouse support (简体中文)"

From ArchWiki
Jump to: navigation, search
(use i18n template)
m
Line 2: Line 2:
 
{{i18n|Console Mouse Support}}
 
{{i18n|Console Mouse Support}}
  
为了在控制台下使用鼠标,您得安装'''gpm'''软件包。如果您没有安装它,用如下方式获取它:
+
{{Article summary start|综述}}
 +
{{Article summary text|安装并开启 GPM 守护进程。}}
 +
{{Article summary heading|相关}}
 +
{{Article summary wiki|守护进程}}
 +
{{Article summary end}} __NOEDITSECTION__
  
 +
GPM(General Purpose Mouse,通用鼠标)是为 Linux 虚拟控制台(TTY)提供鼠标支持的守护进程。大多数 Linux 发行版中都有它。
 +
 +
==安装==
 +
===台式机===
 +
用 [[pacman]] 安装 {{Pkg|gpm}} 即可。
 
  # pacman -S gpm
 
  # pacman -S gpm
  
 +
===笔记本===
 +
用 [[pacman]] 安装 {{Pkg|gpm}} 和 {{Pkg|xf86-input-synaptics}} 即可。
 +
# pacman -S gpm xf86-input-synaptics
 +
 +
==配置==
 
为了使用它,您需要在/etc/rc.conf文件中加载gpm,把gpm添加至DAEMONS行里面。以下是一个例子,包括gpm:
 
为了使用它,您需要在/etc/rc.conf文件中加载gpm,把gpm添加至DAEMONS行里面。以下是一个例子,包括gpm:
  
Line 29: Line 43:
 
  # gpm -m /dev/psaux -t help
 
  # gpm -m /dev/psaux -t help
  
更多信息,请参考 '''man gpm'''。
+
If the mouse only has 2 buttons, pass {{ic|-2}} to {{ic|GPM_ARGS}} and button-2 will preform the paste function.
 +
 
 +
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"

Revision as of 14:05, 23 January 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary end

GPM(General Purpose Mouse,通用鼠标)是为 Linux 虚拟控制台(TTY)提供鼠标支持的守护进程。大多数 Linux 发行版中都有它。

安装

台式机

pacman 安装 gpm 即可。

# pacman -S gpm

笔记本

pacman 安装 gpmxf86-input-synaptics 即可。

# pacman -S gpm xf86-input-synaptics

配置

为了使用它,您需要在/etc/rc.conf文件中加载gpm,把gpm添加至DAEMONS行里面。以下是一个例子,包括gpm:

# -----------------------------------------------------------------------
# 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)

gpm软件包启动时需要一些参数。这些参数可以添加到 /etc/conf.d/gpm文件里。下面是文件里面的例子:

#
# Parameters to be passed to gpm
#
GPM_ARGS="-m /dev/psaux -t imps2"

-m 参数表示预定义要使用的鼠标。-t 参数表示预处理您使用的鼠标类型(例子中的是ps2 鼠标)。要得到能被-t参数接受的类型的列表,用-t help运行gpm。

# gpm -m /dev/psaux -t help

If the mouse only has 2 buttons, pass -2 to GPM_ARGS 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 /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"