2
I have a laptop that runs Ubuntu 16.04 with GNOME, and inside of this laptop I have VMware Workstation 12.5.1 running Windows 10.
My problem is that when I close the laptop with the VM in focus, it will go to sleep, but will not lock the screen, leaving me with this error message:
Unable to lock
Lock was blocked by an application
I tried following the VMware advice, but it's not actually relevant for the "close laptop lid" scenario.
The best approach I see is to try and press the Ctrl+Alt escape sequence with xdotool before the system tries to lock itself, but neither ways I tried to achieve this have worked.
I tried to make a dbus-monitor script - but this event is only sent upon a successful lock. I'm thinking if I could somehow monitor a failure to lock instead, this could work, but I do not know how to do that.
Another possible approach could be just overriding the block somehow, and making GNOME lock no matter what, but I worry that might cause problems like me not being able to enter my password, if the VM still captures all keystrokes.