I am using Ubuntu. While working, I got a weird kind of a freeze. My mouse is moving but it is stuck on the I symbol and it clicks nothing. I also have an open menu that opens when you float over or right-click (not sure) the Nautilus icon which won't come down. I can open a new terminal by keyboard Alt +Ctrl+T but it is hidden behind the open menu and I dont think it is responsive to the keyboard.

On the other hand, there is a python code I was running (long one) which still prints to the console open in the background.

I do not want to break the python run as it is a weekend's work I do not want to lose so restart is not a good option.

I have seen this post but I have neither metacity nor compiz commands. I am getting:

Command 'metacity' not found, but can be installed with:

I also found this post : I cannot figure out which ps is causing this.

I need to analize this.

  • Looks like some GUI application is "grabbing" the mouse, but not the keyboard. Next step is to identify which application that is (e.g take note which applications you've started when it happens, next time start half of them and see if it still happens, iterate). – dirkt Jun 2 '19 at 14:41
  • As I stated, I do not know how to identify which application is "grabbing" the mouse. I have started Nautilus when it happened, to the best of my memory. since then I have killed all Nautilus processes to no avail. – havakok Jun 3 '19 at 6:30
  • 1
    There's now actually a way to list active grabs, see this answer (I didn't know this, either, so I learned something as well). Answer also includes ways to break the grab. – dirkt Jun 3 '19 at 7:02
  • 1
    I found a workaround. Looking at this tutorial, a press on the SUPERKEY to show all applications using GUI, sent the PC into lock state and apparently released whatever was hogging the mouse. – havakok Jun 3 '19 at 9:07
  • 1
    An alternative is to use xmodmap to assign some key combination to produce one of the necessary keysyms (show grabs/release grabs). – dirkt Jun 3 '19 at 13:43

The command that works for me was: xdotool key XF86Ungrab

Like discussed here: Manipulating X key and pointer grabs on the command line

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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