Ghostery Firefox Add-on Blocks Hidden Web Tracking

Posted January 14th, 2010 in Life Online

Ghostery alerts you about the web bugs, ad networks and widgets on every page on the web.
Web bugs are hidden scripts that track your behavior and are used by the sites you visit to understand their own audience”

These trackers often don’t even use cookies, and are not easily blockable with add-ons like AdBlock. I’d reccomend this add-on to anyone.

10 mistakes to avoid when learning Linux, especially if you’re coming from Windows.

Posted January 14th, 2010 in Linux
  1. Not learning to use the command line. File managers are great, but the console is really your best friend. Get comfortable using it. The most important command is man. That gives you the documentation you’ll need to get started on most of the other commands you’ll learn about. The very next command to learn and learn well is ls. Then move on to cp, mv, ln, rm and tar. File permissions and ownership, pipes, redirection and grep round out the bare essentials.

  2. Not learning about backing up, package management and upgrading. Backing up your files is pretty obvious, and applies to all operating systems, but there it is. Learn it, do it. Package management on variants of Linux can be slightly different. Study those man pages! Eventually you’ll probably break something when you try to upgrade a package or do a system upgrade. You’ll be glad you learned the command line if and when you break something.

  3. Not looking before you leap. Every time you do something major to your system, like upgrading the whole thing or maybe just your favorite, much used software, find out all about it before you act. Use your google-fu. Join your operating system’s forums and pay attention to the news and release notes. Submit those questions, it never hurts to ask.

  4. Being too lazy to type. Learn to use two text editors. One for the GUI environment, one for the command line. There are many choices for GUI, it doesn’t hurt to try a few out until you find your favorite. For beginners, the best choice on the command line is probably Nano. You may want to move up to Vim or Emacs if you’re not afraid of a steep learning curve at the very beginning.

  5. Not learning what all those directories mean. You don’t have to be an expert on everything under your / (root) directory, or even your ~ (home) directory but be curious and find out what they are as time permits. When backup/restore time comes, you’ll be glad you did. There is also a wealth of information tucked in there, like running processes (/proc), all kinds of log files (/var) and a myriad of settings in files and directories that start with a dot.

  6. Putting up with the default options on your new installation. Linux is infinitely more customizable than Windows. Learn how to make your life easier by creating your own menus, icons and writing your own simple scripts and shortcuts.

  7. Not learning about the shell. This usually means bash, the software that runs in your terminal, or command line. It’s related to number 1 above, but gets its own entry because if you take the time to drill down just a little, you can make your life a lot easier when fixing annoyances, changing configuration files, capturing program errors or want to automate just about anything on your system.

  8. Neglecting security. Most of this is common sense. Don’t run a web or ftp server on your machine without knowing what you’re doing. Don’t neglect upgrades, they are often nothing more than security fixes. Pick a nice long password for your account and memorize it. Change it from time to time. Remember to lock your door, physically and metaphorically!

  9. Expecting it to be as “easy” as windows. It doesn’t have to be nuclear physics hard, but Linux does require to you think a little more. This is not a bug, it’s a feature.

  10. Giving up too easily. Don’t expect to learn the whole Linux ecosystem in a week, a month or even a year. It’s ongoing. If you don’t like to learn, go back to Windows. Don’t expect it to be the same as Windows either. There is a lot more power granted to the user of a Linux system, use it wisely. The modern Linux desktop seems very similar to Windows at first, and I suppose parts of it are. But give yourself time to learn it and you’ll come to love its power and flexibility.

Getting The Most Out of Konqueror and When Working With Your Website Files

Posted December 14th, 2009 in Linux

I use Xfce for the window manager on my Arch Linux box because it is simple and fast.  But there are a lot of great Kde4 apps that I prefer to their default Gnome counterparts.  Although I use Firefox for most of my web browsing instead of Konqueror, I find Konqueror to be far superior to Thunar as a file manager.

Konqueror has excellent support for profiles, or sessions, and diverse protocols like ftp and sftp.  I use the session capabilities to save the URLs and other details, like window layout.  Then I create menu items that call these sessions so I don’t have to remember the session names.  For Konqueror, you can create your menu items with the ‘command’ or ‘execute’ field set like this: kfmclient openProfile filemanagemt (filemanagement happens to be one of the default profiles, but you can create your own). You’ll find the menu entries to work with profiles in Konqueror under the Settings menu.

