Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to run VMware Workstation and/or VirtualBox on Ubuntu. The virtual machines are working perfectly in both applications, except for the extra mouse buttons (forward/backward). In Ubuntu the mouse buttons are all working.

Virtualization applications: VMware Workstation 10.0.1, latest VirtualBox

Ubuntu versions I tested as host: 12.04, 13.10, 14.04 beta

Guest OS I tested: Windows 7, several Linux OS in live-mode

Mice I tested (all with side buttons): Logitech M510 (unifying receiver), old Razer Copperhead, no-name-mouse

I already tried a lot of solutions I found online e.g. changing the mouse-settings in .vmx on VMware WS (mouse.vusb.enable, ...) , changing the input-settings on VMware/VirtualBox, reinstall guest tools on guest OS, ...

I think it's a problem in Ubuntu and not in the virtualization applications. Does anyone have a solution for this?

share|improve this question
    
mika209: can you run xev | grep -i "button" in a terminal in the Guest OS? Then move to the window, click your mouse forward and back button. Please add the output to your question or to ubuntu pastebin for readability. –  Anders F. U. Kiær Apr 13 at 20:26

3 Answers 3

up vote 1 down vote accepted

Possible workaround:

After editing the VM's .vmx file to add

mouse.vusb.enable = "TRUE"
mouse.vusb.useBasicMouse = "FALSE"
usb.generic.allowHID = "TRUE"

you'll be able to use your five-button mouse in the VM. To do so, open your VM, then navigate to Virtual Machine > Removable Devices > [Your Mouse] > Connect (Disconnect from Host). You'll get a couple warnings that you won't be able to use your most with the host anymore, and just click OK.

Now you can only use your mouse within the VM whether it's full-screen or in windowed mode. Hit Ctrl-G on your keyboard to get rid of the host mouse icon and fully immerse yourself in the VM. Once you need your mouse again outside the VM, hit Ctrl+Alt, then release. Now the focus is back to your host OS. Hold Alt and push V to bring up the Virtual Machine menu, and use your arrow keys to navigate to Virtual Machine > Removable Devices > [Your Mouse] > Disconnect (Connect to Host).

Now everything is back to normal. Hopefully something will change in either Ubuntu or VMWare Player soon to make it easier than this.

share|improve this answer
    
Yes, I already tried adding usb.generic.allowHID = "TRUE" to the VMware .vmx settings. After that you can connect the mouse/HIDs directly to the virtual machine. But I think this is more a workaround than a solution.. –  mika209 Apr 1 at 18:00
    
Agreed. It works if you plan on working exclusively in the VM for a significant period of time, but in the end isn't very user friendly –  MattSayar Apr 1 at 21:34

To get extra mouse buttons to work under VMware, edit configfile.vmx (append following lines):

mouse.vusb.enable = "TRUE"
mouse.vusb.useBasicMouse = "FALSE"

The above settings will enable a virtual vmware mouse with 20 buttons. However, in certain situations vmware is not mapping the mouse event arriving at the host to the correct guest event.

Exactly why it fails to send the correct mouse event is a good question that is not covered.

Start and run the following in the guest os. Run xev | grep -i "button" in a terminal. Move to the spawned window, click the buttons you wanna assign or swap once. xev outputs the registered mouse event, in many cases the extra mouse buttons that should be eg. mouse button 8 or 9 is received as mouse button event 16 or 17.

The reassigning of mouse button events can be done with eg. xinput, the following makes deviceID 8 having mouse button 16 acting as mouse 8, and mouse 17 as mouse 9.

xinput set-button-map 8 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 9
share|improve this answer
    
I already tried this. Unfortunately this did not work. –  mika209 Apr 4 at 9:01
    
@mika209 you did use basicmouse? Have you installed the vmware tools in guest os? –  Anders F. U. Kiær Apr 4 at 22:38
    
Yes, I've installed the VMware-Tools in every VM. The .basicmouse = FALSE - settings didn't change anything. But it doesn't work in VirtualBox either. So I still think it's a problem in Ubuntu. –  mika209 Apr 5 at 13:18
    
@mika209 can you add the output of the command xinput | grep VMware | awk '{print substr($8,4);}' | xargs -L 1 xinput list to your question or paste.ubuntu.com Run the command on your ubuntu guest, and make sure the above mentioned settings are still present in that virtual machines vmx file. –  Anders F. U. Kiær Apr 5 at 19:56
1  
This worked perfectly for me: Windows 7 x64 (Host) + SetPoint 6.65.62 + M705 Logitech Mouse, VMWare 10, Kubuntu 14.04 x64 (guest). I could see the results of xev | grep -i "button" right away the and correct button events 8/9 mapped to back/forward. It works as is on Chrome & Firefox without any other configuration on the linux box. –  Agelos Pikoulas Aug 17 at 16:04

You can't emulate more than 3 buttons in VirtualBox and VMware. This is because it presents to the guest system an (super) standard 3-button mouse. It could be possible if they like, but right now the answer is no.


So, why it works in Windows? Because the Linux and Windows implementations follow different roadmap, and "each front-end has its own way of getting at mouse input" (source). This can be seen in another question of Super User

share|improve this answer
    
If you use Windows 7/8 as host with VMware or VirtualBox the extra mouse buttons are working in many guest-OS. How is that possible? –  mika209 Apr 7 at 11:11
    
@mika209 different implementations. Is just as simple. –  Braiam Apr 7 at 12:26
1  
@braiam: I can not tell what is true for VirtualBox, but I can tell that VMware Workstation and Player supports 24 buttons. I will come back with an updated and expanded answer when I have time. For correctness in the meantime, it would be nice if you updated your answer to not include VMware. –  Anders F. U. Kiær Apr 11 at 1:29
    
@AndersF.U.Kiær following OP comment here it apparently doesn't work. –  Braiam Apr 24 at 20:53
    
@braiam, if you check the timestamps can you easily see that OP did not try the updated answer, nor followed up running the xev. However, i couldn't care less anymore. I reproduced the issue, as i use the same setups with vmware alot. I have now shared the knowledge. If others wanna play a ignorant game, feel free. –  Anders F. U. Kiær Apr 24 at 21:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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