Install Picasa on Ubuntu May 26, 2006
Posted by Carthik in applications, ubuntu.41 comments
Google’s famed Picasa photo management app is now available for Linux!. In perhaps what is a sign of the growing stature of Ubuntu in the Linux world, there is a .deb file available for download, made for Ubuntu (or so the page says).
To install Picasa, download the .deb file, and install it by running the following command from the directory that the .deb file is in:
$sudo dpkg -i picasa_2.2.2820-5_i386.deb
(Please check if the version number in the above is correct – it should be the same as the name of the .deb you downloaded)
I usually avoid using non-open source software on my Ubuntu machines, but I’ve decided to give Picasa a try. If it is noteworthy, I will write more about it. At least one ubuntu-using friend of mine should be very happy when he gets to know about this when he wakes up tomorrow
Minimize Any Application to the System Tray May 24, 2006
Posted by Carthik in applications, ubuntu.26 comments
The other day I wanted to minimize the gnome-terminal to the system tray. Why? Because I thought I should be able to, if I wanted to.
Some apps, such as gaim, the instant messenger already support minimizing to the system tray. So if you click the close button in gaim when you are logged in, the app disappears from the list of windows, and an icon appears in the system tray, which you can then click to bring the main window back to life.
Turns out, with AllTray, you can minimize any app to the system tray. To install, you can use this repository that is linked-to from the alltray homepage. This is probably one of the few cases when the software I wanted wasn’t already in the Ubuntu reporsitories.

The above screenshot from the AllTray website shows it working in GNOME. Don’t you love it?
Listen To and Record Internet Music Radio Stations April 5, 2006
Posted by Carthik in applications, ubuntu.26 comments
I feel like a kid in a candy shop. I installed streamtuner today. Streamtuner makes thousands (no exaggeration) of internet music stations available to you. This includes all shoutcast and live365 stations. You also need to have xmms or beep-media-player or somesuch player that can play playlists.
So:
$sudo apt-get install streamtuner xmms
and you are set!
Now you can search or browse through the thousands of streams and pick the one you want to hear.
Enable Spam Filtering in Evolution March 25, 2006
Posted by Carthik in applications, guides, ubuntu.4 comments
I breathed a huge sigh of relief once I had read, understood and used the instructions to enable spam filtering using bogofilter and/or spamassassin (Which are very popular spam filters) in Evolution in this howto at the forums….
The forums are chock-full of useful howtos, spend a few moments browsing through the forum howtos to discover stuff not covered in this blog!
Editing FAT32 Partition Labels using mtools March 1, 2006
Posted by Carthik in administration, applications, guides, ubuntu.46 comments
I wanted to rename the fat32 partitions that get automounted when they are plugged in to the USB drive. Two were exactly similar external hard disk drives, and one was an iPod. The exactly similar hard disk drives (one each at home and work) were both getting mounted at /media/sda1 or sda2 etc, and it was impossible to distinguish one from the other easily. Also, I found that it wasn’t that easy to edit the partition labels for FAT32 partitions. So I thought I would summarize how I named my fat32 partitions to have consistent names. This has the benefit that when these drives are automounted, they will be at the location /media/partition-label, where partition-label is the label that you give the partition.
Step by step instructions to re-label FAT partitions follow:
1) Install mtools:
$sudo apt-get install mtools
2) After the usb drive is automounted after plugging in, find out the device descriptor using:
$mount
and Note down where it says “sda1″ or similar
3) copy the mtools.conf to ~/.mtoolsrc
$cp /etc/mtools.conf ~/.mtoolsrc
4) Edit ~/.mtoolsrc to add one line at the very end:
drive i: file="/dev/sda2"
–you may have to change sda2 to something else depending on what you got in step 2 above.
5) Change to the “drive” i:
$mcd i:
6) Check what the label for the drive is currently:
$sudo mlabel -s i:
7) Change the label to something pretty:
$sudo mlabel i:my-ipod
8) Check if the label has changed:
$sudo mlabel -s i:
I got the following output –
Volume label is MY-IPOD
You’re all set!! The next time that partition gets automounted, it will be at /media/MY-IPOD
Galternatives – GUI for Alternatives Configuration February 12, 2006
Posted by Carthik in applications, Readers' Tips, ubuntu.11 comments

Galternatives is a tool to enable users to use the GUI to update the /etc/alternatives files, which decide the default commands/apps for various tasks. John Pywtorak sent in this tip via email (thanks John).
The /etc/alternatives defines default applications for the traditional Unix/Linux system – such as, the default application to handle irc, to browse the web etc.
You can install galternatives using:
$sudo apt-get install galternatives
After it is installed, you can run it using:
$gksudo galternatives
The next screenshot shows you me updating the x-www-browser to Epiphany (did I tell you it is “simply” wonderful?).

