Bug 162739

Summary: Auto-Away On Desktop Lock
Product: [Applications] kopete Reporter: Dustin Steiner <dustin.steiner>
Component: generalAssignee: Kopete Developers <kopete-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: wishlist CC: dagger, daniel.eckl
Priority: NOR    
Version: 0.50.1   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Dustin Steiner 2008-05-28 11:28:52 UTC
Version:           0.50.1 (using KDE 4.0.4)
Installed from:    Fedora RPMs
OS:                Linux

With kopete 0.12.x it was possible to set a option in the settings to be auto-away on locking the desktop.
Not in Kopete 0.50.1 there is neither a setting to enable this feature nor kopete goes auto-away.
would be nice to reimplement this feature.
Comment 1 Dustin Steiner 2008-06-07 15:46:33 UTC
This Bug is a dublicate of <a href="http://bugs.kde.org/show_bug.cgi?id=155061">Bug 155061</a>.
It seems to be resolved in KDE 4.1 (according to Dennis Nienhüser)
Comment 2 Daniel Eckl 2009-07-21 14:09:42 UTC
I think this is not a duplicate of Bug 155061. Over there it's about the idle away does not kick in after being idle long enough. What you (and me) wants to do is that kopete goes away as soon as you lock the screen.

While this was built-in feature in KDE3's kopete, this is a bad regression IMHO in KDE4, because there is no option for this anymore. What you could do would just be a dirty hack for now. This would be (with root powers):

rename kscreenlocker, e.g.
mv /usr/lib/kde4/libexec/kscreenlocker /usr/lib/kde4/libexec/kscreenlocker.real

then create a shell script with the correct name, e.g.:
vi /usr/lib/kde4/libexec/kscreenlocker

and fill it with e.g.
#---------------------------------
#!/bin/sh

# do stuff before locking
dbus-send --type=method_call --dest=org.kde.kopete /Kopete org.kde.Kopete.setOnlineStatus :Away :"I'm Away"

/usr/lib/kde4/libexec/kscreenlocker.real $@

# Do stuff after unlocking...
dbus-send --type=method_call --dest=org.kde.kopete /Kopete org.kde.Kopete.setOnlineStatus :Online

# ---------------------------

and make this script executable.

Please note that I did not try that myself yet, but I'm rather sure, that should do the trick. Please note that this trick would set you online every time you unlock the screen, so if you go n/a manually, lock and then unlock again, you will magically be online again. one perhaps could make this script better and check status first, and set to away only when online, and later on set online just if status has been altered above. But that's too much for my 10 minutes now.

Best,
Daniel
Comment 3 Robet Piasek 2012-02-27 16:54:47 UTC
This is different bug. Script provider by Daniel works fine, but this should really be part of kopete/kscreenlocker