Changing Program Defaults in Debian

One of the nice things about the Debian GNU\Linux distribution is that it is highly customisable. As new applications are written and existing applications mature, along with personal preferences changing, I often find myself preferring different applications for specific tasks. This blog lists the main applications that I change, primarily for my own reference so that I can easily remember how to change them again in the future.   :) Maybe it will be useful for others too.

Note that this is primarly Debian specific, but should work on Ubuntu too.

Change Default File Manager

I am a Gnome user and find Nautilus great most of the time, however when I am moving a lot of files around I find the simpler and more light weight PCman File Manager more convenient, especially because it supports tabs. Thus, I set up my Gnome Panel so that my home directory (Places  >  Home) loads PCman, and Computer (Places  >  Computer) loads Nautilus.

Firstly, locate the following file:

/usr/share/applications/nautilus.desktop

Note: A lot of blogs also mention changing nautilus-computer.desktop and nautilus-home.desktop, although I do not do this as explained in the summary above.

Locate the line beginning with “Exec” and change it as follows:

Exec=pcmanfm

Now, its done!

Changing Gnome to use OpenBox instead of Metacity

I much prefer OpenBox to Metacity, its lean, fast, written in C/C++ (which I am learning) and provides excellent key binding support. In addition, with Gnome also installed, one has many different options:

  • Run Gnome normally
  • Run only OpenBox
  • Run Gnome with Open Box
  • Run OpenBox, and only load the Gnome panel (gnome-panel) – which seems very similar to the one above!

Fortunately, in Debian Etch and above, installing OpenBox updates gdm to include a Gnome with OpenBox option, so the installation and change is quite straight forward:

# aptitude install openbox openbox-themes obconf obmenu

If you also want a panel, perhaps give pyPanel ago.

Use Sun Java as default

# aptitude  install sun-java6-jdk sun-java6-jre sun-java6-plugin

Now, set it as the default:

# update-java-alternatives -s java-6-sun

Change the default web browser

I tend to prefer firefox to Epiphany, only because the Epilicious application stopped working on my system a little while ago and I havent managed to figure out how to fix it yet. I use Delicious for bookmark storage.

# update-alternatives --config x-www-browser

Now, select desired default.

If you use Thunderbird (Icedove on Debian), you may also want to set the default browser for it. To do so, add the following lines to your user.js file, which on Debian is located in ~/.mozilla-thunderbird/<profile name>/

Now create, or add if it is already there, the user.js file:

user_pref("network.protocol-handler.app.http", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.https", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.ftp", "/usr/bin/firefox");

NOTE: There is a symlink to iceweasel, so using firefox on Debian also works. You can also specify opera, or any other browser you would prefer.

Restart Thunderbird and your new preferred browser should be working.

Set Default Image / Media Viewer

There are many options when it comes to image viewers. Thankfully, its pretty easy to make your favourite the default. This assumes you are using a recent version of the Gnome desktop environment:

  1. Right click on a file of the type that you wish to change the default application for
  2. Select Properties
  3. Change the application in the “Open With” drop down menu
  4.  After you log out, this setting will be saved and preserved for all future sessions.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.