Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Aug 2003 21:39:25 -0500
From:      "Charles Howse" <chowse@charter.net>
To:        <freebsd-questions@freebsd.org>
Subject:   RE: Copying and pasting text w/ mouse
Message-ID:  <000201c3639f$9ba7c840$04fea8c0@moe>
In-Reply-To: <3F3D70DB.5010403@comcast.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> Here's a thought. What happens when you switch away then switch back 
> kill moused then restart moused? I'm thinking that maybe a cron job 
> could be created to check mouse states and kill then restart moused.

Very interesting...

#!/usr/local/bin/bash
# Kill and restart moused

ps -wax | grep moused > /dev/null 2>&1
if [ $? -eq 0 ] ; then
    m=`ps -wax | grep moused | cut -d" " -f3`
    kill $m
    if [ $? -eq 0 ] ; then 
	echo "Killed mouse daemon"
    else
    	echo "Unable to kill mouse daemon"
	exit
    fi
fi
moused -p /dev/psm0 -t auto
if [ $? -eq 0 ] ; then
    echo "Restarted mouse daemon successfully"
else
    echo "Unable to restart mouse daemon"
fi


This works in principle, but I have to do it 4 or 5 times after
switching back from windows.
Any time I move the mouse, things go haywire, until I finally reset it
enough times.
I'm satisfied for the time being, thanks for the suggestion, and thanks
to everyone who replied!




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000201c3639f$9ba7c840$04fea8c0>