Screen locking with the Plasma netbook interface

If you are using the Plasma desktop on your netbook in “netbook mode”, you may have noticed that screen locking (in all its forms – the Ctrl+Alt+L shortcut, typing “lock” into search-and-run, and automatic locking when suspending to RAM or when the screensaver starts) no longer works.  This is because KRunner doesn’t run in this case, and KRunner is (somewhat bizarrely) responsible for activating the screen locker.

The proper solution to this (and the one that should be implemented for 4.8, hopefully) is to get KWin to manage screen locking.  After all, it knows best when it comes to managing the screen.  But, until then, you can use the quick hack I came up with: putting screen locking into a kded module.

This works quite nicely with existing installations, as you can just compile and install the KDED module and be on your way.  One caveat: KRunner will retain the shortcut.  Once you’ve started the module for the first time (either from the Service Manager kcm or by logging out and in again), you will need to go to the Global Keyboard Shortcuts kcm and set Lock Session shortcut for KDE Dæmon.

Run the following commands to do this (you’ll need cmake and automoc, as well as development packages for Xorg and kdelibs):

git clone git://anongit.kde.org/scratch/alexmerry/kscreenlockmgr
mkdir kscreenlockmgr.build
cd kscreenlockmgr.build
cmake ../kscreenlockmgr -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix)
make
sudo make install

Or, if you’re on ArchLinux, just grab kscreenlockmgr-git from AUR.

About these ads

Tags: , ,

3 Responses to “Screen locking with the Plasma netbook interface”

  1. C. Ounter Pillow Says:

    Holy shit, thanks. This is great! <3

  2. humarf Says:

    Thanks you so much. This solved a problem I was really desperate about.

  3. Adw Says:

    Nice, compiled beautifully and works like a charm. You were too optimistic though, Just testing Kubuntu 12.04 beta with KDE 4.8.2 Plasma Netbook and the bug is still there :-)
    Thanks again!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: