jump to navigation

Change Firefox’s Default Search Method June 5, 2006

Posted by Carthik in guides, ubuntu.

Firefox has this neat feature that when you type in some words in the address bar (where you normally enter urls), it takes you to the first result for a Google search for those words. In other words, typing in your address bar is like typing the words at google.com and then clicking the “I’m Feeling Lucky” button.

Only, for a long time, I have been irritated by this, and wished I would just be taken to the google search results page for the words I typed in. For this, by default, you have to prepend your words with “google”. So if you type in “google american express”, then you are taken to the page with the search results for “american express”. I wanted NOT to have to type in the “google” and still be taken to the search results page.

So as I am known to, I went searching for a solution at 2 in the night 🙂

The results are surprising! Not only can I do that, I can do one better. Google introduced something called “Browse by name“, which, as the page I linked-to explains, takes you to the “obvious result” if there is one, or just gives you a search results page if google’s not too sure if there is only one result that best fits the words you typed in. For example, typing “MIT” sure takes you the MIT homepage, but typing something like “cheap computer” takes you to the search results page. Now, how do we change the way firefox’s address bar behaves?

In comes Jesse, back in 2004, with the right solution. Type in “about:config” in the address bar of firefox, then type in “keyword.url” to search for that configuration key. If you want the neato “browse by name” search in firefox, as opposed to the default “I’m feeling lucky” search, just modify that preference, by pasting in:

Then save that by pressing “Ok”. Now you’re free to use the improved address bar. Go nuts, since now you can search by entering the search terms in the address bar and pressing enter. You will never need to visit http://www.google.com again!

Enable Spam Filtering in Evolution March 25, 2006

Posted by Carthik in applications, guides, ubuntu.

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!

Disable Synaptics Touchpad March 24, 2006

Posted by Carthik in guides, ubuntu.

Update: To learn how to disable the touchpad temporarily when you are typing, read this other recent article.
I needed a quick way to disable and enable my synaptics touchpad at will, and I found one.

Make sure that in you /etc/X11/xorg.conf file, you have:

Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        Driver          "synaptics"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"
        Option          "HorizScrollDelta"      "0"
        Option          "SHMConfig"             "on"

Notice the Option “SHMConfig” “on” line — that is the one that you really need to have in there. This allows you to change some configuration parameters for the synaptics touchpad without restarting Xorg (Xserver).

Now that is taken care of.

All you have to do to disable your synaptics touchpad is to execute the command:
$synclient TouchpadOff=1

and to turn it back on, you can execute the command
$synclient TouchpadOff=0

TIP: To make it even easier to turn the touchpad on and off, you can set a keyboard shortcut and bind the shortcuts to the command to turn it on, and off, and use the keyboard shortcuts.

Add a Grub Splash Image March 21, 2006

Posted by Carthik in guides, ubuntu.

The grub slection menu in Ubuntu does not have a splash image in the background. To add your own, install the package “grub-splashimages” by doing a sudo apt-get install grub-splashimages. This will put the splash images in /boot/grub/splashimages.

A screenshot of all the splash images is given below to make selecting one easier:

Splash images

Now that you have the images, and have chosen one, make a link to the one you like:
$cd /boot/grub
$sudo ln -s splashimages/debsplash.xpm.gz splash.xpm.gz
$sudo update-grub

What we just did was to link /grub/boot/splash.xpm.gz to the debsplash.xpm.gz splash image, and then updated the grub menu.

You know what’s really wierd? One of the splash images has a Gentoo logo in the bottom right corner!!! Also, one splashimage seems broken, the one called fiesta.xpm.gz


Disable Shutdown For Normal Users March 20, 2006

Posted by Carthik in administration, guides, ubuntu.

Sometimes, when you have one computer shared among multiple users, and you don’t want normal users (users who are not admins), that is, anyone who is not you 😉 to be able to shutdown the computer, then you can follow the following steps. Some of this is from the useful fedora mailing list email, and some from the ubuntu-users mailing list (thanks to Olafur Arason). I tried the instructions below on my computer, and this should work for you.

Again, this will allow only admin users with sudo privileges to shutdown the computer, for other “normal” users, the logout menu will allow them to do only that, log out!

