pcsc-lite: configuration using /etc/default/pcscd

Version 1.9.2 of pcsc-lite adds a new configuration possibility: systemd EnvironmentFile


systemd EnvironmentFile

With systemd it is possible to configure a file that will contain definitions for the process started by systemd. In our case the started process is the daemon pcscd.

The file name is defined in pcscd.service and is, by default, /etc/default/pcscd. You can change the path using --sysconfdir= argument for ./configure.

pcscd environment variables

A first use case is to define environment variables to change the behaviour of pcscd.

For example you can add in this file:


so that readers with "Twin" in the name will be ignored.

See "Remove and/or customize PC/SC reader names" for more details and use cases.

You can also define other variables like:


pcscd arguments

pcscd is started with the extra parameter $PCSCD_ARGS. By default this variable is empty. But you can define PCSCD_ARGS in /etc/default/pcscd to add more arguments to pcscd.

For example you can use:


to get debug messages in the systemd journal.

To see the pcscd logs in live use:

$ journalctl --unit pcscd --follow


/etc/default/pcscd is a user file so you can edit it as you like. It should not prevent a package upgrade for example.

It is also much simpler and safer than editing systemd files directly.