LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   how can i configure mouse on Ubuntu 10.10 (https://www.linuxquestions.org/questions/ubuntu-63/how-can-i-configure-mouse-on-ubuntu-10-10-a-883282/)

weiguixm 05-28-2011 11:43 PM

how can i configure mouse on Ubuntu 10.10
 
I've wrote a virtual mouse driver,and a new file /dev/input/event3 was created.
My linux distribution is Ubuntu 10.10.
Now I wana make this device to be mouse.
How to make the configuration? Someone told me to configure file /etc/X11/xorg.conf. But this file doesn't exist. Should I create a new one and edit it? If yes, what the content should it have?
What's more,I found some configure files in /usr/share/X11/xorg.conf.d/ like "50-vmmouse.conf" (I'm using a VMware). Should I add a new configure file in this directory?

RockDoctor 05-29-2011 07:36 AM

If you need to create an xorg.conf file,
Code:

sudo Xorg -configure :1
from a terminal window will create the file /root/xorg.conf.new, which you can then edit as necessary, then copy to /etc/X11/xorg.conf.

weiguixm 05-29-2011 08:09 PM

Quote:

Originally Posted by RockDoctor (Post 4370082)
If you need to create an xorg.conf file,
Code:

sudo Xorg -configure :1
from a terminal window will create the file /root/xorg.conf.new, which you can then edit as necessary, then copy to /etc/X11/xorg.conf.

Thanks for you reply!
Xorg can't work while X window is on. So I turn it off and got then file /root/xorg.conf.new in text mode. When I finish execute the command Xorg -configure :1, linux show this message:
To test the server, run 'X -config /root/xorg.conf.new'
But after I execute this command, the displayer shows nothing but a black screen.

I move the file /root/xorg.conf.new to /etc/X11/xorg.conf and reboot the machine. But it seems that this configure file doesn't work. I don't know where the problem is. Maybe some commands need to be execute to make the configure file work. Or maybe the auto generated configure file contains some errors.

What I need is just to make X window point /dev/input/event3(I created it) to mouse. So I think a configure file about mouse and some command make it work is OK.

RockDoctor 05-30-2011 06:23 AM

I think the input device section of your xorg.conf file probably needs some editing. I've never configured a second mouse, but here's my WAG:
Code:

Section "ServerLayout"
        Identifier    "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Mouse1" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "InputDevice"
        Identifier  "Mouse1"
        Driver      "mouse"
        Option            "Protocol" "auto"
        Option            "Device" "/dev/input/event3"
EndSection

Hopefully there's someone reading this who actually knows what they're doing who can give you better guidance.

weiguixm 06-08-2011 09:53 PM

I tunred to the driver level now. I registered a new input_dev as a virtual mouse to the kernel, and it seems it does work now.
Now my physical mouse and virtual mouse can both work. I guess both thess two input_dev is attached to /dev/input/mice. And X window read /dev/input/mice to cathc information from mouses.

I will dig into X window to see the detail later.
Thanks Rock Doctor for your help !


All times are GMT -5. The time now is 04:48 PM.