Date: Sat, 26 Feb 2000 10:29:34 +1100 (EST) From: Tony Maher <Tony.Maher@eBioinformatics.com> To: freebsd-mobile@FreeBSD.ORG Subject: multiple mice at startup Message-ID: <200002252329.KAA22901@shad.internal.en-bio>
next in thread | raw e-mail | index | archive | help
Hello, I have been using external ps2 mouse on my laptop but it is annoying as have to suspend (or switch off) to disconnect it. Recently got a usb mouse which works perfectly apart from having to kill -HUP the moused daemon after reinserting (as per man page). Then started looking at having 2 mice running simulatenous (the inbuilt mouse plus usb) and read man page for moused - perfect run 2 moused, works beautifully. I added "/usr/sbin/moused -p /dev/psm0 -t auto" to rc.local and normal moused in rc.conf. Works fine, except overwrote /var/run/moused.pid. No problem: "/usr/sbin/moused -p /dev/psm0 -t auto -I /var/run/moused-psm0.pid" But wondered wheter it would be nicer to modify rc.i386 and rc.conf to handle multiple mice. And modify filenames /var/run so you know which moused is running on which port. WARNING - Only been playing with the following on command line and not as root. -------------------- Addtion to defaults/rc.conf moused_extra="" # list mice defintion numbers that are attempted to start -------------------- Addtions to rc.conf (for example) moused_extra="1 2 29" moused_flags1="-m 2=4" moused_port1="/dev/psm0" moused_type1="auto" moused_flags2="" moused_port2="/dev/cua2" moused_type2="busmouse" moused_flags29="" moused_port29="/dev/cua29" moused_type29="29mouse" -------------------- # # rc.i386.test # . /etc/rc.conf # mouse daemon(s) if [ "X${moused_enable}" = X"YES" ] ; then for m in "" ${moused_extra}; do eval mport=\$moused_port${m} if [ ! -n "$mport" ] ; then break fi eval mtype=\$moused_type${m} if [ ! -n "$mtype" ] ; then mtype="auto" fi eval mflag=\$moused_flags${m} port=`echo ${mport} | awk -F '/' '{ print$(NF) }'` echo -n " moused (${port})" echo "" echo "moused ${mflag} -p ${mport} -t ${mtype} -I /var/run/moused-${port}.pid" done echo "vidcontrol <${viddev} -m on" fi -------------------- Should not affect existing installations except for the pid filename in /var/run and change to output at boot up giving port each moused is on. It would be nice if usbd daemon had support for apmd style (apmd.conf and hence rc.resume) to allow it to send kill -HUP to moused on reinsertion of usb mouse - (maybe one day when I get some free time!) This is all on 3.4, dont have a current machine at present. Does current have better usb support (I mean more features, 3.4 is pretty damn good!) Is this useful or a sledgehammer to crack a nut? thanks tonym To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002252329.KAA22901>