pyxtrlock -- xtrlock rewritten in Python • zombofant.net zombofant.nethacking and stuff#skip-to-content#navigationTurn lights on NavigationHomeAbout usBlogMarch 2013pyxtrlock -- xtrlock rewritten in PythonFebruary 2013December 2012October 2012September 2012August 2012Browse by tagHackingPython Web FrameworkpyxtrlockTag cloudcupsdspepsonesafedorafirefoxhackinghardwarekdelinuxmarblemetaclasspampyLR1pythonPyWebPyWeblogPyXWFsanescanningsocis2012xcbzombofant.netYou are here: zombofant.netMarch 2013pyxtrlock -- xtrlock rewritten in Pythonpyxtrlock -- xtrlock rewritten in PythonA couple of days ago, I installed Fedora on my laptop, and the one major thing that immediately bothered me was that my favourite screen locker, xtrlock, was not available on Fedora.xtrlock is a very old and very minimal X display lock program that doesn’t black the screen, but leaves all programs completely visible. It disables mouse and keyboard input and replaces the mouse pointer by a blue padlock icon. There’s no password prompt, you simply type your password at it and hit enter to unlock. I really enjoyed this elegant simplicity and didn’t really feel like moving to the bulky xscreensaver, so I tried to get the source code and compile it myself.It turned out that Ian Jackson, xtrlock’s original author, wrote the tool in 1993/94, and back then you would just use the password hashes from /etc/passwd for authentication. Apparently the tool has since then been unmaintained, only the Debian maintainers patched it to at least support shadow authentication at some point in 1996. Nowadays, however, this is outdated as well, and the way to go is to use the Pluggable Authentication Modules, or PAM interface for authentication.As I really didn’t want to miss xtrlock, I simply decided to rewrite it myself in Python, using PAM for authentication, and while at it, port it to use the newer XCB interface to the X11 protocoll through ctypes, as XCB is more modern and designed to replace Xlib in the future.It turned out to be a little more work than expected, and I had to port a python-pam interface to Python3 on the way, but during the process Sebastian Riese got enthusiastic as well, so we hacked it up together and here it is now: see the project page or visit the repository on Github to check it out.If you run into any problems, we’d be happy to hear from you in the issue tracker on Github.tags:previous: The content on this page is licensed under CC-BY-SA. About usLegal notes / ImpressumAccessibility