Install Firefox Nightly on Ubuntu Linux 18.04

# Create /opt directory
sudo mkdir --mode=755 /opt

# create a directory for firefox
sudo mkdir /opt/firefoxnightly

# Download latest Nightly 64-Bit
wget -O firefoxnightly.tar.bz2 ""

# Extract firefox to the folder we created for it in /opt
tar xjf ~/Downloads/firefoxnightly.tar.bz2 /opt/firefoxnightly

# give rights so that it auto-updates
sudo chown -R $USER:$USER /opt/firefoxnightly

# start Firefox Nightly 
cd /opt/firefoxnightly && ./firefox

1. Download Firefox Nightly

You’ll get a .tar.bz2 file. Mozilla doesn’t provide .deb or .rpm packages since binaries are more universal and work on all distributions.

Extract the file and you’ll get a folder called firefox.

2. Create an /opt directory

/opt is for system-wdie installation of add-on software, while /usr/local is for single user and local installations. Since /opt is optional, Ubuntu doesn’t have one by default. You can create one, no big deal.

sudo mkdir --mode=755 /opt

Whichever directory you want to install in is up to you.

3. Adding the Dock Icon

I was able to start Firefox Nightly but hwne right-clicked the icon, there were no options to add it as a Favorite.

# Create a desktop icon
touch ~/firefoxnightly.desktop

Add the following to the shortcut icon file. See /usr/share/applications/firefox.desktop for inspiration

#!/usr/bin/env xdg-open

[Desktop Entry]
Name=Firefox Nightly
Comment=Take a browse on the wild side
# WARNING: Remember to fix the path in Icon and Exec
Exec=/opt/firefoxnightly/firefox %u

# Actions=Default;Mozilla;ProfileManager;

# [Desktop Action ProfileManager]
# Name=Profile Manager
# Exec=/opt/firefoxnightly/firefox –no-remote –profile-manager

# These actions show when you right-click the icon in the Dock

# Open a New Window
[Desktop Action new-window]
Name=Open a New Window
Exec=/opt/firefoxnightly/firefox -new-window

# Open a New Private Window
[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=/opt/firefoxnightly/firefox -private-window

validate the file, no output means it passed

desktop-file-validate ~/firefoxnightly.desktop 

add the shortcut to Dock

# for current user
desktop-file-install --dir=.local/share/applications firefoxnightly.desktop

# for all users (/usr/share/applications/)
sudo desktop-file-install firefoxnightly.desktop

At this point i can search for Firefox Nightly and see the icon to click. But not seeing the right-click menu options i added.

What i did was search for Firefox Nightly and then dragged the icon to the Dock to add it as Favorite. That added it to the dock as well as gave me the right-click options.