Version: (using KDE KDE 3.5.6) Installed from: Ubuntu Packages When people put their computer in suspend mode, Kopete should automatically logout in the right way. When people wake up their computer from suspend, Kopete should automatically login. PS: I think Adium has this feature, not sure though.
yes, adium has this feature which is very nearly built into the OS by default.
I'd like that feature too. But in Kopete for KDE4.
Created attachment 56896 [details] catching dbus events for reconnect Catches UPower Sleeping() signal to disconnect on suspend, and catches PowerDevil's resumingFromSuspend() signal to reconnect. Tested by suspending and resuming : no crashes, and reconnects on resume.
Created attachment 57002 [details] added suspend/resume methods for accounts and accountmanager, call resume on system suspend/network shutdown and resume on network connection (In reply to comment #3) > Created an attachment (id=56896) [details] > catching dbus events for reconnect > > Catches UPower Sleeping() signal to disconnect on suspend, and catches > PowerDevil's resumingFromSuspend() signal to reconnect. Tested by suspending > and resuming : no crashes, and reconnects on resume. Your patch inspired me to have a deeper look into kopete, because I wanted the online status of each account to be the same as before system suspend instead of just reconnecting all accounts to "Online". This patch also addresses another problem of kopete: When the user was setting kopete to "Offline" and the network connection was lost and recovered kopete would reset all accounts to "Online". Please have a look at this patch and test it. Thanks.
Wow :) How little is needed to inspire others. I'll test it in the coming days. However, since I suppose this will go into KDE 4.7, I suggest tracking https://bugs.kde.org/show_bug.cgi?id=265698 and when it gets implemented, catching the Solid signal instead of the UPower one.
Patch submitted to reviewboard: http://svn.reviewboard.kde.org/r/6511/
Just curious, does the implementation respect the "Initial Status" settings? Like if the Initial Status is set to Offline, resume should not do anything. One idea there: one can add a new Initial Status called "Restore", which would restore statuses to the last ones, before suspend or quit or so.
(In reply to comment #7) I don't know if I got it right. Resume is currently not respecting the "Initial Status" settings and I don't think that this is necessary. I think that resume should just restore the status of each account to the status that was active when suspend was called (when it was offline before suspend, it would stay offline after resume, of course). I think that this is what a user expects (e.g.: network is lost -> offline -> network restored -> resume all accounts, or: laptop closed (suspend) -> offline -> laptop opened (resume) -> resume all accounts). Did I miss something? If the user changes the global status after suspend was called (e.g. after network disconnect), then resume won't be called.
My workflow is little bit different, at work I am connected to some protocols with some statuses, then I suspend, go home, resume and connect with different protocols and statuses. I am using kopete DBUS interface and NetworkManager hooks for that today. I am not sure it makes sense to implement such a flexibility for all users, but it would be good if this feature does not get in a way in those cases Therefore my suggestion for respecting Initial Status settings - Offline in my case. I am not sure it's an optimal way, but it would at least work for me.
Calling the dbus method disconnectAll after suspend should already disable resume. Is this OK for you?
(In reply to comment #10) > Calling the dbus method disconnectAll after suspend should already disable > resume. Is this OK for you? If I can cram it somewhere in the hooks that should be fine I guess.
Has anything from this been committed already? I installed kopete 4.8.2 (4.8.2) "release 491" and now I am getting strange errors from kopete after resume (and of course my scripts stopped working because of that): - turn kopete offline - suspend/resume - error message that GroupWise account could not connect (obviously, network is still off)
SVN commit 1355161 by pali: Automatically logout and login with suspend/resume This patch logs off each account when PC is suspended and restores the online state of each account on resume. This patch also addresses another problem of kopete: When the user was setting kopete to "Offline" and the network connection was lost and recovered kopete would reset all accounts to "Online". Thanks Benni Hill for patch! Related: bug 212037 FIXED-IN: 4.11 REVIEW: 6511 M +10 -0 kopete/kopetedbusinterface.cpp M +10 -0 kopete/kopetedbusinterface.h M +4 -0 kopete/org.kde.Kopete.xml M +28 -0 libkopete/kopeteaccount.cpp M +12 -0 libkopete/kopeteaccount.h M +59 -25 libkopete/kopeteaccountmanager.cpp M +11 -0 libkopete/kopeteaccountmanager.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1355161