Termlock blanks a curses compatible character terminal (e.g. xterm, eterm, PuTTY, konsole, dtterm, etc ...) and locks it. To unlock the terminal a password must be entered. The password, or rather the password hash, is stored in ~/.termlock. Basically it's like a password protected screensaver for character terminals. Written in pure Python it should be immediately usable on any machine with Python and curses (or a compatible library such as ncurses) installed.
Usage
The password switch prompts the user for a password (which must be confirmed) and uses this to create the ~/.termlock hash file.
To lock the screen simply call termlock with no options. If no ~/.termlock file can be found then an error prompting the user to create it will be displayed
Install
Termlock uses the standard Python distribution utilities. So it should just be a case of uncompressing the archive and running:
Obviously the user running this must have sufficient permissions to create a file in the install directory.
To Do
Currently termlock requires the use of the ~/.termlock file. This is because there is no standard way in Python (across all platforms) to access the system wide password information in /etc/shadow. If/when one is added to the Python standard library, termlock will be updated to support it.
This is just a bug fix release. Under the newer versions of Python, termlock would abort when trying to ignore SIGSTOP. The fix allows termlock to continue even if it isn't able to ignore every signal it would like. Note that this does not affect its functionality, it still requires either the correct password or sufficient privileges to kill the process in order to unlock the terminal.
As well as the bug fix there has been a general clean up of the code and an improvement in error handling.
| Version | File | Description | MD5 |
|---|---|---|---|
| 1.0.1 | termlock-1.0.1.tar.bz2 | Fixed signal setting problem. | c08633ebc068a7667b1dbb8d2832099f |
| 1.0.1 | termlock-1.0.1.tar.gz | Fixed signal setting problem. | d1f974baa2325ffe8c663998b3e6e33d |
| 1.0.0 | termlock-1.0.0.tar.bz2 | Initial release. | 5b5405da380989b0f993722069462b94 |
| 1.0.0 | termlock-1.0.0.tar.gz | Initial release. | c653aca0a7d5fdcbd2667c787c2c16d4 |
Assorted Scripts - things that don't warrant a whole project but might be useful to someone.
Site hosted by Linode: using Apache, PHP, MySQL and Propel.
Site created using Eclipse PDT and OS X.
Site design and original content Copyright © Vrai Stacey. Unless otherwise stated, source code contained on this site is published under the GNU Public License (GPL).