Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I automate installation of add-ons in an FF48?

  • 3 iimpendulo
  • 1 inayo le ngxaki
  • 1 view
  • Impendulo yokugqibela ngu John99

more options

I have an install/reinstall script for FF48 on Ubuntu Linux, and I want to be able to automatically install some add-ons. I use the Firebug, FirePHP, and Developer Toolbar extensions. I have all the xpi files downloaded, but how do I automate the installation of them?

I downloaded the XPI files, and intend to keep them in the same directory as the installer script:

#firebug
https://addons.mozilla.org/firefox/downloads/latest/firebug/addon-1843-latest.xpi?src=ss
#firephp
https://addons.mozilla.org/firefox/downloads/latest/firephp/addon-6149-latest.xpi?src=ss
#dev toolbar
https://addons.mozilla.org/firefox/downloads/latest/web-developer/addon-60-latest.xpi?src=ss

Here is the script, if it matters:

#!/bin/bash

FFDIR=$HOME/Firefox
FF48="https://ftp.mozilla.org/pub/firefox/releases/48.0/linux-x86_64/en-US/firefox-48.0.tar.bz2"
FFPROFILE=$HOME/.mozilla/firefox/firefox48
LAUNCHER=$HOME/.local/share/applications/ff48.desktop

# Make sure Firefox directory in home directory
if [ ! -d $FFDIR ];
then
	mkdir $FFDIR
fi

cd $FFDIR

# Remove the old Firefox directory if it exists
if [ -d $FFDIR/Firefox-48.0 ];
then
	rm -rf $FFDIR/Firefox-48.0
fi

# If Firefox 48 archive doesn't exist, get it from Mozilla
if [ ! -f $FFDIR/firefox-48.0.tar.bz2 ];
then
	wget $FF48 -O firefox-48.0.tar.bz2
fi

# Extract Firefox 48 from the tar.bz2 file if it exists
if [ -f $FFDIR/firefox-48.0.tar.bz2 ];
then
	tar -xjf $FFDIR/firefox-48.0.tar.bz2

	# Rename the extracted firefox directory to Firefox-48.0 if it exists
	if [ -d $FFDIR/firefox ];
	then
		mv $FFDIR/firefox $HOME/Firefox/Firefox-48.0

		# Remove the old profile directory for Firefox 48
		if [ -d $FFPROFILE ];
		then
			rm -rf $FFPROFILE
		fi

		# Create the profile to be used
		firefox -CreateProfile "firefox48 $FFPROFILE"

		# Make sure the launcher exists
		touch $LAUNCHER

		# Rebuild the launcher
		printf "[Desktop Entry]\n" > $LAUNCHER
		printf "Version=1.0\n" >> $LAUNCHER
		printf "Type=Application\n" >> $LAUNCHER
		printf "Terminal=false\n" >> $LAUNCHER
		printf "Name=Firefox48\n" >> $LAUNCHER
		printf "Comment=Run firefox 48.0\n" >> $LAUNCHER
		printf "Exec=$FFDIR/Firefox-48.0/firefox -no-remote -P firefox48\n" >> $LAUNCHER
		printf "Icon=/usr/share/icons/HighContrast/48x48/apps/firefox.png\n" >> $LAUNCHER
		printf "Categories=Utility;\n" >> $LAUNCHER

		# Finished
		$FFDIR/Firefox-48.0/firefox -no-remote -P firefox48
	else
		printf "Extracted archive directory did not exist\n"
	fi
else
	printf "Archive did not exist\n"
