The only downside with that approach is that you'd have to disable it again every time you turn off your computer (otherwise it stays on).
Another option is to run a command automatically when you log in. This can be easily done, but activating background services requires elevated permissions so you'd be prompted for a password again as soon as you log in.
To achieve this, you need to create a new file inside the directory ~/.config/autostart
. The name does not matter, as long as it ends with a .desktop
extension.
Note that files and folders starting with a dot (.
) are hidden by default; press Ctrl+H in the file manager to toggle this view.
The contents of this file should be as follows:
[Desktop Entry]
Type=Application
Exec=/bin/bash -c "sudo /usr/bin/systemctl start fprintd"
Terminal=false
Name=Fingerprint Service
Comment=Starts the fingerprint service automatically after logging in
This will create a new entry available to enable inside "Startup Applications":
You can take this a little further and skip the prompt for your password after you've logged in for this command only, by running the following command in a terminal:
echo "$USER ALL=(ALL) NOPASSWD: /usr/bin/systemctl start fprintd, /usr/bin/systemctl stop fprintd" | sudo tee -a /etc/sudoers.d/fingerprint
And restart the computer for changes to take effect. What this command does is creates a new configuration that exempts your user from entering a password when running the commands "/usr/bin/systemctl start fprintd" and "/usr/bin/systemctl stop fprintd".
I should warn you, and others reading this... you might get tempted into using this little trick to add exceptions everywhere to run sudo
commands without entering your password. This is a dangerous game. Do not do this. Use it with care, and at your own risk.
With this, once you've logged in the fingerprint service should be started automatically. I hope that this is enough, as I don't have a computer to test this on, so good luck!