Two years old I know.
Heed the security implications, if you simply prefer to have locally stored passwords and have no other persons accessing the computer then this should be just fine. Otherwise, you may prefer to look into getting a yubikey.
I have no experience of them, though I have looked into them and they are used for authentication, which is what you want to do. KeePassXC supports the use of a Yubikey.
With that said, I have a solution to the issue in the comments about the terminal hanging. The following is a little bash script.
Crack open your terminal.
touch KeePassLogin && chmod +x KeePassLogin && nano KeePassLogin
Enter the code following :
#!/bin/bash
secret-tool lookup keepass Passwords | keepassxc --pw-stdin ~/Secured/Passwords.kdbx & sleep 3 ; echo ''
The echo functions as the enter key would. If you are not familiar with nano, ctrl + x and then enter will save the file after you have made the changes.
Added a delay because it appears that the password prompt doesn't always appear in time for the echo. You can try a smaller sleep time if three seconds is too long for you.
Once you are back at the terminal prompt:
./KeePassLogin
You could now add a new startup application with "/path/to/keePassLogin" as the command.
Update
I got to thinking about this, the security implications mainly, and with Yubikey coming to mind I chose to implement a little "security minded" addition.
I moved the keepassxc database onto a USB drive. and implemented this.
#!/bin/bash
File: KeepassLogin check if specific security key is mounted.
while [ -z "$mnt" ]; do
mnt=$(lsblk --output MOUNTPOINT | grep securityKey)
if [[ $mnt != "" ]]; then
secret-tool lookup keepass Passwords | keepassxc --pw-stdin $mnt/KeePassXC.kdbx > /dev/null 2>&1 &
sleep 2
echo "" > /dev/null 2>&1
fi
sleep 5
done
exit
Add a startup application to run the file (browse to the file in the startup application gui).
So what this does briefly, at login keepasslogin is set running. it will run every 5 seconds, you can adjust as you see fit, maybe 60 seconds suits you. a loop run until it finds the usb device (lsblk line) I named it securityKey to make it easy to identify. change that to the label of your usbstick.
I have also sent the outputs to /dev/null. so if you do run the script manually, say from a keyboard shortcut then you don't get the unnecessary output in the terminal.
So while its not really a security feature, it's more secure than a database stored on the computer. You could have the database on your person and plug it in as and when needed.
So, it's not a Yubikey, but the idea is in a similar fashion.