card_eventmgr(1)

πŸ“¦
version 0.6.13 Β· 2 versions
, in debian trixie, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ card_eventmgr β€” the PCSC-Lite Event Manager, bestie edition πŸŽ€

okay so before we even get into it: this is card_eventmgr(1), a page from the PAM-PKCS#11 manual. yes, the whole thing. buckle up πŸ’–


✨ NAME ✨

card_eventmgr β€” literally the PCSC-Lite Event Manager. she watches your smart card reader and does stuff when things happen. main character energy, no cap πŸ‘‘


🌸 SYNTAX 🌸

card_eventmgr [debug] [[no]daemon] [timeout=<msecs>]
[config_file=<filename>] [kill] [pidfile=<pidfile>]

that's it. that's the whole vibe check πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

okay so card_eventmgr is a smart card monitoring tool. she listens to the status of the card reader and dispatches actions on several events. it's giving attentive. it's giving aware.

she can be used for several actions, like locking your screen when the card gets removed. so basically she's your bodyguard but for a plastic rectangle 🫢

there are three events supported, periodt:

  1. card insertion
  2. card removal
  3. timeout on removed card

and the actions? those are specified in a configuration file. she doesn't improvise, she follows the script πŸ“œ


⭐ OPTIONS ⭐

  • debug β€” turns on debugging output. she will tell you everything and honestly we love a transparent queen 😭
  • [no]daemon β€” runs in the background if you say daemon, or in the foreground if you say nodaemon (which is the default, btw). heads up though: if debug is unset, the program detaches itself from the tty. so like. she leaves the group chat. πŸ’€
  • timeout=<msecs> β€” sets the polling timeout in milliseconds. defaults to 1000, which is 1 second, for the people who don't do math ✨
  • config_file=<configuration file> β€” sets the configuration file. default value is /etc/pam_pkcs11/card_eventmgr.conf. she has a home and she's very loyal to it 🏠
  • pidfile=<pidfile> β€” stores the card_eventmgr process ID (pid) in the file pidfile. keeping receipts, always πŸ“
  • kill β€” reads a process id from pidfile and kills that process. you MUST use the argument pidfile=<pidfile> to use kill. no pidfile, no murder. those are the rules πŸ™ˆ

πŸ“ FILES πŸ“

  • /etc/pam_pkcs11/card_eventmgr.conf

that's the one. the sacred text. the config πŸ’œ


🌈 EXAMPLES 🌈

to run this program the standard way, you literally just type:

card_eventmgr

alternatively, you can specify options, because sometimes you want ✨range✨:

card_eventmgr debug nodaemon timeout=500
config_file=$HOME/.card_eventmgr.conf

and if you want to start and stop card_eventmgr automatically inside an X11 session, you can create a ~/.xsession file containing:

# start the card autolock
card_eventmgr pidfile=$HOME/.card_eventmgr.pid

# start Gnome or something else
/usr/bin/x-session-manager

# kill the card autolock
card_eventmgr kill pidfile=$HOME/.card_eventmgr.pid

start her, let her live her life, then gently take her out. iconic behavior, honestly πŸŽ€


πŸ’€ BUGS πŸ’€

okay so not everything is slay. some applications like xscreensaver-command may fail due to external events β€” for example, if they try to unlock an already-unlocked session. in this case, the command incorrectly returns an error code.

so yeah. it's wrong. it's a known thing. it's not you, it's her 😭


πŸ‘‘ AUTHORS πŸ‘‘

  • Juan Antonio Martinez <jonsito@teleline.es>
  • Ludovic Rousseau <ludovic.rousseau@free.fr>

the legends themselves. show some respect 🫑


πŸ¦‹ SEE ALSO πŸ¦‹

go read those too, bestie. iykyk πŸ“š


and that's the whole page!! written by Juan Antonio Martinez, dated Aug 2005, and yeah it's the card_eventmgr(1) page from the PAM-PKCS#11 manual. thank you for coming to my ted talk, go lock your screen on card removal or whatever πŸ’–βœ¨πŸŽ€