Tuesday, 13 March 2007

Default browser in KDE

I'm an Opera user, so I would like it to be my default web browser. This short note is about setting a default browser in Kubuntu in general. I experienced some problems trying to make it work.
  • Attempt #1
    First I tried recommended method:
    sudo update-alternatives --config x-www-browser
    At first I thought it worked fine, but first use of Thunderbird proved me wrong. This command works mainly for KDE applications, which thunderbird is not (it opens Firefox by default).

  • Attempt #2
    Ok. Let's try to find it somewhere in system settings. I found something like this:
    System Settings > KDE Components > Default Applications > Web Browser
    This must be it! Oh, it's so easy! No, wait a second - it still doesn't work with Thunderbird :\

  • Attempt #3
    Following instructions from 'Opera help' for KDE environment I tried to associate .html and .htm files with Opera:
    In Koqueror menu bar choose:
    Settings > Configure Konqueror > File Associations > text > html
    You can set there the order in which the application for a given type should be chosen.
    Didn't help.

  • Attempt #4 (successful!!!)
    OK, last try. I'm serious - it's now or never! I switched to Gnome for a moment and set the default browser from there:
    System -> Preferences -> Preferred Apllications
    Quick switch back to KDE and...
    Ladies & Gentleman - we have a WINNER! I mean it works ;)

Useful links:
1. This guy had the same problem.
2. I've found solution here.

2 comments:

Anonymous said...

I will not install whole Gnome to choose default browser for Thunderbird. There must be a better (easier) solution. Thanks anyway :)

Anonymous said...

Thank you for this useful listing. Regarding the comment of maniekq: I found out that you can use the following commands to set the default gnome browser (Thunderbird is looking for these values!):

gconftool-2 --set --type=string /desktop/gnome/url-handlers/http/command '/usr/bin/x-www-browser "%s"'

gconftool-2 --set --type=string /desktop/gnome/url-handlers/https/command '/usr/bin/x-www-browser "%s"'

Make sure you run this command as the user you want to change the preferences for. You don't need to install all of gnome to run this - gconftool-2 is sufficient (it was already installed on my Kubuntu 8.10 system).

This approach is similar to attempt #4 as this changes the settings in the gconf storage, too. However, it also enables the use of the x-www-browser command, so you can use attempt #1 to change the settings later on.