Ubuntu – Mouse suddenly stops working in Ubuntu (running as guest in VirtualBox)

mousevirtualbox

Sometimes in Ubuntu (running as Xubuntu as guest in a VirtualBox on a Windows as host) the mouse stops working in the sense that mouse clicks are not recognized anymore. The mouse pointer is still visible and keystrokes from the keyboard are still recognized.

Switching VT (as suggested in some similar problem reports) does not resolve the problem.

Rebooting solves the problem however the problem occurs again after some days/hours.

Is there a simpler solution than rebooting and how to prevent this problem from occurring?

Best Answer

Update: As suggested in other answers, as a quick fix first try just right-click with the mouse. If this does not help, try killing the VirtualBox drag&drop processes as described below or in other answers.

Full/Original Answer:

The problem might be caused by VirtualBox drag&drop (d&d) problems. If this is the case, it can be solved by killing the VirtualBox d&d processes.

  • Open a terminal (Ctrl+Alt+t does it for me) and find the d&d processes e.g. by: ps -ax | grep VBoxClient, resulting e.g. in (among other entries):

    1429 ?        S      0:00 /usr/bin/VBoxClient --draganddrop
    
  • Then kill all processes which contain this text: VBoxClient --draganddrop e.g. for process number 1429 by: kill 1429

I got some hints for this solution on: https://www.virtualbox.org/ticket/14903

If this does not help, try turning off and on again "Mouse Integration" (via the menu of the VirtualBox).

Further, if the problem keeps recurring, consider disabling VirtualBox drag&drop altogether.