This repository has been archived by the owner on Nov 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,077 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
include COPYING README.md | ||
include COPYING CHANGELOG README.md | ||
include tools/*.py tools/README | ||
include make_default_lock.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,26 +53,50 @@ we recommend the ``xautolock`` tool. Just add something like | |
|
||
xautolock -locker pyxtrlock -time 5 | ||
|
||
to your X autostart file to lock the screen with ``pyxtrlock`` after | ||
5 minutes idle time. ``xautolock`` has many other useful features, see | ||
to your X autostart file to lock the screen with ``pyxtrlock`` after 5 | ||
minutes idle time. ``xautolock`` has many other useful features, see | ||
its documentation. Most distributions provide an ``xautolock`` package | ||
with a man page. | ||
with a man page. An alternative to ``xautolock`` is the use of | ||
[autolockd](https://github.com/zombofant/autolockd) which also | ||
monitors for lid close and suspend events. | ||
|
||
Bugs | ||
---- | ||
Bugs & Limitations | ||
------------------ | ||
Additional input devices other than the keyboard and mouse are not disabled. | ||
|
||
Although this is not a bug, please note that pyxtrlock does not prevent a | ||
user from switching to a virtual terminal, so be advised to always leave your | ||
terminals locked. | ||
Although this is not a bug, please note that pyxtrlock does not | ||
prevent a user from switching to a virtual terminal, so be advised to | ||
always log out from your terminals. | ||
|
||
Please report any new bugs you may find to our [Github issue tracker](https://github.com/leonnnn/pyxtrlock/issues). | ||
The lenght of the password is limited to 100 KiB to prevent memory | ||
exhaustion attacks. This limit can only be adapted in the source code. | ||
|
||
Please report any new bugs you may find to our | ||
[Github issue tracker](https://github.com/leonnnn/pyxtrlock/issues). | ||
|
||
Configuration | ||
------------- | ||
The padlock icon can be changed. It is stored as a | ||
[pickle](http://docs.python.org/3/library/pickle.html) of a | ||
dictionary, and the ``tools`` directory contains a tool for generating | ||
cursors from image files. | ||
|
||
The default cursor file is placed at | ||
``PREFIX/share/pyxtrlock/lock.pickle`` while the cursor file at | ||
``~/.config/pyxtrlock/lock.pickle`` takes precedence if present. | ||
|
||
*PLEASE NOTE:* The ``pickle`` file format is not designed to be | ||
resistant against maliciously crafted files. Therfore do not open | ||
``pickle`` files from untrusted sources as they may compromise your | ||
system. The default padlock file is created on install (by | ||
``make_default_lock.py``). | ||
|
||
Requirements | ||
------------ | ||
* [python3-simplepam](https://github.com/leonnnn/python3-simplepam) | ||
* Python ≥ 3.0 | ||
* libxcb | ||
* libxcb-image | ||
* libX11 ≥ 1.4, or libX11 ≥ 1.2 compiled with XCB backend | ||
|
||
These requirements are met at least on | ||
|
@@ -83,7 +107,7 @@ These requirements are met at least on | |
Authors | ||
------- | ||
* Leon Weber <[email protected]> | ||
* Sebastian Riese <sebastian.riese[email protected]> | ||
* Sebastian Riese <s.riese@zombofant.net> | ||
|
||
pyxtrlock has been inspired by | ||
[Ian Jacksons](http://www.chiark.greenend.org.uk/~ijackson/)'s brilliant | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
import sys | ||
import os | ||
|
||
data_dir = os.path.join(sys.prefix, "share/pyxtrlock") | ||
|
||
def panic(message, exit_code=1): | ||
"""Print an error message to stderr and exit""" | ||
print(message, file=sys.stderr) | ||
sys.exit(exit_code) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from ctypes import cdll | ||
from ctypes.util import find_library | ||
|
||
def check_and_load_library(libname): | ||
handle = find_library(libname) | ||
if handle is None: | ||
raise ImportError("unable to find system library: {}".format( | ||
libname)) | ||
return cdll.LoadLibrary(handle) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.