Archive for July, 2010

If you’re not familiar with how DropBox works, it’s simple: You create a free account with DropBox, and install a small app on your computer. This app creates a folder on your computer (wherever you choose) and monitors that folder at all times. Whenever you change the contents of this folder, by adding, modifying or deleting files, DropBox automatically syncs these changes to your account’s folder on their servers. Additionally, any other computer logged into that same account will have their DropBox folder synced as well. There’s nothing earthshaking about this capability,  but the whole process is amazingly simple and makes collaboration an absolute breeze.

Still, with a little creativity, DropBox can be a lot more than just a way to move files from one computer to another. We’ve compiled a list of five of the coolest DropBox tricks we’ve heard of so far, so read on to find out how you can use DropBox and other free software to recover a stolen laptop, organize your Torrents, keep your passwords safe, and more.

1. Keep all your passwords safe

Everyone knows that good password security requires that you use passwords that are A) long, B) complicated, and C) different for every website and service you use. Of course, these three requirements also make it a total pain to memorize all the passwords you need, meaning that most people don’t follow the rules, either using one password across many services (a security risk) or writing their passwords down near the computer (also a security risk).

That’s where KeePass comes in. KeePass is a free, open source password safe. It allows you to generate a unique, totally random password for every site or service you use, while only requiring you to remember a single master passphrase. Whenever you attempt to log into a service, KeePass asks for your master passphrase, then automatically enters the appropriate password from your safe.

That’s all well and good, but what do you do if you frequently use two different computers (say, a desktop and a laptop)? You could use a USB drive to keep your KeePass password archive with you at all times, but that’s one more little bit of hardware you have to keep track of. Instead, use DropBox to keep an up-to-date copy of your password file on both computers, at all times. Just tell KeePass to save your password archive somewhere in your DropBox synced folder.

Worried about security? Fuhgeddaboutit. KeePass saves your password in an archive encrypted with nigh-unbreakable AES 256-hit encryption. That means that as long as you pick a strong, long password, getting a hold of your KeePass file won’t do a hacker a bit of good.

2. Catch Laptop Thieves

As PC enthusiasts, nothing gets our blood boiling like tales of stolen laptop computers. With DropBox, though, there’s a chance for sweet, sweet revenge. The trick is to set up a keylogger on your own machine, and set it to save its log files into the Dropbox shared folder. If anyone ever steals your laptop, your Dropbox folder will give you a detailed look at what the thief is doing with it. If the cretin connects to a service such as MySpace (and our personal research indicates that cretins just love MySpace) then you’ll know exactly who stole your notebook.

By letting Dropbox handle the syncing, you don’t have to let an internet-enabled keylogger through your firewall (because who knows who it could be sending data too). Of course, keyloggers are pretty sketchy business, so if you want to try this trick out you’ll have to track one down on your own.

3. Access an Encrypted Drive, Anywhere

We like Dropbox. We like TrueCrypt. So what if… What if, we were to use the two together? Crazy, we know, but by combining the top-notch encryption of TrueCrypt with the easy syncing of Dropbox, you can create an encrypted drive accessible from any computer.

To do this, just download the TrueCrypt executable, run it, and choose to Extract it (rather than install it) to your Dropbox folder. From there, make an encrypted volume, as described in this article. This will allow you to run TrueCrypt and mount your encrypted volume straight off of the Dropbox folder, on any machine.

There’s one thing you should note about this method: First, Whenever Dropbox updates a file, it first compares the old file and the new, then only uploads or download only the bits that have changed. On the one hand, this is good because it means that you don’t have to re-upload your entire 500MB encrypted volume every time you add something to it. On the other hand, a hacker could (theoretically) see how the encrypted data is changing as you add or change files in the volume; an encryption no-no. Still, this definitely not something you have to worry about if you’re just looking for a little extra security for your Dropbox files.

Read on to find out how you can use Dropbox to control a BitTorrent and sync up all your instant messaging logs!

4. Control a BitTorrent Client Remotely

How often have you found yourself sitting at work, only to find out that a file you’re interested (a demo for a game you’re excited about, for instance) has just become available online. Sure, you could sit there patiently, and wait until you get home to download it; but why bother waiting when you could have it ready for you as soon as you get there. Most of the big BitTorrent clients have some sort of web-based control, but those can be tricky to set up, and require that you have a static IP (or set up a DynDNS account). Using DropBox, it’s much easier.

