/[gentoo]/xml/htdocs/doc/en/gpm.xml
Gentoo

Diff of /xml/htdocs/doc/en/gpm.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gpm.xml,v 1.1 2005/07/26 17:56:59 jkt Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gpm.xml,v 1.2 2005/07/26 18:17:07 neysx Exp $ -->
4 4
5<guide link="/doc/en/gpm.xml"> 5<guide link="/doc/en/gpm.xml">
6<title>Using a Mouse within the Console</title> 6<title>Using a Mouse within the Console</title>
7 7
8<author title="Author"> 8<author title="Author">
9 <mail link="jackdark@gmail.com">Joshua Saddler</mail> 9 <mail link="jackdark@gmail.com">Joshua Saddler</mail>
10</author> 10</author>
11 11
12<abstract> 12<abstract>
13This guide shows you how to set up and use gpm (the General 13This guide shows you how to set up and use gpm (the General Purpose Mouse
14Purpose Mouse server) from within a command line interface. 14server) from within a command line interface. This is especially useful for new
15This is especially useful for new Gentoo installations or
16for systems that cannot or do not use an X server. 15Gentoo installations or for systems that cannot or do not use an X server.
17</abstract> 16</abstract>
18 17
19<!-- The content of this document is licensed under the CC-BY-SA license --> 18<!-- The content of this document is licensed under the CC-BY-SA license -->
20<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 19<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
21<license/> 20<license/>
22 21
23<version>1.0</version> 22<version>1.0</version>
24<date>2005-07-19</date> 23<date>2005-07-26</date>
25 24
26<chapter> 25<chapter>
27<title>Getting gpm</title> 26<title>Getting gpm</title>
28<section> 27<section>
29<body> 28<body>
30 29
31<p> 30<p>
32If you've just installed Gentoo, you almost certainly don't have your mouse 31If you've just installed Gentoo, you almost certainly don't have your mouse set
33set up to work within a command line interface (CLI) yet. Or perhaps you 32up to work within a command line interface (CLI) yet. Or perhaps you can't use
34can't use or don't need an X server, yet you still need to use a mouse. The 33or don't need an X server, yet you still need to use a mouse. The solution is
35solution is simple: <c>gpm</c>, the General Purpose Mouse server. 34simple: <c>gpm</c>, the General Purpose Mouse server.
36</p> 35</p>
37 36
38<p> 37<p>
39First, you will need to get gpm: 38First, you will need to get gpm:
40</p> 39</p>
42<pre caption="Obtaining gpm"> 41<pre caption="Obtaining gpm">
43# <i>emerge gpm</i> 42# <i>emerge gpm</i>
44</pre> 43</pre>
45 44
46<p> 45<p>
47You might have noticed a few messages during the compilation that warned 46You might have noticed a few messages during the compilation that warned about
48about configuring the server. You must do this before starting gpm. 47configuring the server. You must do this before starting gpm.
49</p> 48</p>
50 49
51</body> 50</body>
52</section> 51</section>
53</chapter> 52</chapter>
56<title>Configuring gpm</title> 55<title>Configuring gpm</title>
57<section> 56<section>
58<body> 57<body>
59 58
60<p> 59<p>
61Before you can use gpm, you will need to uncomment the lines 60Before you can use gpm, you will need to uncomment the lines corresponding to
62corresponding to the location and protocol of your mouse. You do this by 61the location and protocol of your mouse. You do this by editing the gpm
63editing the gpm configuration file: 62configuration file:
64</p> 63</p>
65 64
66<pre caption="Setting up gpm"> 65<pre caption="Setting up gpm">
67# <i>nano /etc/conf.d/gpm</i> 66# <i>nano /etc/conf.d/gpm</i>
68</pre> 67</pre>
69 68
70<p> 69<p>
71In my case, I have a USB mouse on <path>/dev/input/mouse0</path>. So, I 70In my case, I have a USB mouse on <path>/dev/input/mouse0</path>. So, I have
72have uncommented <path>/dev/input/mice</path>, as this is the cumulative 71uncommented <path>/dev/input/mice</path>, as this is the cumulative device for
73device for all mice on the system, and the appropriate protocol. 72all mice on the system, and the appropriate protocol. Try using
74Try using <path>/dev/input/mice</path> before <path>/dev/psaux</path>, as 73<path>/dev/input/mice</path> before <path>/dev/psaux</path>, as the latter is
75the latter is deprecated and can be disabled in the latest 2.6 kernels. If 74deprecated and can be disabled in the latest 2.6 kernels. If
76<path>/dev/input/mice</path> fails, then fall back to other devices. Here is 75<path>/dev/input/mice</path> fails, then fall back to other devices. Here is my
77my example <path>/etc/conf.d/gpm</path>: 76example <path>/etc/conf.d/gpm</path>:
78</p> 77</p>
79 78
80<pre caption="Example gpm config"> 79<pre caption="Example gpm config">
81<comment># Please uncomment the type of mouse you have and the appropriate MOUSEDEV entry</comment> 80<comment>(Please uncomment the type of mouse you have and the appropriate MOUSEDEV entry)</comment>
82 81
83#MOUSE=ps2 82#MOUSE=ps2
84MOUSE=imps2 83MOUSE=imps2
85#MOUSEDEV=/dev/psaux 84#MOUSEDEV=/dev/psaux
86MOUSEDEV=/dev/input/mice 85MOUSEDEV=/dev/input/mice
87</pre> 86</pre>
88 87
89<p> 88<p>
90If you have a wheelmouse, you will want to use the imps2 protocol, so 89If you have a wheelmouse, you will want to use the imps2 protocol, so uncomment
91uncomment that line. If imps2 and ps2 both fail to work for you, please 90that line. If imps2 and ps2 both fail to work for you, please refer to the gpm
92refer to the gpm info page (<c>info gpm</c>) for other protocols to try. 91info page (<c>info gpm</c>) for other protocols to try. Also, if you want to be
93Also, if you want to be able to click on hyperlinks in terminals to 92able to click on hyperlinks in terminals to navigate to a website, it is a good
94navigate to a website, it is a good idea to follow the suggestion in the 93idea to follow the suggestion in the <c>/etc/conf.d/gpm</c> file:
95<c>/etc/conf.d/gpm</c> file:
96</p> 94</p>
97 95
98<pre caption="Other options"> 96<pre caption="Other options">
99<comment># Please uncomment this line if you want gpm to understand charsets</comment> 97<comment>(Please uncomment this line if you want gpm to understand charsets
100<comment># used in URLs and names with ~ or : in them, etc.</comment> 98used in URLs and names with ~ or : in them, etc.
101<comment># This is a good idea to turn on!</comment> 99This is a good idea to turn on!)</comment>
102 100
103APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\"" 101APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\""
104</pre> 102</pre>
105 103
106<p> 104<p>
107The rest of the conf.d file contains other suggestions for your mouse server; 105The rest of the conf.d file contains other suggestions for your mouse server;
108uncomment the various options according to your needs. See <c>man gpm</c> 106uncomment the various options according to your needs. See <c>man gpm</c> for
109for more information. 107more information.
110</p> 108</p>
111 109
112</body> 110</body>
113</section> 111</section>
114</chapter> 112</chapter>
117<title>Running gpm</title> 115<title>Running gpm</title>
118<section> 116<section>
119<body> 117<body>
120 118
121<p> 119<p>
122Now that your mouse server is installed and configured, it's time to start 120Now that your mouse server is installed and configured, it's time to start
123using it: 121using it:
124</p> 122</p>
125 123
126<pre caption="The gpm init script"> 124<pre caption="The gpm init script">
127# <i>/etc/init.d/gpm start</i> 125# <i>/etc/init.d/gpm start</i>
128</pre> 126</pre>
129 127
130<p> 128<p>
131You should see a block cursor appear. Remember that only root can run the gpm 129You should see a block cursor appear. Remember that only root can run the gpm
132init script. However, to avoid having to <c>su</c> and run the script every 130init script. However, to avoid having to <c>su</c> and run the script every
133single time you begin a new session, why not set gpm to begin every time you 131single time you begin a new session, why not set gpm to begin every time you
134turn on your computer? 132turn on your computer?
135</p> 133</p>
136 134
137<pre caption="Adding gpm to the default runlevel"> 135<pre caption="Adding gpm to the default runlevel">
138# <i>rc-update add gpm default</i> 136# <i>rc-update add gpm default</i>
139</pre> 137</pre>
140 138
141<p> 139<p>
142Now, whenever you start your computer, you'll be greeted by the console cursor 140Now, whenever you start your computer, you'll be greeted by the console cursor
143by the time you get to the login prompt. The mouse server will continue to run 141by the time you get to the login prompt. The mouse server will continue to run
144even if you're not logged in as root. 142even if you're not logged in as root.
145</p> 143</p>
146 144
147</body> 145</body>
148</section> 146</section>
153<section> 151<section>
154<title>Copying and pasting</title> 152<title>Copying and pasting</title>
155<body> 153<body>
156 154
157<p> 155<p>
158Copying and pasting large blocks of text with a working mouse server is very 156Copying and pasting large blocks of text with a working mouse server is very
159easy. Simply highlight the text with the left mouse button (it will stay 157easy. Simply highlight the text with the left mouse button (it will stay
160highlighted when you release the button), switch to a different terminal if you 158highlighted when you release the button), switch to a different terminal if you
161wish, position the cursor, and press the middle mouse button to paste the text 159wish, position the cursor, and press the middle mouse button to paste the text
162where you placed the cursor. Note that you can copy and paste without ever 160where you placed the cursor. Note that you can copy and paste without ever
163leaving the terminal you started. This makes posting the output of error 161leaving the terminal you started. This makes posting the output of error
164messages to the <uri link="http://forums.gentoo.org">Gentoo forums</uri> 162messages to the <uri link="http://forums.gentoo.org">Gentoo forums</uri>
165extremely simple. 163extremely simple.
166</p> 164</p>
167 165
168</body> 166</body>
169</section> 167</section>
171<title>Text-mode browsing and gpm</title> 169<title>Text-mode browsing and gpm</title>
172<body> 170<body>
173 171
174<p> 172<p>
175If you have a message on one screen and a text-mode web browser on the other, 173If you have a message on one screen and a text-mode web browser on the other,
176you can copy the error message by highlighting it, then change to the other 174you can copy the error message by highlighting it, then change to the other
177terminal, left-click the appropriate text entry box to select it, and then press 175terminal, left-click the appropriate text entry box to select it, and then
178the middle mouse button. Voila! Your error message can now be posted to the 176press the middle mouse button. Voila! Your error message can now be posted to
179forums. 177the forums.
180</p> 178</p>
181 179
182<p> 180<p>
183Though discussion of text-only browsers is somewhat beyond the scope of this 181Though discussion of text-only browsers is somewhat beyond the scope of this
184guide, inevitably users will need to find a compatible console browser. Though 182guide, inevitably users will need to find a compatible console browser. Though
185<c>lynx</c> is most likely the oldest and well established browser, its 183<c>lynx</c> is most likely the oldest and well established browser, its
186interface has poor mouse support and recognition. Instead, try using 184interface has poor mouse support and recognition. Instead, try using
187<c>links</c>, the same browser which is also included in the Gentoo Installation
188CDs. <c>links</c> has excellent mouse integration: 185<c>links</c> which has excellent mouse integration.
189</p> 186</p>
190 187
191<pre caption="Obtaining links"> 188<pre caption="Obtaining links">
192# <i>emerge links</i> 189# <i>emerge links</i>
193</pre> 190</pre>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20