Version: (using KDE 4.2.3) OS: Linux Installed from: Ubuntu Packages I use Kopete at home and a windows program at work. When I go to work I need to remember to logout from my accounts on Kopete to make the transition smoother. I expect I'm not the only one in this situation. What would be nice is an option in Kopete to log me out of all accounts whenever I lock the screen. I am clearly not available when the screen is locked. "Away" is not good enough as I need to be really logged out. Maybe you can detect the screensaver running or something and do the logout. Automatically logging back in when I unlock the screen would also be a nice feature.
Perhaps this trick can help you, too. https://bugs.kde.org/show_bug.cgi?id=162739#c2 You could replace the commands with dbus-send --type=method_call --dest=org.kde.kopete /Kopete org.kde.Kopete.disconnectAll and dbus-send --type=method_call --dest=org.kde.kopete /Kopete org.kde.Kopete.connectAll
Thank you Daniel for that excelent workaround. I am running xfce so kscreenlocker is not running but xscreensaver is. However it seems to be running constantly, so I can't play this trick with it. When I lock the screen it runs xflock4, and I can play the trick with that and it works correctly to log me out, but since xflock4 returns immediately, it logs me back in immediately too. So I commented out the second part and just let it log me out for now. Hopefully I can discover something that runs when I unlock the screen so I can intercept that to log me back in. I guess I'll have to ask over in the xfce forums.
Upon further investigation I found the man page for xscreensaver-command and there is a script described there that is close, combined with these dbus commands I have a working solution. It is not as clean in that I must have a shell script always running, but it works. #!/bin/bash xscreensaver-command -watch | while read cmd date ; do if ps aux | grep kopete > /dev/null 2>&1; then if [[ $cmd == "BLANK" || $cmd == "LOCK" ]] ; then dbus-send --type=method_call --dest=org.kde.kopete /Kopete org.kde.Kopete.disconnectAll fi if [[ $cmd == "UNBLANK" ]] ; then sleep 1 dbus-send --type=method_call --dest=org.kde.kopete /Kopete org.kde.Kopete.connectAll fi fi done (note that there is no newline after "/Kopete"
I marked this as resolved, but if the kopete team would be willing to add this functionality within the program itself, you can keep it on the wishlist. :)