1*01869ca4Swiz.\" $NetBSD: wsmoused.8,v 1.19 2017/07/03 21:35:32 wiz Exp $ 2784751cdSchristos.\" 368e2c804Sjmmv.\" Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. 4784751cdSchristos.\" All rights reserved. 5784751cdSchristos.\" 6784751cdSchristos.\" This code is derived from software contributed to The NetBSD Foundation 715ba1217Sjmmv.\" by Julio M. Merino Vidal. 8784751cdSchristos.\" 9784751cdSchristos.\" Redistribution and use in source and binary forms, with or without 10784751cdSchristos.\" modification, are permitted provided that the following conditions 11784751cdSchristos.\" are met: 12784751cdSchristos.\" 1. Redistributions of source code must retain the above copyright 13784751cdSchristos.\" notice, this list of conditions and the following disclaimer. 14784751cdSchristos.\" 2. Neither the name of The NetBSD Foundation nor the names of its 15784751cdSchristos.\" contributors may be used to endorse or promote products derived 16784751cdSchristos.\" from this software without specific prior written permission. 17784751cdSchristos.\" 18784751cdSchristos.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19784751cdSchristos.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20784751cdSchristos.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21784751cdSchristos.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22784751cdSchristos.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23784751cdSchristos.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24784751cdSchristos.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25784751cdSchristos.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26784751cdSchristos.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27784751cdSchristos.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28784751cdSchristos.\" POSSIBILITY OF SUCH DAMAGE. 2968e2c804Sjmmv.\" 30067d9a87Swiz.Dd January 1, 2012 31784751cdSchristos.Dt WSMOUSED 8 32784751cdSchristos.Os 33784751cdSchristos.Sh NAME 34784751cdSchristos.Nm wsmoused 35a7932312Sjmmv.Nd multipurpose mouse daemon 36784751cdSchristos.Sh SYNOPSIS 37784751cdSchristos.Nm 38784751cdSchristos.Op Fl d Ar device 3968e2c804Sjmmv.Op Fl f Ar conf_file 4015ba1217Sjmmv.Op Fl m Ar modes 4168e2c804Sjmmv.Op Fl n 42784751cdSchristos.Sh DESCRIPTION 43784751cdSchristosThe 44784751cdSchristos.Nm 45784751cdSchristosdaemon provides mouse support in console, allowing copying and pasting 4668e2c804Sjmmvtext. 4768e2c804SjmmvThe left mouse button is used to select text when held and you 48784751cdSchristosuse the right button to paste it in the active console. 49784751cdSchristos.Pp 50784751cdSchristosSupported options are as follows: 510384eb0eSwiz.Bl -tag -width XfXconfXfileXX 52784751cdSchristos.It Fl d Ar device 5368e2c804Sjmmvspecifies the device file to be used as the 5468e2c804Sjmmv.Xr wsmouse 4 5568e2c804Sjmmvdevice. 5668e2c804SjmmvDefaults to 57784751cdSchristos.Pa /dev/wsmouse . 5868e2c804Sjmmv.It Fl f Ar conf_file 5968e2c804Sjmmvspecifies the configuration file to be used. 6068e2c804SjmmvDefaults to 6168e2c804Sjmmv.Pa /etc/wsmoused.conf . 6215ba1217Sjmmv.It Fl m Ar modes 6315ba1217Sjmmvspecifies which modes should be activated. 6415ba1217SjmmvMode names are given in the argument as a whitespace separated list. 6515ba1217SjmmvOverrides the 6615ba1217Sjmmv.Sq modes 6715ba1217Sjmmvdirective in the configuration file. 68c89a2196Swiz.It Fl n 69c89a2196Swizdo not fork in the background (for debugging purposes). 7015ba1217SjmmvOverrides the 7115ba1217Sjmmv.Sq nodaemon 7215ba1217Sjmmvdirective in the configuration file. 73784751cdSchristos.El 7468e2c804Sjmmv.Pp 7568e2c804SjmmvMany other details can be tuned. 7668e2c804SjmmvSee 7768e2c804Sjmmv.Xr wsmoused.conf 5 7868e2c804Sjmmvfor more information. 79a7932312Sjmmv.Pp 80a7932312Sjmmv.Nm 81a7932312Sjmmvis designed to be a multipurpose mouse daemon. 82d1625473SwizFunctionality is provided through independent 83a7932312Sjmmv.Em modes , 84d1625473Swizenabled either through the 85a7932312Sjmmv.Fl m 86d1625473Swizflag or through the 87a7932312Sjmmv.Sq modes 88a7932312Sjmmvproperty in the configuration file (the former takes precedence). 89a7932312Sjmmv.Ss The action mode 90a7932312SjmmvThe 91a7932312Sjmmv.Sq action 9254ad3f67Ssnjmode executes commands upon receiving mouse button events. 9354ad3f67SsnjCommands can be associated on a button basis, and can differentiate between 94a7932312Sjmmvpush or release events. 95a7932312Sjmmv.Ss The selection mode 96a7932312SjmmvThe 97a7932312Sjmmv.Sq selection 98a7932312Sjmmvmode provides visual copy and paste support in text consoles when using 99a7932312Sjmmvthe 100a7932312Sjmmv.Xr wscons 4 101a7932312Sjmmvdevice. 10254ad3f67SsnjA selection is created by clicking with the primary mouse button at any 103a7932312Sjmmvpoint on the screen and dragging it while clicked. 104a7932312SjmmvWhen the button is released, the selected text is copied to an internal 105a7932312Sjmmvbuffer for further pasting with the secondary button. 106784751cdSchristos.Sh FILES 10768e2c804Sjmmv.Bl -tag -width /dev/wsmoused.conf -compact 10819c91750Schristos.It Pa /dev/ttyE[0-n] 109784751cdSchristostty devices 11019c91750Schristos.It Pa /dev/ttyEstat 111784751cdSchristoswsdisplay status notification device 11268e2c804Sjmmv.It Pa /dev/wsmouse[0-n] 1135cefaa73Schristosmouse control device 11468e2c804Sjmmv.It Pa /etc/wsmoused.conf 11568e2c804Sjmmvdefault configuration file 116784751cdSchristos.El 117067d9a87Swiz.Sh SEE ALSO 118067d9a87Swiz.Xr su 1 , 119067d9a87Swiz.Xr wscons 4 , 120067d9a87Swiz.Xr wsdisplay 4 , 121067d9a87Swiz.Xr wsmouse 4 , 122067d9a87Swiz.Xr rc.conf 5 , 123067d9a87Swiz.Xr ttys 5 , 124067d9a87Swiz.Xr wscons.conf 5 , 125067d9a87Swiz.Xr wsmoused.conf 5 , 126067d9a87Swiz.Xr moused 8 , 127067d9a87Swiz.Xr rc.subr 8 128067d9a87Swiz.Sh HISTORY 129067d9a87SwizThe 130067d9a87Swiz.Nm 131067d9a87Swizcommand first appeared in 132067d9a87Swiz.Nx 2.0 . 133067d9a87Swiz.Sh AUTHORS 134067d9a87SwizThe 135067d9a87Swiz.Nm 136067d9a87Swizcommand was developed by 137067d9a87Swiz.An Julio M. Merino Vidal 138067d9a87Swiz.Aq jmmv@NetBSD.org . 139067d9a87Swiz.Sh CAVEATS 140067d9a87Swiz.Nm 141067d9a87Swizdoes work properly only with display drivers, which implement 142067d9a87Swiz.Dv WSDISPLAYIO_GETWSCHAR 143067d9a87Swizand 144067d9a87Swiz.Dv WSDISPLAYIO_PUTWSCHAR 145067d9a87Swizioctls. 146067d9a87SwizCurrently only 147067d9a87Swiz.Xr vga 4 148067d9a87Swizand drivers utilizing 149067d9a87Swiz.Xr vcons 9 150067d9a87Swizsupport it. 151784751cdSchristos.Sh SECURITY CONSIDERATIONS 152a7932312SjmmvWhen using the 153a7932312Sjmmv.Sq action 154a7932312Sjmmvmode, commands specified in the configuration file are executed as the 155a7932312Sjmmvuser who started the daemon. 156a7932312SjmmvBy default, this user is 157a7932312Sjmmv.Sq root 158a7932312Sjmmvwhen using the 159a7932312Sjmmv.Xr rc.subr 8 160a7932312Sjmmvframework. 161a7932312SjmmvYou should set 162*01869ca4Swiz.Sq wsmoused_user="<some_user>" 163a7932312Sjmmvin 164a7932312Sjmmv.Xr rc.conf 5 165a7932312Sjmmvto a safer user (and adjust file permissions accordingly) if the commands 166a7932312Sjmmvyou want to execute do not require superuser privileges. 167a7932312SjmmvAn alternative is to use 168a7932312Sjmmv.Xr su 1 169a7932312Sjmmvas part of the command string in the configuration file. 170784751cdSchristos.Sh NOTES 171a7932312SjmmvThe following notes apply to all work modes: 172a7932312Sjmmv.Bl -bullet 173a7932312Sjmmv.It 174a7932312SjmmvWhen switching from the X screen to a text terminal, there is a small 175a7932312Sjmmvdelay (five seconds) until the mouse works again. 176a7932312SjmmvThis time is used by X 177784751cdSchristosto close the mouse device properly. 178a7932312Sjmmv.El 17949cc9b7cSchristos.Pp 180a7932312SjmmvThe following notes apply to the 181a7932312Sjmmv.Sq selection 182a7932312Sjmmvmode only: 183a7932312Sjmmv.Bl -bullet 184a7932312Sjmmv.It 185a7932312SjmmvThe mouse cursor is only visible for a short period of time. 186a7932312SjmmvIt will disappear 187a7932312Sjmmvwhen you stop moving it to avoid console corruption (which happens if 188a7932312Sjmmvit is visible and there is text output). 189a7932312Sjmmv.It 190a7932312SjmmvYou need to change the getty program which is run in the first 19149cc9b7cSchristosvirtual terminal to use 19249cc9b7cSchristos.Pa /dev/ttyE0 19349cc9b7cSchristosinstead of 19449cc9b7cSchristos.Pa /dev/console . 195a7932312SjmmvTo do this, edit 19649cc9b7cSchristos.Pa /etc/ttys 19749cc9b7cSchristosand 198a7932312Sjmmv.Pa /etc/wscons.conf . 199a7932312Sjmmv.El 200