Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Somehow gnome-open and xdg-open are now hopelessly broken. Setting my default browser in System -> Preferences -> Preferred Applications changes nothing. When I click on any link that points to a webpage, it opens a New Tab Page in Chromium (Or my Home page if I set one). Is there any way to fix this?

share|improve this question
    
Are you saying you are always clicking on something to open, and never running gnome-open or xdg-open directly? Where are you clicking on a link, from a running browser? And what browser are you desiring or expecting links to be opened with? –  belacq Jan 31 '11 at 2:55
    
This thing was helpful for me: askubuntu.com/a/220076/94263 –  mackuz Nov 21 '12 at 8:21

1 Answer 1

There are several ways to control what browser will open links, and a given application can also choose to prefer a different method, apart from the usual conventions.

If you are clicking on an html file from the desktop or from within Nautilus, you can control how the browser will open it by right-clicking on the HTML document and choosing properties.

file properties

From the command line, try sudo update-alternatives --config x-www-browser . This uses Debian's alternatives system. It will present you with a list of reasonable options from which you can choose to select.

To see what is available to the alternatives system, you will use the --list argument on the target component. For example:

% update-alternatives --list x-www-browser
    /usr/bin/chromium-browser
    /usr/bin/epiphany-browser
    /usr/bin/firefox
    /usr/bin/firefox-4.0
    /usr/bin/google-chrome
    /usr/bin/midori

This can be different from the Gnome 'Preferred Applications' setting. Another potential source of conflict exists if you have the BROWSER environment variable set. You can see if you have anything defined for it by typing env | grep BROWSER .

It appears that xdg-open and gnome-open don't follow the settings in the alternatives list. sensible-browser (which can be also launched via the command-line or from a script) does, but xdg-open and gnome-open should already be looking at the choice you made in 'Preferred Application.' (This should be the same GUI you get when running gnome-default-applications-properties.)

share|improve this answer
    
Oh, thanks but I ended up reinstalling Ubuntu. –  Jarrod Davis Feb 3 '11 at 1:20
1  
thanks jgbelacqua. your post makes everything clear about the predefined applications in debian/ubuntu systems. –  gourgi Feb 20 '11 at 11:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.