# The following was performed on Debian Stretch
#
# Adapted from:
# https://github.com/OpenSC/pam_pkcs11/blob/master/doc/README.eventmgr
#
# Note: A working PAM integration is required. See:
# https://pastebin.com/cx6T3L9H
# =====================================================================
# Create /etc/pam_pkcs11/card_eventmgr.conf
# ---------------------------------------------------------------------
card_eventmgr {
# Run in background.
daemon = true;
# show debug messages
debug = false;
# polling time in mili-seconds
timeout = 1000;
#
# list of events and actions
# Card inserted
event card_insert {
# what to do if an action fail?
# ignore : continue to next action
# return : end action sequence
# quit : end program
on_error = ignore ;
# You can enter several, comma-separated action entries
# they will be executed in turn
action = "/usr/bin/xscreensaver-command -deactivate";
}
# Card has been removed
event card_remove {
on_error = ignore;
action = "/usr/bin/xscreensaver-command -lock";
}
# Too much time locked session
event timeout {
}
}
# Start /usr/bin/card_eventmgr on login
# ---------------------------------------------------------------------
#
# Option 1: ~/.xsession
#
# add /usr/bin/card_eventmgr to the ~/.xsession file
# Option 2: add to Window Manager
#
# Example in xfce4:
# 1. Applications > Settings > Session and Startup
# 2. Application Autostart tab > Add...
# 3. Enter a description and "/usr/bin/card_eventmgr"
Comments
0 B
|👍
/👎