Score:0

How to set a file as a web browser?

fj flag

I have downloaded Firefox Aurora (nightly) from the official website, and use tried to set it as the default browser, but when go to Default Applications, it does not show it as an option for a web browser.

[Desktop Entry]
Encoding=UTF-8
Version=109.0beta
Type=Application
Name=Firefox Aurora
GenericName=Web Browser
Icon=/opt/Firefox-Nightly/unnamed.png
Path=/opt/Firefox-Nightly
Exec=/opt/Firefox-Nightly/firefox
StartupNotify=false
StartupWMClass="Navigator", "firefox-aurora"
OnlyShowIn=Unity;GNOME
Categories=GNOME;GTK;WebBrowser;
X-UnityGenerated=true
Arjun K Shibu avatar
jp flag
Can you please provide more information regarding the OS and your system specification?
pl flag
Was Aurora installed by just unpacking a tarball or was it installed as a deb? If the former, you probably don't have a .desktop file in `/usr/share/applications` or `~/.local/share/applications`. So GNOME wouldn't be aware the browser is "installed" as such, because it isn't.
Arjun Singh Kwatra avatar
fj flag
@popey I do have a desktop file, and I am able to add it to the applications list and open it as i would open a regular application, I just can't set it as default
karel avatar
sa flag
Does this answer your question? [How do I install a .tar.gz (or .tar.bz2) file?](https://askubuntu.com/questions/25961/how-do-i-install-a-tar-gz-or-tar-bz2-file)
Arjun Singh Kwatra avatar
fj flag
No, it does not. I need to set my browser as default, but the control center does not recognize the application as a web browser
Score:0
jp flag

First of all to install the Firefox Aurora(nightly) you can download the .tar.bz2 file from https://www.mozilla.org/en-US/firefox/channel/desktop/

-> Open terminal and navigate to the folder where you downloaded the file.

-> Now run the command tar xjf firefox-112.0a1.en-US.linux-x86_64.tar.bz2 to extract the files. (the version provided is the one which is currently available in the website)

-> Move the extracted folder(firefox) to /opt using

sudo mv firefox /opt/

-> Create a symbolic link using

sudo ln -s /opt/firefox/firefox /usr/local/bin/firefox

This should solve the problem of Firefox not showing up on default applications.

If that doesn't solve the problem or your installation is different you can try creating a .desktop file for Firefox Aurora(nightly).

Open a new text file and add the following lines

    [Desktop Entry]
    Name=Firefox Aurora
    Comment=Web Browser
    GenericName=Web Browser
    X-GNOME-FullName=Firefox Aurora Web Browser
    Exec=/path/to/firefox/firefox %u
    Terminal=false
    X-MultipleArgs=false
    Type=Application
    Icon=/path/to/firefox/browser/chrome/icons/default/default128.png
    Categories=Network;WebBrowser;
    MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
    StartupNotify=true
    Actions=NewWindow;NewPrivateWindow;

    [Desktop Action NewWindow]
    Name=Open a New Window
    Exec=firefox -new-window

    [Desktop Action NewPrivateWindow]
    Name=Open a New Private Window
    Exec=firefox -private-window

Save it as firefoxaurora.desktop.

Run chmod +x firefoxaurora.desktop in terminal from where the .desktop file is present to make it executable.

Now run sudo desktop-file-install firefoxaurora.desktop

Again that should fix the issue. Hope it helps!

Arjun Singh Kwatra avatar
fj flag
I got an error warning: value "Web Browser" for key "Comment" in group "Desktop Entry" looks the same as that of key "GenericName". I changed the text in Comment to something else, and that seems to have worked, and it is appearing in my default application menu
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.