Here’s what you’ll need to do: First, make sure you have a BitTorrent client capable of automatically loading .torrent files from a folder. All the big ones are capable of this, including uTorrent, Vuze, and the standard BitTorrent client. Next, set it up to monitor your DropBox, or a folder in your DropBox (My Documents/My Dropbox/Torrents for instance) and automatically open any .torrent file added to that folder.

Now, if you see a file you want to grab, just download the .torrent file to your Dropbox/Torrents folder, and your home PC will start the download as soon as DropBox syncs. It’s as simple as that.

Of course, this method requires that you leave you computer on all day long, a decidedly environmentally-unfriendly practice that we don’t recommend. But If you’re anticipating the need to download something (a beta test for a new MMO, maybe?) we won’t fault you for making a one-day exception.

5. Access your IM logs from any computer

A lot of people use instant messaging to keep in touch with their coworkers during the day. We certainly do here at the Maximum PC office, but we’re sure the same can be said for many less-technically-forward offices as well. Because of that, there are times when, while you’re at home, you want to remember something from a conversation you had while you were at work, but you can’t, because your IM logs are stored on your work computer.

That doesn’t have to be the case, though. If you use Pidgin, a free, open source multi-protocol IM client, you can tell it to save its logs in a folder in your Dropbox. As long as Pidgin is set up that way on all of your computers, they will all share access to the same logs.

Actually setting it up so that Pidgin saves your logs somewhere other than the default location is a little trickier than you might imagine, though. You’ll need to change the PURPLEHOME environment variable on your system, which defines where Pidgin will save its configuration files and logs. To do this, open the control panel and select System. Then select the Advanced tab, and click on Environment Variables. Now, click New under the System Variables box. In the Variable Name field, enter PURPLEHOME and in the Variable Value field, enter the location of your Dropbox folder. Now Pidgin will use a folder inside your Dropbox called .purple to save its data.

If you’re ok working from a fresh install of Pidgin, that’s all you’ll need to do. If you have existing settings and logs that you want to keep using, just copy the .purple folder from its default directory (Application Data) to your Dropbox directory.

Get Dropbox here:

You can do it simply from your terminal window.

sudo shutdown now

to shutdown your machine NOW.

where hh:mm is the time on 24hr clock to shutdown at 7:50 you need to type

sudo shutdown hh:mm
sudo shutdown 7:50.

where m is the minutes. If you type

sudo shutdown +m
sudo shutdown +120

the machine will shutdown itself in 120 minutes.

And for the non terminal guys there is an application for doing this and more its called Gshutdown.

You can install Gshutdown by simply running the

sudo apt-get install gshutdown

command in your terminal or through Synaptic Package Manager.

How do I exclude certain directories while using the find command under UNIX or Linux operating systems?

You can use the find command as follows to find all directories except tmp directory:

find /path/to/dest -type d \( ! -name tmp \) -print

Find all directories except tmp and cache:

find /path/to/dest -type d \( ! -name tmp \) -o \( ! -name cache \) -print

The -prune option make sure that you do not descend into directory:

find /path/to/dest -type d \( ! -name tmp \) -o \( ! -name cache -prune \) -print

You can find all *.pl find except in tmp and root directory, enter:

find /  \( ! -name tmp \) -o \( ! -name root -prune \)  -name "*.pl" -print

I thought it might be helpful to some people. To output this information to a file in your home directory you would use,

dpkg --get-selections > installed-software

And if you wanted to use the list to reinstall this software on a fresh ubuntu setup,

dpkg --set-selections < installed-software

followed by


vnstat is another app that can be used to monitor bandwidth usage. It is a little simpler and easier to use then the ipac-ng package. One of the benefits of vnstat is it’s not a running daemon so it takes up no memory. The process is created via a cron job which is run every 5 minutes.


The vnstat package is very easy to install from the repositories with no dependencies.

sudo apt-get install vnstat


vnstat is meant to be used by any user so it needs to be set up that way first by giving correct permission. The following gives any user permission to use this feature. If desired you can set up a group so only users in the group can use this.

sudo chmod o+x /usr/bin/vnstat

sudo chmod o+wx /var/lib/vnstat/

Now vnstat should be ready to run


To create the cron job simply run this command

vnstat -u -i ath0

Replace ath0 with the interface you want to monitor

This creates a file in /var/lib/vnstat/ that collects the data for that interface. A cron job will run every 5 minutes to update the data. Below is a sample output with no options.

Database updated: Thu Jan 12 22:20:01 2006


           received:           0.11 MB (nan%)
        transmitted:           0.01 MB (nan%)
              total:           0.12 MB

                        rx     |     tx     |  total
            today      0.11 MB |    0.01 MB |    0.12 MB
        estimated         0 MB |       0 MB |       0 MB