fi
I have an install/reinstall script for FF48 on Ubuntu Linux, and I want to be able to automatically install some add-ons. I use the Firebug, FirePHP, and Developer Toolbar extensions. I have all the xpi files downloaded, but how do I automate the installation of them? I downloaded the XPI files, and intend to keep them in the same directory as the installer script: <pre>#firebug https://addons.mozilla.org/firefox/downloads/latest/firebug/addon-1843-latest.xpi?src=ss #firephp https://addons.mozilla.org/firefox/downloads/latest/firephp/addon-6149-latest.xpi?src=ss #dev toolbar https://addons.mozilla.org/firefox/downloads/latest/web-developer/addon-60-latest.xpi?src=ss</pre> Here is the script, if it matters: <pre><nowiki> #!/bin/bash FFDIR=$HOME/Firefox FF48="https://ftp.mozilla.org/pub/firefox/releases/48.0/linux-x86_64/en-US/firefox-48.0.tar.bz2" FFPROFILE=$HOME/.mozilla/firefox/firefox48 LAUNCHER=$HOME/.local/share/applications/ff48.desktop # Make sure Firefox directory in home directory if [ ! -d $FFDIR ]; then mkdir $FFDIR fi cd $FFDIR # Remove the old Firefox directory if it exists if [ -d $FFDIR/Firefox-48.0 ]; then rm -rf $FFDIR/Firefox-48.0 fi # If Firefox 48 archive doesn't exist, get it from Mozilla if [ ! -f $FFDIR/firefox-48.0.tar.bz2 ]; then wget $FF48 -O firefox-48.0.tar.bz2 fi # Extract Firefox 48 from the tar.bz2 file if it exists if [ -f $FFDIR/firefox-48.0.tar.bz2 ]; then tar -xjf $FFDIR/firefox-48.0.tar.bz2 # Rename the extracted firefox directory to Firefox-48.0 if it exists if [ -d $FFDIR/firefox ]; then mv $FFDIR/firefox $HOME/Firefox/Firefox-48.0 # Remove the old profile directory for Firefox 48 if [ -d $FFPROFILE ]; then rm -rf $FFPROFILE fi # Create the profile to be used firefox -CreateProfile "firefox48 $FFPROFILE" # Make sure the launcher exists touch $LAUNCHER # Rebuild the launcher printf "[Desktop Entry]\n" > $LAUNCHER printf "Version=1.0\n" >> $LAUNCHER printf "Type=Application\n" >> $LAUNCHER printf "Terminal=false\n" >> $LAUNCHER printf "Name=Firefox48\n" >> $LAUNCHER printf "Comment=Run firefox 48.0\n" >> $LAUNCHER printf "Exec=$FFDIR/Firefox-48.0/firefox -no-remote -P firefox48\n" >> $LAUNCHER printf "Icon=/usr/share/icons/HighContrast/48x48/apps/firefox.png\n" >> $LAUNCHER printf "Categories=Utility;\n" >> $LAUNCHER # Finished $FFDIR/Firefox-48.0/firefox -no-remote -P firefox48 else printf "Extracted archive directory did not exist\n" fi else printf "Archive did not exist\n" fi</nowiki></pre>

Ilungisiwe ngu cor-el

All Replies (3)

more options

The first thing to consider is that you should be using fully updated Release of Firefox or possibly a esr edition used by your Linux distro . If you are not doing so then you are not using a supported version of Firefox and will not normally get support on this forum .

Some of us do run legacy versions of Firefox - I know last year I could boot Windows 3 ! and an early Firefox . I am sure I colud find and boot Fx48 on Ubuntu but why would I wish to do that. More to the point why do you do that ?

Why not use an up to date OS with its's current  Fx.

Lets remember most Linux including Ubuntu software is free; as in free beer; you do not have to pay anything for it.

more options

John99 said

The first thing to consider is that you should be using fully updated Release of Firefox or possibly a esr edition used by your Linux distro . If you are not doing so then you are not using a supported version of Firefox and will not normally get support on this forum . Some of us do run legacy versions of Firefox - I know last year I could boot Windows 3 ! and an early Firefox . I am sure I colud find and boot Fx48 on Ubuntu but why would I wish to do that. More to the point why do you do that ? Why not use an up to date OS with its's current Fx. Lets remember most Linux including Ubuntu software is free; as in free beer; you do not have to pay anything for it.

I'm running more than one version of FF. I do run the current version through Ubuntu package management, but I need the older version because the FirePHP plugin is far superior to the console logging that current FF provides.

What I found was that if I copy the extensions that I need to my ~/.mozilla/firefox/firefox48/extensions directory, I just go in and quickly enable them. I just wish they were automatically enabled.

Also, you may wonder why I have a script like I do, and it's because FF likes to update itself, even if I tell it not to. With my script, I can be back to FF48 in about 2 minutes.

more options

Easy solution do not check the version using about firefox.

I do not have issues with legacy versions auto updating. Firefox should not update itself if you set it to not update UNLESS you use the about Firefox option. Then unfortunately it will override your settings. If you act before the next restart you can abort the update.

I think there are plans to force Firefox "Refresh" in future versions of Firefox if profiles are left unused for more than some period like 60 days. I guess we are going to need a script at some stage to circumvent that, unless the developers give us an opt out option.

Not too sure how and where Firefox stores the extension enabled/disabled state and I don't recall reading about it. I have not recently tried copying extensions in to the extensions directory presumably Firefox still needs to go through the install add-on procedure with the door hanger top left confirming the process. Hopefully I do not need to try to answer those sort of questions now.

You may find this of interest Firebug › replacement for firephp (devtools) https://groups.google.com/forum/#!topic/firebug/L8RZfWPeh1g

Copying a previous answer /questions/1131816#answer-899143 How do i disable Firefox from updating completely? Personally if I wish to check the version I do NOT use

Menu -. Help -> about Firefox

Instead look at the troubleshooting page (also available by keying into the address bar about:support)

That confirms the version without triggering an update even in Windows with the maintenance service. Note it is also possible to abort such updates by deleting the files before you restart.

See https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment note to change or lock the prefs

"app.update.enabled", false;
"app.update.auto", false;
"app.update.mode", 0;
"app.update.service.enabled", false;

I do not recall noticing any recent changes in update behaviour. It has triggered updates when you use the about firefox for years that is not new.