3

I use the UX and Nightly builds of Firefox from FTP as my default browsers, but they don't open external links (just a new blank window).

So for example in a help file that is expected to open with whatever the "default" browser is instead Firefox opens just a blank window instead of the actual page when I click on an external link?

How can I fix this?

I've got a custom desktop file to launch the browser in ~/.local/share/applications, and if it makes a difference I'll post its contents here (let me know in the comments).

Here are the contents of the .desktop file:

[Desktop Entry]
Type=Application
Version=1.0
Hidden=false
Terminal=false
Icon=/usr/share/icons/fs-icons/apps/scalable/firefox-original.png
Name=Firefox Nightly FTP Build
Comment=Firefox Nightly FTP Build
Exec=/home/rolandixor/bin/firefoxui/firefox
Path=/home/rolandixor/bin/firefox
RolandiXor
  • 51,541

1 Answers1

7

The .desktop file is the key here because it not only configures how an application is opened from the Unity launcher (see Unity Launchers And Desktop Files) but also how it is used to open a specific file when called from the file manager, etc.

In order for the latter to work correctly, the .desktop file needs to specify how to pass arguments to the command being called. This is done using field codes in the Exec line which will be substituted with real values when the command is called.

In your case, your original .desktop file did not specify how to tell Firefox which URL to open, so Firefox was called with no arguments and just opened on your default home page.

The field code to insert the URL in the command line is %u so adding this as an argument to the firefox command in the Exec line of the .desktop file solves the problem. For example, the standard firefox.desktop file uses the line:

Exec=firefox %u

For reference, the standard file can be found at /usr/share/applications/firefox.desktop if you have installed from a package; it is generated by firefox.desktop.in as found in the firefox repository on Launchpad.

For further information about Exec field codes in .desktop files, the specification is available on the freedesktop.org website.