Go to file
2014-09-18 18:22:00 -07:00
.gitignore implement ffmpeg webcam + imgur + twilio mms support. 2014-08-26 00:32:52 -07:00
.hgtags Added tag 1.0 for changeset 05b949016e85 2012-02-11 10:51:31 +01:00
config.mk refactor. 2014-08-19 20:10:34 -07:00
imgur_example.h implement ffmpeg webcam + imgur + twilio mms support. 2014-08-26 00:32:52 -07:00
LICENSE applied Robert Schneider's Linux suggestions, also bumped version and updated LICENSE file's copyright notice 2013-08-02 22:11:18 +02:00
Makefile preparing 1.0 2012-02-11 10:51:26 +01:00
README disable alt+sysrq. 2014-09-18 14:38:54 -07:00
slock.c disable ctrl+alt+backspace 2014-09-18 18:22:00 -07:00
twilio_example.h implement ffmpeg webcam + imgur + twilio mms support. 2014-08-26 00:32:52 -07:00

slock - simple screen locker
============================
simple screen locker utility for X.

Changes by chjj
------------

- Custom Password: You can provide a custom password so you don't have to enter
  your user password on the X server. Simply create a ~/.slock_passwd file with
  your separate password in it.

- Alarms: A siren will play if a user enters an incorrect password. It must
  reside in ~/slock.

- Automatic Shutdown: Your machine will immediately shutdown if:

  1. The wrong password is entered more than 5 times.

  2. ALT/CTRL/F1-F13 is pressed to switch VTs or to try to kill the X server.
     Also, if ALT+SYSRQ is attempted to be used.

  - Automatic shutdown requires a sudoers option to be set in /etc/sudoers:

    - systemd: `[username] [hostname] =NOPASSWD: /usr/bin/systemctl poweroff`
    - sysvinit: `[username] [hostname] =NOPASSWD: /usr/bin/shutdown -h now`

    You must change [username] and [hostname] to your username and the hostname
    of the machine.

- Twilio Support: You will receive an SMS to your phone when someone inputs a
  wrong password or pressed ALT/CTRL/F1-13/SYSRQ. See twilio_example.h to create a
  twilio.h file. You will need a twilio account to set this up.

- Disabling alt+sysrq before shutting down: This prevents an attacker from
  alt+sysrq+k'ing the screenlock quickly before the shutdown.

  - This requires a sudoers option to be set in /etc/sudoers:

    - [username] [hostname] =NOPASSWD: /usr/bin/tee /proc/sys/kernel/sysrq

    You must change [username] and [hostname] to your username and the hostname
    of the machine.

Requirements
------------
In order to build slock you need the Xlib header files.


Installation
------------
Edit config.mk to match your local setup (slock is installed into
the /usr/local namespace by default).

Afterwards enter the following command to build and install slock
(if necessary as root):

    make clean install


Running slock
-------------
Simply invoke the 'slock' command. To get out of it, enter your password.