.\" $NetBSD: wsmoused.8,v 1.13 2003/08/06 22:11:50 jmmv Exp $ .\" .\" Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation .\" by Julio M. Merino Vidal. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Neither the name of The NetBSD Foundation nor the names of its .\" contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd August 6, 2003 .Dt WSMOUSED 8 .Os .Sh NAME .Nm wsmoused .Nd multipurpose mouse daemon .Sh SYNOPSIS .Nm .Op Fl d Ar device .Op Fl f Ar conf_file .Op Fl m Ar modes .Op Fl n .Sh DESCRIPTION The .Nm daemon provides mouse support in console, allowing copying and pasting text. The left mouse button is used to select text when held and you use the right button to paste it in the active console. .Pp Supported options are as follows: .Bl -tag -width XfXconfXfileXX .It Fl d Ar device specifies the device file to be used as the .Xr wsmouse 4 device. Defaults to .Pa /dev/wsmouse . .It Fl f Ar conf_file specifies the configuration file to be used. Defaults to .Pa /etc/wsmoused.conf . .It Fl m Ar modes specifies which modes should be activated. Mode names are given in the argument as a whitespace separated list. Overrides the .Sq modes directive in the configuration file. .It Fl n do not fork in the background (for debugging purposes). Overrides the .Sq nodaemon directive in the configuration file. .El .Pp Many other details can be tuned. See .Xr wsmoused.conf 5 for more information. .Pp .Nm is designed to be a multipurpose mouse daemon. Functionality is provided though independant .Em modes , enabled either though the .Fl m flag or though the .Sq modes property in the configuration file (the former takes precedence). .Ss The action mode The .Sq action mode executes commands upon receivement of mouse button events. Commands can be associated on a button basis, and can differenciate between push or release events. .Ss The selection mode The .Sq selection mode provides visual copy and paste support in text consoles when using the .Xr wscons 4 device. A selection is created by clicking with the mouse primary button at any point on the screen and dragging it while clicked. When the button is released, the selected text is copied to an internal buffer for further pasting with the secondary button. .Sh FILES .Bl -tag -width /dev/wsmoused.conf -compact .It Pa /dev/ttyE[0-n] tty devices .It Pa /dev/ttyEstat wsdisplay status notification device .It Pa /dev/wsmouse[0-n] mouse control device .It Pa /etc/wsmoused.conf default configuration file .El .Sh SECURITY CONSIDERATIONS When using the .Sq action mode, commands specified in the configuration file are executed as the user who started the daemon. By default, this user is .Sq root when using the .Xr rc.subr 8 framework. You should set .Sq wsmoused_user="" in .Xr rc.conf 5 to a safer user (and adjust file permissions accordingly) if the commands you want to execute do not require superuser privileges. An alternative is to use .Xr su 1 as part of the command string in the configuration file. .Pp When enabling the kernel option .Cd options WSDISPLAY_CHARFUNCS , only needed by the .Sq selection mode, be absolutely sure that .Pa /dev/ttyE* devices have restrictive permissions; the mouse uses some functions that could allow terminal snooping if improperly set. .Sh NOTES The following notes apply to all work modes: .Bl -bullet .It When switching from the X screen to a text terminal, there is a small delay (five seconds) until the mouse works again. This time is used by X to close the mouse device properly. .El .Pp The following notes apply to the .Sq selection mode only: .Bl -bullet .It The mouse cursor is only visible for a short period of time. It will disappear when you stop moving it to avoid console corruption (which happens if it is visible and there is text output). .It .Cd options WSDISPLAY_CHARFUNCS is needed in your kernel configuration file. .It You need to change the getty program which is run in the first virtual terminal to use .Pa /dev/ttyE0 instead of .Pa /dev/console . To do this, edit .Pa /etc/ttys and .Pa /etc/wscons.conf . .El .Sh SEE ALSO .Xr su 1 , .Xr wscons 4 , .Xr wsdisplay 4 , .Xr wsmouse 4 , .Xr rc.conf 5 , .Xr ttys 5 , .Xr wscons.conf 5 , .Xr wsmoused.conf 5 , .Xr moused 8 , .Xr rc.subr 8 .Sh HISTORY The .Nm command first appeared in .Nx 2.0 . .Sh AUTHORS The .Nm command was developed by .An Julio M. Merino Vidal .Aq jmmv@NetBSD.org .