Bug 162739 - Auto-Away On Desktop Lock
Summary: Auto-Away On Desktop Lock
Status: RESOLVED WORKSFORME
Alias: None
Product: kopete
Classification: Applications
Component: general (show other bugs)
Version: 0.50.1
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-28 11:28 UTC by Dustin Steiner
Modified: 2012-02-27 16:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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