From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6cac,5f303ca95ac3ab0b,start X-Google-Attributes: gidf6cac,public X-Google-Thread: 10d4db,5f303ca95ac3ab0b,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1994-01-09 05:31:29 PST Xref: gmd.de comp.windows.x.i386unix:6833 comp.os.linux.announce:1673 Path: gmd.de!xlink.net!howland.reston.ans.net!pipex!uunet!EU.net!news.funet.fi!hydra.Helsinki.FI!klaava!klaava!not-for-mail From: kitson@tazenda.trl.OZ.AU (Barry Kitson) Newsgroups: comp.windows.x.i386unix,comp.os.linux.announce Subject: "Truemouse" mice - Solution to 3rd button woes Followup-To: comp.windows.x.i386unix Date: 9 Jan 1994 15:19:44 +0200 Organization: Telecom Research Labs, Melbourne, Australia Sender: wirzeniu@klaava.Helsinki.FI Message-ID: <2gp09g$9e8@klaava.Helsinki.FI> NNTP-Posting-Host: klaava.helsinki.fi Keywords: Truemouse As there seems to be heaps of interest in the Linux and XFree86 world, here's a solution to the Truemouse middle button question. This seems to work for my Truemouse 300, but I don't give any guarantees that it will or won't work for your rodent. All this does is provide a software switch to convince the mouse to act in "PC"/"MouseSystems"-like mode. (Hint: set your Xconfig file to use MouseSystems, and get rid of the 3-button emulation switch. ) The source code is pretty short. Under a Slackware Linux distribution, the following can be compiled: #include #include #include main() { if( ioperm( 0x3fc, 1, 1 ) ) { fprintf( stderr, "Can't get I/O permissions.\n"); fprintf( stderr, "Must run as root.\n"); exit(-1); } __asm__ __volatile__ ("mov %w0,%%edx; outb %b1, %%dx" : : "i" (0x3fc), "a" (0x0a) ); } The executable produced MUST be run after X is started. The easiest way to do this is to call it from the .Xinitrc script in your users' home directories. This is ugly, but is the way I do it. Please let me know if you have an elegant solution. The executable must also be setuid root. Just use chmod (and put the command in eg the X386/bin directory, or whatever it's called). I can send the binary if anyone wants it. If I hear reports about it being useful, I'll do something about the FAQ and uploading the binary, particularly if someone suggests a good way of shifting this thing out of the .xinitrc file. But this might take a while, 'cause my harddisk just took a dive and I'll be pretty busy recovering when the replacement arrives :^( :^( :^( I also have work to do :^) Barry. _____________________________________________________________________ | Barry KITSON | Telecom Research Laboratories || \_() | | Voice: +61 3 253 6129 | Telstra //____#_\ | | Fax: +61 3 253 6144 | P.O. Box 249 \\` __\ | | email: b.kitson@trl.oz.au | Clayton VIC 3168, AUSTRALIA \\ ` | |_My opinions are MY OPINIONS, difficult though that may be to grasp._| -- Mail submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu PLEASE remember Keywords: and a short description of the software.