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.

When Firefox is set as my default browser, any links cliked in another application open a new blank Firefox window, not a new tab or a new window with the page I want.

Is that a problem with the configuration of firefox, of "Preferred Applications" or what else?

The firefox executable script works fine, because doing firefox http://example.com in a console window does the correct thing. Is there a way I can edit the "preferred applications" manually?

share|improve this question
    
Which version of Ubuntu are you running? Do you have more than one version of Firefox installed? –  wojox May 7 '11 at 16:06
    
That may be because firefox needs some special commandline argument to open link in new window. Try entering firefox --help in console to see. –  Barafu Albino May 7 '11 at 16:29
    
I'm running 11.04, but the problem could have been there before. I wanted to switch from chrome to firefox when version 4 came out. Gave up because of this issue. Only firefox 4 installed –  jfoucher May 7 '11 at 19:32
    
@barafu man firefox tells me firefox [OPTIONS] [url] but firefox --help gives the following error: /usr/lib/firefox-4.0.1/firefox-bin: error while loading shared libraries: libxul.so: cannot open shared object file: No such file or directory –  jfoucher May 7 '11 at 19:36
    
@jfoucher: I get that error as well, to make that error dissappear, add the library path: LD_LIBRARY_PATH=/usr/lib/firefox-4.0.1 firefox --help. What application are you experiencing issues with? –  Lekensteyn May 7 '11 at 20:03
show 3 more comments

3 Answers

You were not really helpful with "any application", but I've tried to find an application in which I could open an URL. I've tested the "Get Help Online..." option from the Help menu, which confirmed that URLs are opened in new windows.

Using my imagination, I watched new commands coming by executing:

while : ;do ps x -o ags | head -6 | tail -3; sleep .5;echo '___'; done

After executing this, I quickly pressed the previously mentioned "Get Help Online..." menu option. As the command appears, I escape from the command by pressing Ctrl + C (interrupt). The command is a python call. The relevant file for opening the URL is:

/usr/share/launchpad-integration/launchpadintegration/urls.py

By analyzing that file, I conclude that a new Firefox window is forced if the application to be run is firefox %s (determined by gconftool-2). To change this behavior, set the key /desktop/gnome/url-handlers/http/command to firefox %u.

To do so, open a terminal and execute:

gconftool-2 --set /desktop/gnome/url-handlers/http/command --type string 'firefox %u'

For a GUI way, see How do I use the gconf editor?

share|improve this answer
    
thanks for all your help. When I say any application, that's because I haven't found an application in which links clicked open properly in firefox. I tried Hotot, Gwibber, ubuntu one, empathy, skype, and others. You solution sounded good but did not solve the problem unfortunately. I think my problem is the same as this question askubuntu.com/q/24051/38 only reversed... –  jfoucher May 7 '11 at 21:49
    
This one is also quite similar: askubuntu.com/q/18418/38 I tried all the steps listed without any success –  jfoucher May 7 '11 at 21:50
add comment

I have FF 6.0 and have Ubuntu 11.04. I go to FF > Edit> Preferences > Tab (which is a tab in this window) and you have a bunch of choices as to how your tabs should react.

share|improve this answer
add comment

I have found an answer.

xdg-settings get default-web-browser

firefox-mozilla-build.desktop

and then find where it is:

locate firefox-mozilla-build.desktop

/home/user/.local/share/applications/firefox-mozilla-build.desktop

open it:

vi /home/user/.local/share/applications/firefox-mozilla-build.desktop

and then change this term:

[Desktop Entry]
Categories=Network;WebBrowser;
Comment=Web Browser
Encoding=UTF-8
Exec=firefox

to

[Desktop Entry]
Categories=Network;WebBrowser;
Comment=Web Browser
Encoding=UTF-8
Exec=firefox %u

also firefox to firefox %u.

I hope this works.

share|improve this answer
add comment

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.