(Tested with KeePassXC on Fedora 25)
By default when using GNOME Keyring you have a keyring that is unlocked when you log in (usually called "Login"). You can make use of that by storing a KeePass database password in this keyring and using it to automatically unlock your KeePass database.
Store the KeePass database password in GNOME Keyring. You'll have to set a label and at least one attribute/value pair. The label is displayed in a GNOME keyring manager (e.g. Seahorse), the attribute/value pair should be a unique identifier because it's needed for the lookup. I suggest to use keepass
as attribute and the database name as value (make sure it doesn't contain any spaces).
secret-tool store --label="KeePass <database_name>" keepass <database_name>
Then create a script to launch and immediately unlock your KeePass database.
#!/bin/bash
secret-tool lookup keepass <database_name> | keepassxc --pw-stdin /path/to/<database_name>
You can now use this script to launch KeePass with your database already unlocked. I recommend to create a desktop launcher for more convenience.
I'd like to know the answer to androidseb's question too. I think they are correct. I at first thought that I'd be able to just use keepassxc-cli to do exactly the same thing as secret-tool but I can't find a way to list passwords from the command line using keepassxc-cli without entering the database password at the same time; so perhaps keepassxc IS more secure than seahorse (gnome keyring).
That said any implementation to automatically unlock keepassxc will have the same issue I believe. I'll mention that I really like Keepass2Android's quick unlock function where it "half-locks" the database and then only asks you for just the last 4 characters of the master password to unlock it. Very handy on a touch screen device but perhaps less so on a device with a keyboard.