Ubuntu – How to get rid of the Ubuntu scrollbars and theming in Firefox 46.0

firefoxoverlay-scrollbarsthemesunity

I'm running Ubuntu 16.04 and I've just upgraded the firefox package (released today) from 45.0.2 to 46.0.

The release has brought an unwelcome change; the ugly Ubuntu scrollbars, and even uglier Ubuntu menu colours. How can I disable these, and get back the standard Firefox/GTK style?

Before: Firefox 45.0.2 on Ubuntu 16.04

  • Menus and textbox popups use black text on light grey background
  • Scrollbars are grey, have up/down/left/right icons

Firefox 45.0.2 on Ubuntu 16.04

After: Firefox 46.0 on Ubuntu 16.04

  • Menus and textbox popups use grey text on Ubuntu off-black background
  • Scrollbars are orange flat-design travesties

Firefox 46.0 on Ubuntu 16.04

I want to keep Firefox 46.0 but get rid of the sucky Ubuntu UI theme. Here are the steps I've already tried:

  • Checked Tools -> Addons -> Appearance to see if it's a distinct theme from the default — it isn't, this IS the default.
  • Tried changing Firefox theme to several complete themes — several of these changed every aspect of the Firefox UI except the scrollbars and popup menus, others did change them but I just didn't like their aesthetics.
  • Checked Tools -> Addons -> Extensions and disabled the "Ubuntu Modifications" addon. This didn't help.
  • From the old "how do I disable overlay scrollbars?" question, I tried apt-get remove overlay-scrollbar, then restarting my session. This didn't help.
  • From the same question, I tried gsettings set com.canonical.desktop.interface scrollbar-mode normal and this didn't help either.
  • From the same question, I tried launching Firefox with LIBOVERLAY_SCROLLBAR=0 firefox and also GTK_OVERLAY_SCROLLING=0 firefox, neither of these worked.

What has worked so far is downgrading to the previous firefox package

apt-get install firefox=45.0.2+build1-0ubuntu1
apt-mark hold firefox

This works perfectly, so it does show that the problem is specific to the new 46.0+build5-0ubuntu0.16.04.2 version of the package. I looked at the Ubuntu package changelog which doesn't say much, but the Firefox 46.0 release notes say "GTK3 integration"; Firefox 46.0 switched from using GTK2 to using GTK3, as Compholio noted in their answer.

This isn't a permanent solution, I don't want to fall behind the latest Firefox release. What can I do to get the vanilla GTK theme in Firefox instead of the Ubuntu theme?

Best Answer

This appears to be a bug with the GTK3 theme, probably Firefox is using the wrong theme information for the pop-ups and the scroll bar.

I partially fixed this for myself by switching the theme for just Firefox:

GTK_THEME=radiance firefox

You can add this "permanently" by editing the launcher file:

sudo gedit /usr/bin/firefox

and adding the line (after #!/bin/sh):

export GTK_THEME=radiance

It'd probably be a good idea to file a bug against this, but now that I've finally gotten rid of the awful dark menus I'm less motivated to find the root cause of the problem ;)

Related Question