So lately I've been hanging out a lot at Coffee Station and on campus using my Laptop. Doing this, one of the biggest annoyances I had was whenever I had to leave the area to get a coffee or something, I risk leaving the Laptop unattended. Using a cable lock every time was annoying, so instead I wrote a anti theft alarm script that utilizes the Laptop's built in accelerometer. Originally it's meant to be used for the HDAPS, or Hard Disk Active Protection System, to detect shock and prevent data corruption, but I will be using it for a different purpose. Here is a demo video...



This is how it works. Whenever I am about to leave the laptop, I start the script which locks the laptop and start the gnome screensaver. Any small bumps or tilting up to 20 degrees of the laptop will produce a small chirp sound where the volume is directly proportional to how tilted it is (so the more you tilt it, the more loud it becomes) as a initial warning to anyone who bumps or laptop or for small movements. Any movement beyond 20 degrees of tilt will start the alarm at the highest volume (and the ThinkPad speakers are Loud). The script monitors the gnome screensaver status, so the only way to stop the alarm or to unarm the system is to log in using the password or a finger swipe which the gnome screensaver.

If you want to get this working on your linux laptop, make sure you have HDAPS on your laptop and Tp_smapi installed. There are other anti theft implementations that use the HDAPS data you can find here, but none of them integrated well with the gnome screensaver or have the initial warning feature. That's all for now, hope you found this useful.

Script Source

Update Nov 8: A variation of this same script for Kubuntu/KDE written by Colin Verot.
2008-10-22 16:58:19 | 6 Comments »

Joe wrote
I would just turn off the laptop using the power button, before making off with it =P
Janitha wrote
Yeah, that's one of the main downsides of this... but an assumption was made that the thief wouldn't know that a alarm exists in the first place, and that they also wouldn't know that you need to hold down the power button for more than 4 seconds to shut it down (soft power down is disabled on the laptop).

Some other downsides are if the thief plug's in headphone to the headphone jack (which disables the laptop's speakers), or restarts the X server (killing the screen saver and the script). And so on.. the cat and mouse game continues.

This is just a first line of defense... this coupled with a cable lock is probably the best way to go.
Will wrote
Is there a way to get this working on Vista by any chance... had no idea my ThinkPad could do this magic.
alp4095 wrote
This is great, one more way to expand on this is to have a power adapter trigger that also sounds the alarm if unplugged when armed.

Also include a link back to this article from the youtube video
cookiedough wrote
Cool script, any way you can post the alarm sound files in the video?
Adam wrote
cool stuff, but have you forgotten about your site, you should update it more...
Leave a Reply



How many Squares and Circles do you See? Refresh page to get a new one.

Refresh Image

Boxes Circles



Links
Articles
About

Driven by a strange fascination about how things and society work and a mysterious craving for new information and experiences, you will find me doing a little bit of everything.


Website Under Construction

These days I am slowly rewriting and redesigning the website from scratch, excuse me if you come across any bugs or non working parts of the site. Let me know your comments or suggestions.

Subscribe