home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 20693 < prev    next >
Encoding:
Text File  |  1992-12-16  |  3.4 KB  |  108 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!mailgzrz.TU-Berlin.DE!math.fu-berlin.de!Sirius.dfn.de!tubsibr!infbssys!eis.cs.tu-bs.de!andersen
  3. From: andersen@eis.cs.tu-bs.de (Kai Andersen)
  4. Subject: Re: HELP - How can I activate my middle mousebutton?
  5. Message-ID: <1992Dec16.182141.11938@ips.cs.tu-bs.de>
  6. Sender: news@ips.cs.tu-bs.de (News Software)
  7. Nntp-Posting-Host: ss11.eis.cs.tu-bs.de
  8. Organization: TU Braunschweig,Informatik,EIS,West Germany
  9. References:  <1992Dec14.093935.29645@ips.cs.tu-bs.de>
  10. Date: Wed, 16 Dec 1992 18:21:41 GMT
  11. Lines: 95
  12.  
  13. I got a solution for this problem via mail.
  14. I think it is so important, that I post this followup.
  15.  
  16. Some additional notes:
  17. You must start this tiny program in the xinitrc. Tries to call
  18. this program before (e.g. in the /etc/rc) didn't work.
  19. Also it must call again, when you exit and restart X11.
  20.  
  21. Perhapst somebody can post me, what happen exactly. How works
  22. a 3-button-mouse and how a 2-button-mouse?
  23.  
  24. Bye,
  25. Kai Andersen.
  26.  
  27. But now the solution, that I got:
  28.  
  29. ----
  30.  
  31. From rocket.sanders.com!nation@rocket.sanders.lockheed.com Mon Dec 14 19:57:26 1992
  32. Return-Path: <rocket.sanders.com!nation@rocket.sanders.lockheed.com>
  33. Received: from relay2.UU.NET by bseis.eis.cs.tu-bs.de (4.1/SMI-4.1)
  34.         id AA13232; Mon, 14 Dec 92 19:57:23 +0100
  35. Received: from uunet.uu.net (via LOCALHOST.UU.NET) by relay2.UU.NET with SMTP 
  36.         (5.61/UUNET-internet-primary) id AA17090; Mon, 14 Dec 92 10:35:21 -0500
  37. Received: from rocket.UUCP by uunet.uu.net with UUCP/RMAIL
  38.         (queueing-rmail) id 103418.19821; Mon, 14 Dec 1992 10:34:18 EST
  39. Received: from dopey.sanders.lockheed.com.spcot by rocket.sanders.com (4.1/SMI-4.1)
  40.         id AA18078; Mon, 14 Dec 92 10:30:47 EST
  41. Date: Mon, 14 Dec 92 10:30:47 EST
  42. From: nation@rocket.sanders.com (Robert Nation)
  43. Message-Id: <9212141530.AA18078@rocket.sanders.com>
  44. To: andersen@eis.cs.tu-bs.de
  45. Subject: # button mouse with Linux/X
  46. Status: OR
  47.  
  48. Maybe this will help you:
  49.  
  50. Here's how I got my three button microsoft-compatible mouse working 
  51. in 3 button mode:
  52.  
  53. 1. Change the mouse type to mousesystems in xconfig
  54.  
  55. Mousesystems "/dev/ttys1"
  56.   BaudRate      1200
  57. #  SampleRate   150
  58. #  Emulate3Buttons
  59.  
  60. 2. Compile this program, and call it /usr/bin/mouse3:
  61.  
  62. #include <assert.h>
  63. #include <unistd.h>
  64. #include <fcntl.h>
  65. #include <sys/ioctl.h>
  66. #include <linux/termios.h>
  67.  
  68. void main(int argc, char **argv)
  69. {
  70.   int fd;
  71.   int val;
  72.   if(argc!=2)
  73.     {
  74.       printf("Usage: mouse3 device\n");
  75.       exit(1);
  76.     }
  77.  
  78.   
  79.   assert(fd=open(argv[1],O_RDWR|O_NDELAY));
  80.   val=0;
  81.   ioctl(fd,TIOCMSET,&val);
  82.  
  83. }
  84.  
  85. 3. Add this lines to /usr/lib/X11/xinit/xinitrc:
  86.  
  87. xterm -geometry 80x34+0+0  -C -T Console -e /bin/bash&
  88. /usr/bin/mouse3 /dev/ttys1                           <----this is the addtition
  89. exec twm 
  90.  
  91. ----> (Additional note: call it early, as the first program)
  92.  
  93. 4. Startx.
  94.  
  95. I really don't know quite why it works, but why complain? It seems that
  96. the microsoft 3 button mouse looks like a mousesystems mouse when its in
  97. 3 button mode. Also to switch it to three button mode, you need to do
  98. whatever the mouse3 program does, but you have to do it after X  gets
  99. started, since it seems that X's startup code undoes the effect required
  100. to get into 3 button mode.
  101.  
  102. ----> (Additional note: At the beginning of the first movement, the mouse
  103.        get crazy, but it's normal).
  104.  
  105.                         Regards,
  106.                         Rob Nation
  107.                         Lockheed-Sanders
  108.