How to track your Linux laptop

On this page

  1. Prey
  2. Dropbox
  3. Location Magic

So, you just bought a new shiny laptop and you are uncomfortable about the possibility to see it stolen and lost forever? There are many things you can do to help you recover your laptop after such an unfortunate thing happens, and almost all of them involve some kind of tracking software. Here is a quick guide on how to set up easy to use tools that will help you locate your stolen laptop.

Prey

Prey is a multi-platform tracking software that allows the tracking of up to three devices for free. It uses geolocation methodologies to track your device based on the IP of the connection that your set up device is using to access the internet, or the GPS sensor if your laptop has one. The software is distributed under the GPL license, so it's open source.

First, visit the download webpage and download the latest Prey package. You may also find it on your distribution's default repositories as well. After the installation is done, you will be prompt to create a new account.

Prey Tracking Software - Step 1

After this is done, Prey will add the device on its online database and connect it with your account. You may then simply visit the Prey website and login to start tracking your device.

Prey Tracking Software - Step 2

Prey Tracking Software - Step 3

Prey Tracking Software - Step 4

Once I set my device as “missing” Prey will begin sending me reports. Those reports contain the device's location (best guess), a screenshot of the desktop, and a photograph from the webcam.

Prey Tracking Software - Step 5

Prey Tracking Software - Step 6

Note that the webcam didn't light up when it took the above picture, so the person who stole your device doesn't have a clue that it is being tracked. Prey generally tries to stay in the background as much as possible, and it is very light on power consumption.

Dropbox

Dropbox is not a tracking software but a cloud data service. However, there are many Linux users who have Dropbox integration installed in their systems so every time your laptop connects to the internet Dropbox syncs the latest data changes with the defined local folder. This basically tells the online service approximately where your device is through IP tracking. Go to the Dropbox website and login to your account. Then go to “Settings” and choose the “Security” tab and there you will get the IP of the last session.

Dropbox

Location Magic

Another way to track down your stolen/lost Linux laptop is Location Magic (https://locationmagic.org). After creating a new account on this service, you receive an email with a unique token needed to access the webpage that contains the geolocation information. For this to work, you will need to install the Location Magic script in your system. To do this, enter the following command on a terminal:

wget https://locationmagic.org/install_scripts/locationmagic.sh && sudo bash ./locationmagic.sh -install linux 70f0fc3f6c2fbb23a75a

This will basically add a cron job in your system that will run the script one every hour. You may also check the (open source) code of the script on Git (https://github.com/unwiredlabs/location-magic/blob/master/README.md#installation-instructions-for-unix-devices) and install it manually on your crontab. After this is done, you may follow the link on the email that you got from the service, insert your token and track your device.

Share this page:

8 Comment(s)

Add comment

Comments

From: Incredulous

Color me unbelieving.

Riddle me this:

A laptop is stolen, reformatted and loaded with a new OS.

How will it ever be found?

From: Bill Toulas

Of course, if your system is reformatted there will be no way to locate it. However, you can set your BIOS settings in such a way, that a thief would find it much more difficult to install a new system. Even a few logins in your system could yield enough information to help you locate it. :)

From: Don't do this

This is a horrible idea.  The laptop is nothing compared to your personal data.  In what world is the better solution to let a thief access your personal info while prey sends you snapshots in the hope some police department will even care to help you. Encrypt and backup your data and forget the laptop, it's replaceable.  But if you must setup your main os on a hidden volume and allow it to boot into a decoy os that uses prey.  But that is so much effort for nothing. 

From: Bill Toulas

Well, there is no good or horrible idea really. It all depends on what you want to do, and I am not expressing any opinions here, I am just showing how things are done for those who want to do them. My own data for example are worth much less than my systems. Actually, I rarely even have any personal data stored inside my computers. How does that sound to you? 

From: MK

These are terrible solutions.   The price of a laptop is nothing comparing to the value of the data contained within the laptop.  

ALWAYS encrypt your portable devices and backup your stuff. 

No police department will ever help you track down a $200 laptop. 

From: Bill Toulas

How can you suppose that? I may own a laptop that costs +$2500 and contains almost no personal data at all. If the post doesn't concern you, it doesn't mean that the solution is "terrible". Those tools exist for those who need them, and there are people who do actually need them. I will write another article on how to encrypt your data as this is a different case altogether. Thanks :)

From: Tomas

So my laptop is LUKS encrypted, if it gets stolen, there is no practical way somebody can manage to boot Linux without reformatting the disk.

From: Don't do this

@Bill Toulas.  For some reason I couldn't reply under your reply.  You are correct and horrible was a bit harsh. I think this article would have been a little better with some disclaimers on what you can possibly do with this info if it starts phoning home. 

First off is to file a police report.  Otherwise the police will not give you the time of day, they still may not after you do and all you have left is vigilante justice, staking out libraries and such.  If the thief has any clue at all they will securely wipe the drive before they do anything, or will not connect to the Net at all while they rummage through your stuff.

I did test Prey some months ago, but it was the local version that used email to notify you, not the web version.  I stand by my assessment though in that the average user does have personal info on their laptop. (banking info, pictures, taxes, bills, social security number in some document etc etc etc).   I am interested in using this software on a decoy OS with my actual OS on a hidden encrypted partition and will one day test that....ya right who am I kidding.  I think that would be an acceptable approach. 

I guess my critisism is related to the fact that the average user would read this and think this is a good security solution for them, when in fact it is more akin to closing the barn door after the horse left.  Google and you will find some people who have used this software and indeed had screenshots sent to them of strangers surfing their Facebook pages and looking at their pictures.  That's crazy, encryption is the number one thing people should do on laptops.

Anyway, your review of the actual software was spot on.  Just the context I take issue with.

Cheers.