23

Is it possible to use more than one mouse in Linux so that there are two pointers controlled by two mice?

or

Can I get raw data like x, y from a second mouse even if there's no pointer?

2
  • When you close a question you should or even must give a detailed reason, not just a general term.
    – LOIS 16192
    Commented Feb 23, 2021 at 7:35
  • linux multiple independent mice googled - brought me here as the top response. Other Answers pointed to other solutions. --- I believe that this was closed because 1. not software stack exchange related -- it will be. 2. two questions --- Both actually critical -----Why ---- We now are at the start of age of immersive technology -- hang on, its going to be a ride, live long and enjoy
    – LOIS 16192
    Commented Feb 23, 2021 at 8:04

3 Answers 3

26

I've found a way to do it, but it causes major tearing with Gnome.

  1. Open a terminal and type in xinput (all commands should be done as normal user).
    Look at the id of one of your mice.

  2. Then create a new master device with this command xinput create-master "name".

  3. Now you just need to reattach one of your mice to the new master xinput reattach "mouse id" "new master id".

Note this works but is not practical, at least until it's implemented properly in the GUI. To revert this you will probably have to do it blind, but the commands are as follows xinput reattach "mouse id" "old master id" then xinput remove-master "new master id".

Notes:

  • "name" means the name to give the new master, anything will work
  • "mouse id" is the id number of the mouse you want to attach to the new master
  • "new master id" is the id number of the new master you created
  • "old master id" is the id number of the master that was there to begin with
5
  • This causes Xorg to segfault for me.
    – Hjulle
    Commented Sep 15, 2014 at 12:17
  • 2
    This worked! but unity-panel got segfaulted.. The use case for this feature is: on laptop with trackpoint and touchpad, two windows side by side. Then I would love to use trackpoint for the left window and touchpad for the right one (so you don't have to rush the pointer between windows).
    – Ayrat
    Commented Sep 14, 2015 at 6:04
  • 1
    Still works flawlessly in 2019 with Linux Mint 19. Now if only there was a way of making the one cursor black and the other white to more easily differentiate between the two. Commented Mar 12, 2019 at 10:23
  • No one seemed to mention Multiseat, so here it is help.ubuntu.com/community/MultiseatX
    – martian17
    Commented Oct 17, 2019 at 1:10
  • Works like a charm with AwesomeWM, Jan. 2021. I made a gist for your reply gist.github.com/iacchus/bf2a5a517db31c379772401b0ddf8188
    – Iacchus
    Commented Jan 15, 2021 at 15:25
4

Easy. Use a program like openpie and write your own multiple mouse script (a lot easier than it sounds, I think you can find a pre-written dual mouse glovepie script [just google 'glovepie dual mouse')] NB: you will need more than one input method for separate mouse control.

Good luck I used 6 mice at once :)

3

You'll need to replace your window manager with one that supports double mice. The only one that does this is an experimental one based off of icewm.

https://multicursor-wm.sourceforge.net

You'll also need to update your XServer to support multiple mice.

https://en.wikipedia.org/wiki/Multi-Pointer_X

Not the answer you're looking for? Browse other questions tagged or ask your own question.