USB Wireless PC Lock Patches, Packages and Add-Ons
At this place I publish my patches, packages and add-ons to the
usb-lock Linux driver project
by Tim Theede.
The original intent of the Wireless PC Lock devices is to lock the
computer if its owner leaves a range of a few meters and unlock it
automatically, when he/she is back.
The programs provided here will allow you to have the same
functionality under Linux and do much more.
Device Example
USB Wireless PC Lock by KeyMark Semi.
Patches and Patch-In Add-Ons
The following patches to vp-usb-lock v0.2.1 are available:
-
usblock-0.2.1-driver-gfp.patch
This patch replaces the duplicate SLAB_* symbols by the GFP_* equivalents. This is required to compile the module on Linux 2.6.20 and upwards as SLAB_* has been removed. -
usblock-0.2.1-driver-latestkernels.patch
This patch allows compilation of the usblock loadable kernel module on newer Linux kernels (2.6.19 for me). -
usblock-0.2.1-lockd-cleanup+releasedevice.patch
Patch that makes sure that the device node is closed before event commands are executed. This is required to allow forking of processes to the background on events without aborting the lockd and to access the device node while event commands are being executed. It also cleans up vp-usb-lock's lockd source and adds correct indenting. -
usblock-0.2.1-lockd-allowoffline.patch
Adds an "offline mode" to the usb-lock lockd which allows the daemon to run even if the device is not attached to system and to continue normal operation even if the device is detached and re-attached.
Requires: usblock-0.2.1-lockd-cleanup+releasedevice.patch -
usblock-udev.patch
As the USB Wireless PC Lock devices are driven by a chip usually utilized in USB joysticks, these devices are grabbed by the usbhid driver and bound as HID event/mouse device.
So this patch adds Udev integration that checks whether a matching USB device is a Wireless PC Lock and loads the usblock driver, snatches it from the usbhid driver if necessary and binds it to the usblock driver. -
usblock-lockd-multirun-v2.patch
This patch adds a program that allows execution of multiple scripts from "include" directories on "got in range" and "got out of range" events. -
usblock-lockd-redhatinit-v2.patch
Adds a modern initscript for usblock's lockd on RedHat and RedHat-based distributions such as Fedora, CentOS and Aurora Linux that allows convenient configuration and spruce integration.
Requires: usblock-lockd-multirun-v2.patch -
usblock-addlicense.patch
vp-usb-lock is released under GPL but the COPYING/LICENSE file is missing in the v0.2.1 tarball. This patch adds it.
Add-Ons and Usage Examples
These are examples for everyday use of the usb-lock lockd:
-
usblock-xlock
"In" and "out" event scripts for usb-lock lockd that use xlock to lock the primary X screen (:0) when you leave your receiver's range and unlock it when you bring your Wireless PC Lock button back in range or enter the system's root password.
Requires: xlockmore, gdm
Source and Binary Packages
I created SRPMs that should build on every current RedHat(-like) Linux distribution and binary packages for Fedora Core 6 i386 and x86_64:
-
dkms-usblock SRPMs and architecture-independent RPMs
Packages containing usb-lock's source for the usblock loadable kernel module, my driver patches and build rules for the Dynamic Kernel Module Support framework (dkms) for building and installing the usblock loadable kernel module automatically when required.
Requires: dkms, usblock -
usblock, usblock-daemon SRPMs and i386/x86_64 RPMs
usblock provides Udev integration of the usblock loadable kernel module, usblock-daemon provides usb-lock's lockd (named usblockd), configuration and all patches described above (except kernel module patches). Simply install, configure your Wireless PC Lock button's ID, put your in- and out-of-range scripts into /etc/usblock/{in.d,out.d}/ and start the daemon ("service usblockd start").
Requires: usblock LKM (i.e. dkms-usblock) -
usblock-xlock SRPMs and architecture-independent RPMs
The usblock-xlock add-on described above. Simply install and your screen gets locked/unlocked when you leave/enter your receiver's range. Currently only works with GDM and only locks the primary X screen.
Requires: usblock-daemon
Copyright/License
All patches and add-ons ©2007
Veit Wahlich <cru [at] zodia [dot] de>,
released as free (libre) software under the terms of the
GNU General Public License, version 2.
The author disclaims responsibility of any damage or harm caused directly
or indirectly by usage of this software. Use only at your own risk.