Comment 10 for bug 474654

Revision history for this message
KIAaze (zohn-joidberg) wrote : Re: Desktop visible when screen is locked in Kubuntu

Improved version of the workaround script (if compositing is off, it does nothing):
/usr/lib/kde4/libexec/kscreenlocker:
============
#!/bin/sh

#store compositing setting
COMPOSITING=`qdbus org.kde.kwin /KWin org.kde.KWin.compositingActive`

# Do stuff before locking...
if [ "$COMPOSITING" = "true" ]
then
 kwriteconfig --file kwinrc --group Compositing --key Enabled false
 kwin --replace &
fi

# lock screen
/usr/lib/kde4/libexec/kscreenlocker.bin $@

# Do stuff after unlocking...
if [ "$COMPOSITING" = "true" ]
then
  # turn on
  kwriteconfig --file kwinrc --group Compositing --key Enabled true
  # Then restart kwin (in Alt+F2) with:
  kwin --replace &
fi
============