Konqueror depends on having the ssh packages installed on your system for Secure File Transfer Protocol. I recommend using SFTP and not just FTP, since you want an encrypted channel to your server. The Kwallet package also comes in handy because it will store your password without you having to re-enter it every time you log into the remote site. If you’re working on a private computer and no one else can login as you, this is fine, but of course it’s not an appropriate solution if others have access to your computer.

The following tips are based on hosting at but it should be fairly easy to adapt them to your own web hosting provider.

To view (and optionally edit) the actual files on your NFS site using Konqueror, the first step is to get the right URL. Login into your NFS account from the web and click the ’sites’ tab, then click the link in the left column under ‘Short Name’. In the box labeled ‘FTP/SFTP/ssh Information’, you’ll find the information you need to access your site in Konqueror. Copy and paste the details next to ‘Username’ and ’ssh Hostname’ into Konqueror’s URL input. Before you hit enter though, separate the two items by ‘@’ and put ’sftp://’ at the front of the address (thats the protocol, instead of the usual http://). Your URL should look something like this:


When you hit ‘Enter’, you’ll be asked for your password, and maybe a dialog will come up asking you if you want to add the ssh information to your local computer, which you do. If you have Kwallet installed, it can save your password.

If you’ve logged in successfully (sometimes I have to reload the page to get the remote files to show) you’ll see your site’s files. Divide the pane in two by using the Ctrl+Shift+L shortcut (or choose ‘Split View’ from the ‘Window’ menu). In the new pane, navigate to your site’s home on your local drive (or create a directory for it under your home directory). Now you can drag and drop between the local and remote versions of your site. If you want to edit a remote file, it’s as easy as right clicking on it and choosing ‘Open With …’. This will download the remote file to a temporary directory, let you edit it, and, upon saving the file in your editor (I use Kate for text files) your file changes will saved to the remote site. This may not be what you want though, so you can edit a file locally and then upload it (so your local version is current with the remote one).

Now that you have the two panes open, with your local files on one side and your remote files on the other, click ‘Configure View Profiles’ in the ‘Setting Menu’. Enter an easy to remember name for your profile in the ‘Profile name’ field, and make sure ‘Save URLs’ is checked. When you hit the ‘Close’ button your profile will be saved, making it easy for you to get back to the exact same place again. You can also use the ‘Bookmarks’ menu to add various URL’s to your bookmarks. One quirk of Konqueror is that the profiles and bookmarks are updated instantly, without your having to press a ‘Save’ button. I find that the ‘Edit Bookmarks’ menu choice is easier to use than just hitting ‘Add Bookmark’ because it’s more flexible. In the ‘Edit Bookmarks’ window it’s easy to change bookmark titles and you can even change the icons shown for each bookmark if you like.

Konqueror beats any other method I’ve seen on Linux for ease of use in managing your remote files. Give it a try!

Backintime, an easy to use backup solution, and a handy post-run Perl script.

Posted December 10th, 2009 in Linux

Backintime is a simple and straightforward program to back up your files.  To start setting it up, add the directories you want to backup:

Backintime include directories tab

This is an example from my Linux machine.  I set the Auto-remove tabs like so:

Backintime auto-remove tab settings

The other tabs are pretty self explanatory.

After you’ve run the program a few times, you can check your backup directory.  Mine is mounted on a separate hard drive called /backup.  When you  navigate to your backup drive, you see the backintime toplevel directory:

Backintime toplevel directory

Changing to the backintime directory, you find your snapshots.  To get to your actual files, though, you have to navigate through your snapshot directory, and then another directory called “backup”:

The snapshots directory

Thats where the following script comes in handy.  It creates symlinks from your most recent snapshot to the toplevel of your backup medium.  After running the script, your top level directory should look something like this:

Top level after running script

Download the well commented Perl script. It tells you what each part of the program is doing. The variable $backupdir is the only thing you should have to change to make it work on your system.


use strict;
use warnings;

my $backupdir='/backup';

my $backintimerootdir = '/backintime';
my $followingpath = '/backup';

