Fixing screen saver

Yesterday we had an interesting security workshop at work and we discussed different thing. One thing that came up was the problem of not locking you laptop/pc when leaving you desk.

We do have a policy that turns on the screensave and lock afetr 5 minutes, but there is a glap there. And I have also talked about when I'm using vnc to connect to my laptop from my iPad, I do turn on the lock when leaving the vnc session, but there is a problem with vmware and that it “steals” the lock and lock the virtual machine only, not the desktop.

So today i did a bit more investigation.

First thing I did whant to do was to fix the vnc problem. After some googeling I found out that there are other people out there that has the problem but not any fixes. I investigated futher, but did not find any way to fix vmware.

Starting to think sideways, I remember that if you dont have focus on the vmware virtual machine the screen locks as it should. And I'm allways running the vmware machine on desktop 2, so switching to desktop 1 before doing the lock should fix it.

And there is a qdbus command for swithing to another screen:

So adding this to the console/on command did the trick. The new console-on command now looks like this:

Locking screen with one keypress

Another thing one woul like to do is to lock the machine when leaving with a simple keyboard press. I created a small script (screensaver-on) and set that to be triggerd via Meta+L (Window key):

That work well except that the vmware system steals the Windows L key first so it will only work if you have focuse outside vmare. So i ended up removing the switch desktop in the end.

You specify a special command in:

System Settings -> Shortcuts and Gestures -> Custom Shortcuts

and then Edit -> New -> Global Shortcut -> Command/URL


 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.