KeePassXC doesn't automatically open the last database when it is first launched.
Overview
I have KeePassXC set to automatically start at the system startup and load open the last database, so I can use it seamlessly in a web browser. But KeePassXC does not open the database until I manually open the database in KeePassXC. I don't mean unlocking the database with a password; I mean that I need to select the file in the list of last databases. But, if I close KeePassXC after that and open it, it automatically opens the last database.
I have the options like “Load previously opened databases on startup” and “Remember last used databases” (translated from a different language) enabled.
Steps to Reproduce
- Turn the computer on and log in.
- Open KeePassXC
- See that the last database is not opened, but it is in the list of last databases.
- Open the last database.
- Close KeePassXC.
- Open KeePassXC.
- See that the last database is automatically opened.
Expected Behavior
I expect that the last database would be automatically opened (except being unlocked by a password) when I turn the computer on and log in.
Actual Behavior
I need to manually select the database to open it.
Context
These are the three sections from ~/.config/keepassxc/keepassxc.ini; that is everything except the sections [KeeShare], [PasswordGenerator] and [Security]:
[General]
ConfigVersion=2
NumberOfRememberedLastDatabases=3
OpenPreviousDatabasesOnStartup=true
RememberLastDatabases=true
RememberLastKeyFiles=true
[Browser]
AlwaysAllowAccess=true
CustomProxyLocation=
Enabled=true
[GUI]
ApplicationTheme=dark
CompactMode=false
HidePasswords=true
HidePreviewPanel=false
MinimizeOnClose=true
MinimizeOnStartup=true
MinimizeToTray=true
ShowTrayIcon=true
TrayIconAppearance=colorful
KeePassXC - Version 2.7.9
Revision: 8f6dd13
Operating System: Arch Linux
Desktop Environment: Gnome 46
Windowing System: Wayland
What is located in ~./cache/keepassxc/keepassxc.ini
[General]
LastActiveDatabase=/home/matj1/Dropbox/hesla.kdbx
LastChallengeResponse=@Variant(\0\0\0\x1c\0\0\0\0)
LastDatabases=/home/matj1/Dropbox/hesla.kdbx
LastDir=@Variant(\0\0\0\x1c\0\0\0\x2\0\0\0\x4\0\x64\0\x62\0\0\0\n\0\0\0&\0/\0h\0o\0m\0\x65\0/\0m\0\x61\0t\0j\0\x31\0/\0\x44\0r\0o\0p\0\x62\0o\0x\0\0\0\n\0m\0\x65\0r\0g\0\x65\0\0\0\n\0\0\0&\0/\0h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\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\x3\xe8\x1\0\0\0\x64)
MainWindowGeometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x3\x17\0\0\0S\0\0\x6\x36\0\0\x2\xcf\0\0\x3\x17\0\0\0x\0\0\x6\x36\0\0\x2\xcf\0\0\0\0\0\0\0\0\a\x80\0\0\x3\x17\0\0\0x\0\0\x6\x36\0\0\x2\xcf)
MainWindowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x3 \0\0\x1\xea\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x1\0\0\0\xe\0t\0o\0o\0l\0\x42\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0)
PreviewSplitterState=@Invalid()
SearchViewState=@ByteArray()
SplitterState=@Invalid()
[SSHAgent]
AuthSockOverride=
SecurityKeyProviderOverride=
You might have your cache mounted as ramfs
You might have your cache mounted as ramfs
How does that matter? KeePassXC shouldn't rely on cache like that IMO. But no, it is on the same partition as the rest of the home directory.
Can you post the cache ini file after a reboot please?
It is the same after the last reboot. But also the issue didn't happen after the last reboot. Right before submitting this issue, I unchecked and rechecked these settings (to the same state as before AFAIK); that may have solved the problem, but it doesn't tell me where the problem was before.
I have a similar problem with Windows 10. I use two databases, at start just one database is loaded, the second one has always to be opened manually.
Already tried to unceck and receck the "Load previously opened databases on startup" option.
KeepassXC 2.7.9
Thank you Fabio
Make sure you are leaving both database tabs "open" when closing keepassxc and that the second database is not on network share that might be not ready after boot.
Yes, both database are open at KeePassXC closing.
No problem with database on network share since the only that opens at launch is the one on network... The database on local disc remains closed.
I noticed the same behaviour on KeePassXC of 2 releases ago. In the second to last was working perfectly and now, in 2.7.9 not working again.
Clear your %APPDATALOCAL%/KeePassXC/keepassxc.ini
Thank you! Now it works.
I'm experiencing this also on Arch Linux. By default, KeepassXC lists but doesn't automatically open my last database, even though following settings are shown as turned on on the GUI:
Open previous databases on startup
Remember last databases
Remember last key files
Somehow, after turning those settings off and then switching them on again, it works... Is there a way for it to work out of the box?
I'm using the version 2.7.9 from the official Arch repositories.
Same here. After a REBOOT the previous database is not opened automatically. Nevertheless it's listed in the list of previous used databases
I tried the previous suggestions with NO success, i.e.
- clear %APPDATALOCAL%/KeePassXC/keepassxc.ini
- reset settings to default
This one worked:
Somehow, after turning those settings off and then switching them on again, it works... Is there a way for it to work out of the box?
[update: still not working]
KeepassXC Version: 2.7.9 (fresh install, no update) OS: Windows 10, 22H2 user: default user (no admin) vault location: GDrive
I have never been able to reproduce this, the code around this is dead simple without much room for error. If there was an error, it would be easily reproducible. I'm closing unless someone can conjur up clear reproduction steps, and that doesn't mean "just do a reboot".
I found the trigger for this behavior and can at least reproduce it.
This only applies to the use case where a vault file is located on a cloud storage (dropbox, GDrive, etc.)
The root cause that KeePassXC is not opening the last used vault file is because the online storage is not available once KeePassXC is started. In other word, KeePassXC is started earlier than the integration of the cloud storage.
I solved this pretty easily in Windows by:
- unchecking in KeePassXC: "automatically launch KeePassXC at system startup"
- create a task in the Windows Task Scheduler (trigger: At startup + Delay task for: 1min). By this it is ensured that the cloud storage integration is started for sure BEFORE KeePassXC is launched
Are you mounting your cloud to a drive (like D:)?
Are you mounting your cloud to a drive (like D:)?
yes sir
#9539 is the source of this issue
ah, ok. Thx very much!
For anyone experiencing similar issues, this is what worked for me (on Arch Linux):
- Close KeepassXC
- Move
~/.config/keepassxc/keepassxc.inito a different location - Open KeepassXC, from now it should automatically open the last DB that was open
- Close it again
- Move
keepassxc.iniback to~/.config/keepassxc - Finally open KeepassXC with the right config
Generally I think deleting the keepassxc.ini and then opening KeepassXC should be enough, I just went through these steps because I did not want my configuration to be deleted. Still a bit of a weird issue though
* Close KeepassXC * Move `~/.config/keepassxc/keepassxc.ini` to a different location * Open KeepassXC, from now it should automatically open the last DB that was open * Close it again * Move `keepassxc.ini` back to `~/.config/keepassxc` * Finally open KeepassXC with the right config
Many thanks, this solved my issue on Linux Mint 22.2 using KeePassXC flatpak 2.7.10.
The ini file was under ~/.var/app/org.keepassxc.KeePassXC/cache/keepassxc/keepassxc.ini