allan icon

SmartCards - xscreensaver Integration with card_eventmgr

allan | PRO | 07/18/17 08:46:30 PM UTC | 0 ⭐ | 463 👁️ | Never ⏰ | []
Bash |

1.54 KB

|

None

|

0 👍

/

0 👎

# 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

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