Use an Encrypted USB drive/partition January 24, 2006
Posted by Carthik in applications, snippets, ubuntu.20 comments
Martin Pitt, an Ubuntu developer, had written up a little note on how to use encrypted partitions with Ubuntu. I reproduce it below with minimal edits:
To create an encrypted partition on a removable device (like an USB stick), do the following:
* Install the package ‘cryptsetup’.
* If you do not want to encrypt the whole stick, repartition the stick with “sudo cfdisk /dev/sda” (or whichever device). E. g. my personal USB stick has a big unencrypted partition for data exchange and a very small (5 MB) encrypted partition for storing my GPG and SSH keys.
* Create an encrypted partition on the target partition:
sudo luksformat /dev/sda1
(or sda2 if you want to format the second partition, and so on).
This will ask you for a passphrase. The default file system is “vfat”, but you can specify a different one with the “-t” option (see manual page).
After this procedure, remove the stick and plug it in again. This should trigger a dialog which asks you for the passphrase and mounts the encrypted partition (along with any unencrypted one, of course).
Just a little warning at the end: Please be aware that if you lose the passphrase, there is *NO WAY* to restore your data!
Rescue Data from Failing Partition January 21, 2006
Posted by Carthik in administration, applications, commands, guides, ubuntu.17 comments
If you have a hard disk drive, or a drive partition that is failing, or if you want to copy data from one partition to another (don’t we all, at some time or the other?), then ddrescue comes to the rescue!
In case parts of the partition you are trying to rescue data from are corrupt, then ddrescue (unlike dd) skips over it and gets out all the data that is uncorrupted!
Install ddrescue using
$sudo apt-get install ddrescue
Make sure you have a partition with more disk space that the entire partition you are trying to retrieve data from. Yes, that includes occupied AND free space on the partition you are trying to retrieve data from.
Rescue data using:
$dd_rescue /dev/hda1 /some/dir/drive-backup.img
Where you might have to replace /dev/hda1 with the partition you are trying to rescue data from, and /some/dir/ should have more free space than the entire /dev/hda1 partition.
This creates a drive image. You can mount it as a loop device. Do the following to do just that:
sudo touch /dev/loop1
sudo losetup /dev/loop1 /some/dir/drive-backup.img
–If you get an ioctl error, run “$sudo modprobe loop”, and run the prior command again
sudo mount -t ext3 /dev/loop1 /media/drive-backup
(replace ext3 with the filesystem type of your old partition)
Now you can browse /dev/loop1 and copy out all your data. If you use an external USB drive to backup the image to, you can take the image with you
Thanks are due to Dan Martin who posted this at the ubuntu-users mailing list a few weeks ago.
Network Manager – Effortlessly switch networks December 14, 2005
Posted by Carthik in applications, ubuntu.24 comments
When I started using Ubuntu about a year ago, my biggest complaint was that I wasn’t able to change the networks, or choose between various wired/wireless networks effortlessly and efficiently. Various alternatives were explored, until I found Network Manager. There are plans to include a modified version of the network manager in the next release of Ubuntu, but until then, you can make use of it to make daily life simpler.
So what does Network Manager do?
Simply put, it manages your network interfaces for you. If you are plugged a Ethernet cable into your computer, it activates the LAN connection. When you unplug the cable, it looks for a wireless network and joins it. It also keep track of the wireless passwords so you don’t have to enter them time and again. In their own words,
A laptop user should never need to use the command line or configuration files to manage their network; it should “Just Work” as automatically as possible and intrude as little as possible into the user’s workflow. NetworkManager attempts to make networking invisible. When moving into areas you’ve been before, NetworkManager automatically connects to the last network the user chose to connect to. Likewise, when back at the desk, NetworkManager will switch to the faster, more reliable wired network connection.
The applet sits in your panel, and clicking on it will allow you to choose from the various options, prompting you for a password if the network requires it. The following screenshot should explain it better:

You can install Network Manager following the instructions at the wiki. I personally find that I have to use the $nm-applet --sm-disable instruction to start nm-applet.
You may face problems if you run a local DNS server on your network. If this is the case, then the .deb package for network manager without the BIND9 requirement should come in handy.
Happy browsing!
Setting up a physical security camera December 13, 2005
Posted by Carthik in applications, guides, ubuntu.15 comments
I found a write up at aelf.co.uk regarding how the author chains together a few useful applications to use a Logitech webcam to physically monitor a room. In case of a break-in or unusual activity, he has it set up to upload webcam images to an ftp server, and has tips about how to create a short video using the cam shots. Amazing!
The principle is simple – a webcam connected to the machine is monitored by a piece of software. If activity is detected in the picture, a video (or set of photos) is recorded and uploaded to an external server. The idea being if there is ever a break in, I will be alerted immediately and hopefully have photgraphic evidence to show the police.
I managed to get all this working, and added a couple of other little useful features. This post is pretty much a guide for me later if I need to recreate it.
From Adding home security features to my Ubuntu machine. Perhaps there will come a day when I find the motivation to set something similar up in my own room. Till then, this will serve as a bookmark for other users who want to do the same.






