keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.43k stars 1.48k forks source link

KeePassXC doesn't automatically open the last database when it is first launched. #11157

Open matj1 opened 3 months ago

matj1 commented 3 months ago

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

  1. Turn the computer on and log in.
  2. Open KeePassXC
  3. See that the last database is not opened, but it is in the list of last databases.
  4. Open the last database.
  5. Close KeePassXC.
  6. Open KeePassXC.
  7. 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

droidmonkey commented 3 months ago

What is located in ~./cache/keepassxc/keepassxc.ini

matj1 commented 3 months ago
[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\0o\0m\0\x65\0/\0m\0\x61\0t\0j\0\x31\0/\0\x44\0r\0o\0p\0\x62\0o\0x)
LastKeyFiles=@Variant(\0\0\0\x1c\0\0\0\0)
LastOpenedDatabases=/home/matj1/Dropbox/hesla.kdbx

[Browser]
CustomBrowserLocation=
CustomBrowserType=2

[GUI]
GroupSplitterState=@Invalid()
ListViewState=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x1\x1\0\0\0\xf\0\0\0\0\0\0\0\x3\0\0\0\x4\0\0\0\x5\0\0\0\x6\0\0\0\a\0\0\0\b\0\0\0\t\0\0\0\n\0\0\0\v\0\0\0\x1\0\0\0\f\0\0\0\x2\0\0\0\r\0\0\0\xe\0\0\0\xf\0\0\0\0\0\0\0\n\0\0\0\f\0\0\0\x1\0\0\0\x2\0\0\0\x3\0\0\0\x4\0\0\0\x5\0\0\0\x6\0\0\0\a\0\0\0\b\0\0\0\t\0\0\0\v\0\0\0\r\0\0\0\xe\0\0\0\xf!{\0\0\0\b\0\0\0\v\0\0\0\x64\0\0\0\t\0\0\0\x64\0\0\0\a\0\0\0\x64\0\0\0\x6\0\0\0\x64\0\0\0\x3\0\0\0\x64\0\0\0\0\0\0\0\x64\0\0\0\xe\0\0\0\x64\0\0\0\r\0\0\0\x64\0\0\x2\x12\0\0\0\xf\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\xf\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0!\0\0\0\x1\0\0\0\x2\0\0\0!\0\0\0\x1\0\0\0\x2\0\0\0]\0\0\0\x1\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\x1\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\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=
droidmonkey commented 3 months ago

You might have your cache mounted as ramfs

matj1 commented 3 months ago

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.

droidmonkey commented 3 months ago

Can you post the cache ini file after a reboot please?

matj1 commented 3 months ago

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.

Pelle83 commented 3 months ago

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

droidmonkey commented 3 months ago

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.

Pelle83 commented 3 months ago

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.

droidmonkey commented 3 months ago

Clear your %APPDATALOCAL%/KeePassXC/keepassxc.ini

Pelle83 commented 3 months ago

Thank you! Now it works.

loxoron218 commented 6 days ago

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.