xref: /netbsd/usr.sbin/wsmoused/wsmoused.8 (revision 6550d01e)
1.\" $NetBSD: wsmoused.8,v 1.16 2006/04/15 17:53:03 jmmv Exp $
2.\"
3.\" Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Julio M. Merino Vidal.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Neither the name of The NetBSD Foundation nor the names of its
15.\"    contributors may be used to endorse or promote products derived
16.\"    from this software without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd April 15, 2006
31.Dt WSMOUSED 8
32.Os
33.Sh NAME
34.Nm wsmoused
35.Nd multipurpose mouse daemon
36.Sh SYNOPSIS
37.Nm
38.Op Fl d Ar device
39.Op Fl f Ar conf_file
40.Op Fl m Ar modes
41.Op Fl n
42.Sh DESCRIPTION
43The
44.Nm
45daemon provides mouse support in console, allowing copying and pasting
46text.
47The left mouse button is used to select text when held and you
48use the right button to paste it in the active console.
49.Pp
50Supported options are as follows:
51.Bl -tag -width XfXconfXfileXX
52.It Fl d Ar device
53specifies the device file to be used as the
54.Xr wsmouse 4
55device.
56Defaults to
57.Pa /dev/wsmouse .
58.It Fl f Ar conf_file
59specifies the configuration file to be used.
60Defaults to
61.Pa /etc/wsmoused.conf .
62.It Fl m Ar modes
63specifies which modes should be activated.
64Mode names are given in the argument as a whitespace separated list.
65Overrides the
66.Sq modes
67directive in the configuration file.
68.It Fl n
69do not fork in the background (for debugging purposes).
70Overrides the
71.Sq nodaemon
72directive in the configuration file.
73.El
74.Pp
75Many other details can be tuned.
76See
77.Xr wsmoused.conf 5
78for more information.
79.Pp
80.Nm
81is designed to be a multipurpose mouse daemon.
82Functionality is provided through independent
83.Em modes ,
84enabled either through the
85.Fl m
86flag or through the
87.Sq modes
88property in the configuration file (the former takes precedence).
89.Ss The action mode
90The
91.Sq action
92mode executes commands upon receiving mouse button events.
93Commands can be associated on a button basis, and can differentiate between
94push or release events.
95.Ss The selection mode
96The
97.Sq selection
98mode provides visual copy and paste support in text consoles when using
99the
100.Xr wscons 4
101device.
102A selection is created by clicking with the primary mouse button at any
103point on the screen and dragging it while clicked.
104When the button is released, the selected text is copied to an internal
105buffer for further pasting with the secondary button.
106.Sh FILES
107.Bl -tag -width /dev/wsmoused.conf -compact
108.It Pa /dev/ttyE[0-n]
109tty devices
110.It Pa /dev/ttyEstat
111wsdisplay status notification device
112.It Pa /dev/wsmouse[0-n]
113mouse control device
114.It Pa /etc/wsmoused.conf
115default configuration file
116.El
117.Sh SECURITY CONSIDERATIONS
118When using the
119.Sq action
120mode, commands specified in the configuration file are executed as the
121user who started the daemon.
122By default, this user is
123.Sq root
124when using the
125.Xr rc.subr 8
126framework.
127You should set
128.Sq wsmoused_user="\*[Lt]some_user\*[Gt]"
129in
130.Xr rc.conf 5
131to a safer user (and adjust file permissions accordingly) if the commands
132you want to execute do not require superuser privileges.
133An alternative is to use
134.Xr su 1
135as part of the command string in the configuration file.
136.Sh NOTES
137The following notes apply to all work modes:
138.Bl -bullet
139.It
140When switching from the X screen to a text terminal, there is a small
141delay (five seconds) until the mouse works again.
142This time is used by X
143to close the mouse device properly.
144.El
145.Pp
146The following notes apply to the
147.Sq selection
148mode only:
149.Bl -bullet
150.It
151The mouse cursor is only visible for a short period of time.
152It will disappear
153when you stop moving it to avoid console corruption (which happens if
154it is visible and there is text output).
155.It
156You need to change the getty program which is run in the first
157virtual terminal to use
158.Pa /dev/ttyE0
159instead of
160.Pa /dev/console .
161To do this, edit
162.Pa /etc/ttys
163and
164.Pa /etc/wscons.conf .
165.El
166.Sh SEE ALSO
167.Xr su 1 ,
168.Xr wscons 4 ,
169.Xr wsdisplay 4 ,
170.Xr wsmouse 4 ,
171.Xr rc.conf 5 ,
172.Xr ttys 5 ,
173.Xr wscons.conf 5 ,
174.Xr wsmoused.conf 5 ,
175.Xr moused 8 ,
176.Xr rc.subr 8
177.Sh HISTORY
178The
179.Nm
180command first appeared in
181.Nx 2.0 .
182.Sh AUTHORS
183The
184.Nm
185command was developed by
186.An Julio M. Merino Vidal
187.Aq jmmv@NetBSD.org .
188