Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using a combination of xautolock and slimlock to automatiacally lock my machine if it does not receive input.

~/.xinitrc:

xautolock -locker /usr/bin/lockify.sh -time 5 &

/usr/bin/lockify.sh:

#!/bin/bash
DONTLOCK=false

if pidof gnome-mplayer 
then
    DONTLOCK=true
else
    echo "gnome-mplayer is not running"
fi

if $DONTLOCK
then
    echo "Watching Video, not locking screen"
else
    /usr/bin/slimlock
fi

Only recently I discovered that this is a problem, when I have a VMWare guest running in the foreground. What happens is that when the lock-screen is engaged the keyboard input seems to remain with my vmware-guest so I cannot unlock my host system.

Does anyone know how I could ensure that input focus is transferred back to my host before the system is locked?

share|improve this question
add comment

2 Answers 2

The easiest way to deal with this is to install VMware Tools in the guest, so that your system never has to lock the keyboard/mouse to the guest in the first place.

If you don't want to do a full VMware Tools install, you can probably get by with just enabling the vmmouse X driver in the guest in /etc/X11/xorg.conf, something like:

Section "ServerLayout"
        Identifier     "Default Layout"
        Screen      0  "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice "Mouse0" "CorePointer"  # Add this line to this section
EndSection

# Add this section
Section "InputDevice"
        Identifier "Mouse0"
        Driver "vmmouse"
        Option "Device" "/dev/input/mice"
EndSection

This sample was taken from a working system where I had to manually enable the guest integration as it wasn't autodetected.

share|improve this answer
    
Interesting. Thought I had installed the tools. Will recheck. Thx. –  er4z0r Jul 25 '12 at 13:36
    
Nope. Didn't help :-/ –  er4z0r Jul 26 '12 at 14:21
add comment

I had the same problem on my windows pc. To be able to enter the password, I had to press Ctrl + Alt to transfer focus to the unlock screen. This is not a real solution, because there is no way to see why the keyboard is not working in the unlock screen. But I hope this might help someone. See also this VMware KB entry.

share|improve this answer
add comment

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.