Bug 105752

Summary: kwallet not saved untill closed
Product: [Applications] kwalletmanager Reporter: Pieter <pieter>
Component: generalAssignee: Unknown <null>
Status: RESOLVED FIXED    
Severity: wishlist CC: kitts.mailinglists, sebastien.raveau, zander
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Pieter 2005-05-16 12:10:09 UTC
Version:           1.1 (using KDE 3.4.0, Gentoo)
Compiler:          gcc version 3.4.3-20050110 (Gentoo 3.4.3.20050110-r2, ssp-3.4.3.20050110-0, pie-8.7.7)
OS:                Linux (i686) release 2.6.11-rc2-mm1

The wallet not being saved untill it is closed seems OK, but in fact this also means that the wallet is never saved when it is configured to stay open all the time.
So, when neither of the 3 'Close when...' checkboxes is checked in the Wallet Preferences tab, changed contents simply are never saved at all. (not even when kde is closed)
Comment 1 George Staikos 2005-05-19 16:54:52 UTC
That means that KDE is not shutting down correctly.  KWallet is designed to close and save on exit of KDE.  Something must be crashing in KDED or you have a localize build problem.
Comment 2 Thomas Zander 2005-06-18 19:11:41 UTC
I just ran into this as well; during debugging I was quite annoyed that I have to manually close the wallet to force a save.  Well; the finding out that I had to part took longest by far, naturally.
I'm probably not the only one who uses ctrl-alt-backspace or just simply typing halt to get out of a KDE session.

George; what about persisting data when the last, or maybe even when any (kwallet using) application closes?  Since the passwords are visible as part of an application that uses them; this makes sense from a users perspective.
Comment 3 George Staikos 2005-11-15 05:02:06 UTC
dcop kded kwalletd sync() will help.  You can also call this from within an app if needed.    I don't want to save after every change for performance and undo reasons.
Comment 4 Ned Boony 2006-03-22 10:18:06 UTC
Agreed. I've lost a lot of information even on "successful" session KDE exiting. Things randomly crash, even "unknown" process when I exit. Since this is a common occurrance, I consider it successful when KDE actually logs out after a reasonable time period, even if multiple processes crash. Sometimes on "unsucessful" logouts, it just hangs and I'm forced to CTRL+ALT+BACKSPACE. I just suck it up and accept it's going to happen. Now, I don't know where the ultimate blame for this type of situation should lie, but in my opinion, if there is an option to always keep wallets open, then it would be a good idea to have an option to autosave changes at the cost of "performance" and "undo" (which I dont use anyway).

Since it's already marked as WONTFIX, I guess I'm just adding my user-perspective 2 cents.
Comment 5 Gerhard Kulzer 2007-03-08 21:10:09 UTC
This bug is not resolved and should be reopened. It is really annoying that one can click on 'save' and nothing is saved in fact. I just made the experience that I had to kill kde and X with Ctrl+Alt+del after 10 days of X-uptime, and my (days before) manually entered data was lost. It seems that automatically entered data is saved though. The performance argument is no argument at all. You can very well save it with a low nice value. Or save it every so often. 
But having a 'save' button and not being saved is Microsoft behavior.
I can do dcop kded kwalletd sync() but not my common users.
Comment 6 David Faure 2007-03-15 17:22:11 UTC
I disagree, George. If a machine crashes, it shouldn't lose passwords that have been "saved" into the wallet long before. I agree with not syncing to disk immediately after every change, but there is a nice intermediate solution: syncing with a timer.
Comment 7 George Staikos 2007-03-15 17:23:58 UTC
IMHO we should close the wallet on a timer, and then it syncs, and  
this is already implemented.  :-)  However if you want, it's very  
easy to add a second timer to sync the wallet.  The code is already  
there.

--
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/
Comment 8 Leo Spalteholz 2007-03-28 22:04:08 UTC
To add my two cents to this.  I have the problem that kwallet stopped saving passwords altogether.  I did some investigation and this is what happens
1.  Visit some ftp site, enter password, check "Keep password" box
2.  The password shows up in kwallet properly
3.  Close konqueror, open konqueror, go to same ftp site, password is filled in
4.  Close konqueror, quit kwalletmanager
5.  Open ftp site again, password still is filled in like it should be
6.  Logout from KDE, login again
7.  Start konqueror, go to ftp site, password is blank.
8.  Check in kwalletmanager, the password that was previously there is gone!

This is KDE 3.5.6 on Debian sid.  So I dont know why its not saving, nothing visibly crashes on logout, but it still doesn't work.  Huge annoyance.  I haven't been able to save any new passwords for weeks (not quite sure when it started).  
Comment 9 Giles Constant 2007-06-24 11:00:39 UTC
I'm having this problem on gentoo..  and on kubuntu.  Basically, kwalletmanager.. well.. doesn't..


I've actually had kwalletmanager open and watched the password appear, exported it, reimported it, logged out, and..  WHERE'S MY PASSWORD GONE?!

it's driving me mad.
Comment 10 R Parlett 2007-06-29 01:36:08 UTC
I am amazed that kdewallet doesn't save new passwords immediately, but requires you to close the wallet before persisting changes.  To state the obvious, passwords are important data, and shouldn't be vulnerable to a system crash, power cut or other mishap.

Worse still, this counter-intuitive save-on-close behaviour isn't documented, and the hapless user is left wondering what happened to that password he or she entrusted to kdewallet the other day, but which has now vanished.

Very poor.
Comment 11 Andras Georgy Bekes 2007-12-11 15:34:24 UTC
Can't we have an option "Save button does what it should"?

The current behaviour is more than terrible IMHO.

OK, at least, could you tell me what is the proper way of saving the wallet?
It seems to me that even if I manually close all the wallets and quit kwalletmanager, it is still not saved.
Comment 12 Michael Leupold 2008-05-01 13:46:32 UTC
I hope you CCers don't mind, but reordering the bugs a little I decided to make this a wish so we can consider implementing any of the methods mentioned above when kwalletmanager gets its overhaul.
Comment 13 Michael Leupold 2008-06-13 23:38:38 UTC
*** Bug 162607 has been marked as a duplicate of this bug. ***
Comment 14 Michael Leupold 2008-06-13 23:47:37 UTC
SVN commit 820330 by mleupold:

Save changes to the wallet immediately using a timer with a delay of 5s.

BUG: 105752


 M  +1 -0      CMakeLists.txt  
 M  +35 -0     kwalletd.cpp  
 M  +4 -0      kwalletd.h  
 A             kwalletsynctimer.cpp   branches/work/kdelibs-kwallet/kio/misc/kwalletd/kwalletsynctimer.cpp#820315 [License: LGPL (v2+)]
 A             kwalletsynctimer.h   branches/work/kdelibs-kwallet/kio/misc/kwalletd/kwalletsynctimer.h#820315 [License: LGPL (v2+)]


WebSVN link: http://websvn.kde.org/?view=rev&revision=820330
Comment 15 Michael Leupold 2008-06-14 17:19:27 UTC
*** Bug 136411 has been marked as a duplicate of this bug. ***