Two-mouse support in Linux

16 replies [Last post]
Joined: 09/01/2009

Back to Linux...
I noticed that WOG had support for two (or more) mice in Linux, so I plugged in a second mouse to my computer and changed that thingee in config.txt that it said to change (can't exactly remember what it was now, but I know I changed it). Anyway, after firing up WOG, both mice controlled the same, default, cursor. Is there something I need to install on Linux to enable two-mouse support? I'm running Ubuntu 9.10, if that helps any.

Joined: 11/29/2009

Try the readme. It says that you need to enable read access to a /dev entry. Also, your Linux may be handling mice differently. Are you using a touchpad?

Author of World of Goo Portable. Download here!

Joined: 12/06/2009

Ubuntu? that's a nice OS

My profile of awesomeness | Me on skype: pokelucas2000 | My drop | Me on...umm....I forgot Tongue Laughing out loud

Joined: 12/23/2008

The tricky thing is that the mouse devices must be readable by the user that runs the game. There are at least two things that can prevent that. One is insufficient file permissions (which is discussed in the README). The second is the devices being opened in exclusive mode by some other application.

The problem with recent versions of X was that they use the hardware abstract layer (HAL) causing the server to open all available mouse devices exclusively, regardless of whether the server needs or even user their input, and then the game cannot open them anymore.

You can work around this by disabling the HAL in the Xorg configuration, but I wouldn't recommend it unless you are a reasonably sophisticated Linux user and know what you are doing. An incorrect configuration may render your system unusable! At the very least, I recommend backing up your Xorg.conf before messing with it.

To work around the HAL, disable the AutoAddDevices option and manually configure a mouse and a keyboard. For example, in /etc/X11/xorg.conf:

Section "ServerLayout"
    # more stuff here...
        InputDevice    "Keyboard0"       "CoreKeyboard"
        InputDevice    "Mouse0"          "CorePointer"
        Option         "AutoAddDevices"  "false"
EndSection
 
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbLayout" "us"
    # more options here, if you like
EndSection
 
Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "CorePointer"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
    # more options here, if you like
EndSection

Maybe there is a better way to do this in Ubuntu; if there are advanced Ubuntu users reading along, please comment. Wink

Joined: 09/01/2009

Problem is, I'm new to Linux, and it won't let me edit stuff in any of the folders (example: can't even copy over the res directory to /op/World of Goo). How do I change the security settings to stop this OS from blocking me?

GMMan: Nope, just a couple mice. One USB, one PS/2. With two USB mice, same problem.

And I tried what the README said, and Ubuntu just denied me access.

Joined: 10/16/2009

Hmm...I have Ubunto on a Virtual PC...

I never tried anything in that nature, but keep trying!

Joined: 09/01/2009

Any ideas, guys? I'm still slammed against the brick wall of Ubuntu's evil security system...

Joined: 12/06/2009

i never had those problems, cuz i never tried it Laughing out loud

NEW SIIIIIIIIIIIIIIIIIIIGGGGGGGGG

My profile of awesomeness | Me on skype: pokelucas2000 | My drop | Me on...umm....I forgot Tongue Laughing out loud

Joined: 10/16/2009

GooMaster2000 wrote:
NEW SIIIIIIIIIIIIIIIIIIIGGGGGGGGG

What is that supposed to mean? Laughing out loud

thB
thB's picture
ContributorAddin AuthorKleptomaniacToo Much Free TimeSerious OCD
Joined: 04/17/2009

That he has a new signature.

my gooey profile | my video channel | author of Hazardous Environment

Joined: 12/31/2009

Most people like to look at sigs sometimes, ("I'm a banana!", "Tacos rule... oh AND World of goo Wink " and etc.) So I'm pretty sure that your sig wouldn't have gone un-noticed, but people like enthusiasm! Smile

Joined: 12/06/2009

that weird looking thing in your sig is SUSHI (if it isn't .... ITS AN ALIEN!!!)

My profile of awesomeness | Me on skype: pokelucas2000 | My drop | Me on...umm....I forgot Tongue Laughing out loud

Joined: 12/31/2009

wait...WHAT!?!

Joined: 10/16/2009

lolwow

Joined: 12/31/2009

My comment is my sig! (right now anyway) (this could change in the future, so if I change my sig, It won't make sense, so don't bother.)

Joined: 09/01/2009

Uh, still no answer for Linux security system?...

Joined: 12/06/2009

got karamac koala and not even wog is running! which one do i download?

My profile of awesomeness | Me on skype: pokelucas2000 | My drop | Me on...umm....I forgot Tongue Laughing out loud