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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download) (as text)
Tue Jul 26 18:17:07 2005 UTC (9 years ago) by neysx
Branch: MAIN
Changes since 1.1: +51 -54 lines
File MIME type: application/xml
Coding style, removed installCD mention

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

  ViewVC Help
Powered by ViewVC 1.1.20