Keepassxc: Have an option to start KeePassXC on login

Created on 31 May 2017  路  3Comments  路  Source: keepassxreboot/keepassxc

There's no function to start KeePassXC on user login, neither on Windows nor on Linux.

Expected Behavior

I check a box in the settings which could be named "start on login". The next time I start my PC and log in into my user account, KeePassXC starts minimized. Maybe have another checkbox "ask for password" which asks me for my DB password and minimizes after that. Maybe couple the autostart with "auto-unlock" (PAM in Linux, CryptProtectData in Windows).

Current Behavior

Currently you can already start minimized or in tray, but you can't have a simple way to turn on/off autostart.

Possible Solution

At the moment you can copy a shortcut in the Windows autostart folder or create a recurring task which starts the program on boot. On Linux you can use the desktop environments autostart feature or a systemd user service which gets executed on logon.

Maybe have KeePassXC use on of the the described functions already present in the operating system and check if it has already been done by simply checking for the running service / existing file.

Context

I want to always have my password database in the background and don't want to start it manually.

Your Environment

KeePassXC version 2.1.4, revision cb283bb95ae559d044415f426f841c27bff383f0.

Operating Systems: Windows 10, Debian Linux 9.0

Most helpful comment

Just add keepassxc.exe to your startup folder.

If you actually read my Issue, I already stated that it's possible to do that.

I will implement this feature and create a PR, this Issue is just to track that and get input from other users.

All 3 comments

Just add keepassxc.exe to your startup folder.

https://www.howtogeek.com/208224/how-to-add-programs-files-and-folders-to-system-startup-in-windows-8.1/

If you are running gnome you can use gnome-session-properties to set the startup apps on login.

Just add keepassxc.exe to your startup folder.

If you actually read my Issue, I already stated that it's possible to do that.

I will implement this feature and create a PR, this Issue is just to track that and get input from other users.

@dAnjou found a way to do this:

(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.

Was this page helpful?
0 / 5 - 0 ratings