Right click in Ubuntu Virtual Box guest VM is not working

I am running Ubuntu in Virtualbox in Mac OS.

I found that rightclick in the guest Ubuntu, by tapping the trackpad while pressing ctrl key, doesn't work. E.G.

  • it doesn't show the menu for file properties and removal option, when right clicking a file under Nautilus.

  • in chrome browser, when right clicking a link, it doesn't show option to open it in a new tab.

when I connect a wired mouse to macbook pro, right clicking works i.e. brings out properties of a file, etc. So does two-finger tapping the trackpad.

How can I troubleshoot this?


Solution 1:

When ever I'm setting up a guest OS, I find it helpful to do two things.

  1. Open up the OS X system preferences and review every setting on every tab of the mouse and trackpad, paying particular attention to multi button and multitouch gestures and shortcuts.
  2. If you use a trackpad or touch device, connected multibutton mouse over USB to make sure that those settings are passed along to recognized

At that point, you will want to be sure any guest OS additions are loaded in the guest VM. That will make the guest most likely to receive the best input and have drivers on the ubuntu os configured to take advantage of the multi touch / right click events. You can always check the virtual box support forums once you have a specific set of OS versions - you might uncover a bug in the code or they decided to program things as they work intentionally.

Solution 2:

I was able to activate the right click menu in Ubuntu 19.04 running on Virtualbox 6.0.6 on MacBook 2019 with macOS Mojave 10.14.4 using the following key command:

Control + Option + Click

This worked with both left and right Control + Option keys, and worked on external keyboard with external mouse as well as the Trackpad on my MacBook Pro.

Please comment, and confirm my findings. I was personally worried about this as it made working with the Trackpad very difficult on MacBook, and I thought I was always going to have to carry a mouse with my laptop, because I prefer to develop my programs/websites in Ubuntu.