App::PerlXLock - A simple X locking utility.


    #lock without password

    #When using perlbrew, the following zsh command runs lock with password read from /etc/shadow.
    #Add NOPASSWD to sudoers accordingly. 
    sudo $(which perl) $(which plock)

    #lock with password given in an environmental variable
    PLOCK_PASSWORD="password" plock


A X11 locking utility. plock turns the screen black and waits for a key press. If /etc/shadow is not accessible and PLOCK_PASSWORD is not set, plock terminates after pressing return. If /etc/shadow is found to be readable, then it waits until the user has typed his password and pressed return.

In case of mistyping the password, simply retype as plock detects once the correct password appears in the buffer.

The module uses libX11, which must be installed prior to installing this module.


At the moment, recognizes only a shadow password file or the environmental variable.


This software is licensed under the same terms as Perl itself.