From owner-freebsd-mobile Fri Feb 25 15:30:18 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from swan.en-bio.com.au (swan.en-bio.COM.AU [203.35.254.3]) by hub.freebsd.org (Postfix) with ESMTP id 746F637C02A for ; Fri, 25 Feb 2000 15:30:06 -0800 (PST) (envelope-from Tony.Maher@eBioinformatics.com) Received: from shad.internal.en-bio (www-cache.en-bio.com.au [203.35.254.2]) by swan.en-bio.com.au (8.9.1a/8.9.1) with ESMTP id KAA18257 for ; Sat, 26 Feb 2000 10:30:03 +1100 Received: (from tonym@localhost) by shad.internal.en-bio (8.9.1b+Sun/8.9.1) id KAA22901 for freebsd-mobile@FreeBSD.ORG; Sat, 26 Feb 2000 10:29:34 +1100 (EST) Date: Sat, 26 Feb 2000 10:29:34 +1100 (EST) From: Tony Maher Message-Id: <200002252329.KAA22901@shad.internal.en-bio> To: freebsd-mobile@FreeBSD.ORG Subject: multiple mice at startup Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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