Open /etc/X11/gdm/gdm.conf in a text editor and find the [greeter] section. Make sure that there is a line which says SystemMenu = false. This line will ensure that the gdm login screen will not have the option for shutting down the system etc.

Step 2:
If you have a laptop, or an acpi system on your computer, then go to /etc/acpi and disable the power button, so that, when someone presses the power button, the system does not shutdown. You can disable this easily by doing chmod 000 /etc/acpi/powerbtn.sh

Step 3:
Now edit /etc/inittab

and find the lines that say:

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

And change it to read:

ca::ctrlaltdel:/bin/echo "ctrl-alt-delete has been disabled"

This will effectively prevent users from changing to a console screen and using ctrl+alt+delete to shutdown the system.

Step 4:
Execute the following commands:
sudo chgrp admin /sbin/halt /sbin/shutdown
sudo chmod 550 /sbin/halt /sbin/shutdown

Step 5:
Use the Configuration Editor (Applications -> System Tools -> Configuration Editor) to edit the preference apps->gnome-session->options->logout_option to “logout” instead of “shutdown”.

That’s it! Now only you, or another superuser (Admin) can shutdown the system, using the command:
$sudo shutdown -t3 -r now

Editing FAT32 Partition Labels using mtools March 1, 2006

Posted by Carthik in administration, applications, guides, ubuntu.

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:
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

Persistent Settings and Files with LiveCDs February 14, 2006

Posted by Carthik in guides, ubuntu.

I have a copy of the Ubuntu Live CD in my backpack for emergency use when I am forced to use a non-Ubuntu computer. Not that I can’t use Windows in such a situation, but there are times when I have to use Ubuntu for work-related reasons. In these situations, what sucks really bad is that everytime I boot up with my LiveCD, I start from scratch, and without my documents. Well, I just found the fix for it.

The Live CD Persistence wiki page describes how to use a USB drive to enable persistence when using a LiveCD.

The wiki in general is a gold mine – you only have to know where to look. Most of the “gold” I have found in the wiki is buried deep, and I am led to it by links I find in emails, and other webpages. Search engines don’t seem to like the wiki too much, and I suspect it is the “https” and the lack of a good, widly-recognized certificate that is to blame.

Check if the PCI devices in the Computer you may buy will work with Ubuntu/Debian February 12, 2006

Posted by Carthik in guides, ubuntu.

Larz Wirzenius shares a link to the Debian Gnu/Linux Device Driver Check page. You can paste the output of $lspci -n at that page and get an overview of the hardware you have installed on your PCI bus, and whether there are drivers in the Debian world to support the hardware.

You can use this to determine if you can or should buy that new laptop or desktop. All you will need is to boot a Knoppix live cd, and visit the website, and the paste the output of lspci -n!!

Also a very useful way to find out what network/video/audio card you have. In the beginning, I used to struggle whenever someone at a forum, or an IRC chat room asked me precisely what *Card I had. I used to be embarassed to ask folks how I could find what network/video card I had, and eventually some kind soul would tell me the command to enter, and the details to note down! Not any more – this should help newbies and experienced people alike. (Geez, don’t I sound like a n00b? I am proud to say that I am!)

I should think something like this should be easy enough to do given the data in the Ubuntu Device Database.

Ubuntu Audio Studio February 3, 2006

Posted by Carthik in guides, ubuntu.

If you are a musician of the computer-savvy variety and want to use Ubuntu to trick out your computer as a music studio, look to Ubuntu Studio. This unofficial wiki has loads of tips on how to decrease the latency of the kernel and build the perfect Ubuntu-based sound editing setup.

This is truly a good effort. It is group effort like these that make or break the reputation of a distribution in a field. Looks really promising. I wish I was a musician, so I could use the resource, but if you are then cheers to you!

Defining Keyboard Shortcuts for Commands January 30, 2006

Posted by Carthik in administration, guides, snippets, ubuntu.

One of the insanely difficult things to do in Gnome/Ubuntu is to map a custom keyboard shortcut to launch an application. Someone out there knows why one has to muck about in the gconf-editor to do this!!! Usability experts, listen up and fix this! While you are at it, please make it easier to change the default application used to open different filetypes.

But I rant, needlessly 🙂

Faced with the difficult problem of creating a keyboard shortcut to have +E to open up Nautilus, I found this very useful guide to adding keyboard shortcuts for commands in Gnome.