my $leadingpath = $backupdir . $backintimerootdir . '/';
my @snapshots;
my $datenum = 0;
my $snapshotdir;
my @linkfromnodes;
my @linktonodes;

opendir ( DIRHANDLE, "$leadingpath" ) or
    die "couldn't open $leadingpath : $!";

chdir $leadingpath or
    die "couldn't change directory to $leadingpath : $!";

while ( defined ( my $dirname = readdir( DIRHANDLE ) ) ){
    next unless ( $dirname =~ /\d{8}-\d{6}$/ ) && ( -d $dirname );

    ( my $currdatenum = $dirname ) =~ s/-//;
    if( $currdatenum > $datenum){
        $datenum = $currdatenum;
        $snapshotdir = $dirname;


my $linkfromdir = "$leadingpath$snapshotdir$followingpath";

opendir ( DIRHANDLE, "$linkfromdir" ) or
    die "couldn't open $linkfromdir : $!";

chdir $linkfromdir or
    die "couldn't change directory to $linkfromdir : $!";    

while ( defined ( my $nodename = readdir( DIRHANDLE ) ) ){
    next if ( $nodename eq '.' ) || ( $nodename eq '..' );
    push( @linkfromnodes,"$linkfromdir\/$nodename" );
    push( @linktonodes, $nodename )

chdir $backupdir or
    die "couldn't change directory to $backupdir : $!";

foreach ( @linkfromnodes ){
    my $currtonode = shift @linktonodes;
    system "rm $currtonode" if -e $currtonode;
    system "ln -s $_ $currtonode";

The user.callback script:

case "$1" in

To use the callback script, place this bash file in your backintime config directory. Name it user.callback and, of course, make it executable.

When backintime finishes a backup run, it calls this file with an argument of “2″ hence the case switch. The other cases are run at different times as backintimes starts, throws an error, etc. Use the command man backintime to get more information, and read their online documentation. A perl script will not run as user.callback (at least for me), it has to be a bash script on this model. The download version of the perl script also has a lot of useful information in it.

The GParted Live CD

Posted December 7th, 2009 in Linux

If you’re planning to install a new Linux distribution, as I did recently with Arch Linux, make sure you visit the GParted site site and download their boot disk. There are other, more inclusive boot disks to try, but this minimal Live CD will boot quickly and offers the basic tools you need to fix your new distribution if anything should go awry. The main functionality revolves around formatting, resizing and moving partitions. But there’s also a disk burning tool, Firefox, and an easy graphical way to mount your hard drive partitions. The most used Linux commandline programs are in easy reach within the console.

Some live CD’s, like Knoppix and Ubuntu, have to be in the drive while running. But the GParted Live CD pops out after booting (it runs from a ramdisk, not the CD), meaning that you can backup to, and restore from, your DVD or CD burner.

When you’re working with a new distro, it’s easy to mess up a configuration file to the point that your machine won’t boot properly. With the GParted Live CD, you can surf the web to find out what went wrong, use the simple graphical mount utility and mount your system’s hard drive, and then edit the offending configuration file. Or you can pop in a backup CD and copy your backup from there to your system’s hard disk.

It’s a free download, and I hightly recommend it.

Kudos to Nearly Free Speech and Arch Linux

Posted December 5th, 2009 in Linux, Service Providers

These are two great organizations.

Nearly Free Speech is a very low cost web hosting company where you pay for only what you use, and I’ve been a happy customer of theirs for years.

Arch Linux is a free, open-source operating system with great online documentation and an active community.  I recently became a convert after being a strong fan of Ubuntu through several version changes.  Arch is based on a rolling release model that doesn’t require you to update everything all at once every few months like Ubuntu.  During my last Ubuntu upgrade, several things went wrong, and there have been similar problems upgrading their sofware in the past.  This time, though, I lost a bunch of data and still could not customize the system to my needs.  There is definately more of a learning curve with Arch, but if you invest the effort you will be well rewarded with a small-footprint and nimble operating system.

I’m a no-frills kind of guy — I find substance and value are more appealing than eye candy and flash.  I have a technical bent and love to dig down to the details, enjoying the learning process that comes from challenging myself.   Arch Linux and Nearly Free Speech probably aren’t for everyone, but if you like to get your geek on I would highly recommend both.