You can read more about options you can use to modify the output in the man page of vnstat.

If you want to make sure your files is for your eyes only you need to password protect these files. Let’s see how you can do this in Linux.

First, pick a good password. There are a few websites on the Internet that help you generate strong passwords. Try and pick an alphanumeric password. Something such as Rv7fkcxASW8h would be a good choice but make sure you remember that .

Now check to see if you have the package gpg installed on your computer. Run the following command to check:

# whereis gpg
gpg: /usr/bin/gpg /usr/share/man/man1/gpg.1.gz

If you get an output like the one shown above it means you have the required package installed. If not, check your Linux distribution’s documentation to see how you can install the GPG package.
Say you want to password protect a file called with the password Rv7fkcxASW8h here’s how you would go about it:

# gpg -c

When you enter this you will be requested to enter a passphrase, which is the password you want to protect the file with. Enter the password twice. Now you should see a file called in the same directory as the original file. This is the encrypted and password protected copy of the original file. You can store this file on your hard drive or ship it to someone on a DVD knowing that it will be very hard and nearly impossible for most people to crack it.
When you want to read the file you will need to remove the password protected encryption. For that execute the following command:


You will be asked to enter the password using which the file was protected. Enter that and you should be in business. Note that this only works for files and not for folders. You should create a zip or tar archive of the files you want to secure and then add the password protected encryption to it.

Encoding data into two dimensional barcodes can be done directly with Ubuntu, as the default repositories provide tools which accept a text file as input and outputs a png datamatrix or QR Code.

Pause Hi-Tech encoded in QR CodePause Hi-Tech in QR Code

Here is the iec16022 and qrencode command-line tools usage, in order to quickly encode bits of text into a 2D barcode.


sudo apt-get install iec16022
iec16022 -f PNG -i input.txt -o output.png
mogrify -scale 300x300 output.png

QR Code

sudo apt-get install qrencode
cat input.txt | qrencode -s 10 -o output.png
Pause Hi-Tech encoded in datamatrixEncoded in Datamatrix Code

Note: the -s 10 defines the size (in pixels) of a dot.

Creating datamatrix and QR codes with Linux has never been so easy!

Note that you can decode QR codes using the libdecodeqr-examples Ubuntu package which includes a C++ app along with its source code.

APTonCD is a tool with a graphical interface which allows you to create one or more CDs or DVDs (you choose the type of media) with all of the packages you’ve downloaded via APT-GET or APTITUDE, creating a removable repository that you can use on other computers.One thing you need to remember this will create backup all the packages installed using apt-get,synaptic because these package arcives are stored in /var/cache/apt/archives

APTonCD will also allow you to automatically create media with all of your .deb packages located in one especific repository, so that you can install them into your computers without the need for an internet conection.

APTonCD Features

Create media with all your downloaded packages;

Create media with all packages from an especific repository

Download all official Ubuntu repositories (main,restricted,universe and multiverse) into removable media (CD/DVD);

Perform backup/restore all packages installed via apt;

Install, with the same CD/DVD, the same programs into several different machines;

Upgrade softwares/packages for several different machines, downloading them only one time;

Install APTonCD in Ubuntu

sudo apt-get install aptoncd

or you can download .deb package from here once you have this you can install using the following command

sudo dpkg -i aptoncd_0.1beta-1_all.deb

Backup all your installed Packages

This will complete the installation and if you want to open the application go to System -> Administration -> AptonCD

Once it opens you should see the following screen

In the above screen you can see two tabs called create and restore first one is create tab now if you want to create a backup of your installed packaged you need to click on “Create AptonCD” now you should see the following screen reading all the available packages from /var/cache/apt/archives directory Once it read all the packages and you should see the following screen

Here you can add any other packages you want to add and click ok

Here you can see APTonCD creating the necessary CD/DVD image and saves it in the location you had chosen is in progress

Here you can see the .iso image stored successfully in the location i had chosen and you can use this image you can burn CD/DVD

Restore Packages

If you want to restore your backup you need to click on restore tab now you should see the following screen this is having three options as follows

Restore APTonCD

Restores all packages available from an APTonCD media to your computer

Restore .iso Image

Restores packages from an APTonCD .iso image previously generated and stored locally


Add a CD or DVD created as a repository for apt-get,aptitude or synaptic

You can choose which one is suitable for you and restore all your packages

APTonCD Version Details

This tools is very useful if you want to install same packages in different machine you can save your bandwidth and if you have slow internet connection