13

What I do know about applying the same settings for applications to all new users is either defining a schema or override file in /usr/share/glib-2.0/schemas or copying the folder/file to /etc/skel. When a new user is created, that user is automatically given the gsettings/config file.

So, my question is:

  • How do I apply a theme to Firefox and get this to apply to all users?
  • Does Firefox use gsettings type settings? And if so, which ones?
  • Does Firefox use config files (e.g. in ~/.config)? If so which ones?

I happen to be using either Gnome Shell or Unity, but I think the answer will apply to any desktop environment.

1 Answer 1

12
+100

Step 1: Download the theme file

Go to Firefox Themes website and download the xpi file of your favorite theme, say Arc Theme.

Download Arc Theme

Step 2: Install the theme for all users

Open the downloaded theme file with Archive Manager.

Open with Archive Manager

You'll see an install.rdf file inside. Open it too and copy the ID between the first <em:id> and</em:id> you find, which in Arc Theme's case is {52c2877e-44e1-11e5-8874-a62d1d5d46B0}. Note the theme's internal name too, you'll need it later.

Theme ID and Name

Rename the theme's xpi file with the ID you just copied. Then place the renamed xpi file in /usr/lib/firefox-addons/extensions/. To do so, open the Terminal and run this command:

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY nautilus /usr/lib/firefox-addons/extensions/

and copy the xpi file ({52c2877e-44e1-11e5-8874-a62d1d5d46B0}.xpi in Arc Theme's case) to the File Manager window that opens up.

Install theme to extensions folder

Step 3: Set the theme as default

Create a theme.js file (or a .js file with any name you like) in /usr/lib/firefox/browser/defaults/preferences/. To do so, open the Terminal and run this command:

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY gedit /usr/lib/firefox/browser/defaults/preferences/theme.js

When the preferences file gets opened in Text Editor, copy and paste this into it:

pref("general.skins.selectedSkin", "arc-theme");

But, don't forget to replace arc-theme with the theme's internal name you saw in install.rdf! 😊

Okay, that's all. Firefox is now set to use your favorite theme by default!😃 Tested and verified on Ubuntu 14.04LTS with Firefox 45.

Firefox Arc Themed


Background

Solus Project uses Firefox as it's default browser, but with it's theme set to Arc Darker 'out of box'. So, I poked around their firefox and arc-firefox-theme packages, found out how it works and then reproduced the method on Ubuntu. 😎

8
  • Nice well written answer.Very useful
    – Suici Doga
    Mar 16, 2016 at 2:29
  • 1
    Why use pkexec when you can use sudo
    – Suici Doga
    Mar 16, 2016 at 2:30
  • 1
    Using sudo for GUI applications like Nautilus or Gedit is a bad idea @SuiciDoga, but you could simply use gksudo nautilus /path/to/directory and gksudo gedit /path/to/file - that's what I personally use.
    – Byte Commander
    Mar 16, 2016 at 11:33
  • 1
    @SuiciDoga Read this question: askubuntu.com/questions/270006/…
    – Byte Commander
    Mar 16, 2016 at 13:26
  • 1
    Also @ByteCommander I can find posts suggesting gksudo is deprecated, but cannot find a reliable source. The fact that it is not installed by default on Ubuntu does not mean it shouldn't be. Do you have a reliable source, other then "I think...."? Mar 17, 2016 at 10:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .