Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a dark gtk theme installed in my ubuntu 10.10 install and a persona installed for firefox that I also like.

The problem is that firefox is using my dark GTK theme for items like buttons and text fields on common web pages, and this commonly creates unreadable menus, textareas, and buttons. (white text on white backgrounds, or black text on black buttons).

I don't want to change either theme, because they look great in every other application, and I don't want to have to do something crazy to my firefox install like use custom user scripts or css overrides.. all I want to do is tell firefox to stop using my gtk theme completely.. this appears to be what google's chrome browser does and it makes the most sense by far... how can web developers possibly work around all the possible GTK themes out there?

share|improve this question
    
I wonder if anyone has a permanent solution for this so I can just launch firefox from my Gnome 3 activities tab/window... –  MDeSchaepmeester Dec 16 '12 at 14:42
    
@MDeSchaepmeester: See the answer I added here for KDE, maybe it works for Gnome as well: askubuntu.com/a/358493/154613 –  Igor Rodriguez Oct 13 '13 at 10:56
add comment

4 Answers 4

up vote 15 down vote accepted

Start Firefox with the following command:

env GTK2_RC_FILES=/usr/share/themes/Simple/gtk-2.0/gtkrc firefox

This will launch Firefox using the Simple theme, which is pretty basic and should blend with your Persona. You can try other themes, by replacing Simple with the theme name, but this doesn't work with all themes.

So far I have successfully tested with Simple and Redmond themes...

Before

Before

After

After

share|improve this answer
    
this worked for mw with the 'new wave' and 'redmond' themes only, but it still worked, so I'm very greatful. screenshots are always appreciated, too :) –  tamale Oct 21 '10 at 13:56
    
You are welcome. –  lovinglinux Oct 21 '10 at 14:22
    
this is awesome!!! –  RolandiXor Jan 16 '11 at 21:32
    
which you need to do after quitting your current firefox instance, of course, or the "firefox" script will just instruct the current process to open a new window (and the GTK2_RC_FILES setting is just ignored altogether). –  sylvainulg Jan 27 '12 at 10:13
    
What is the most recent version of firefox this is known to work with? I'm using Firefox 31 on Ubuntu Utopic and, I swear this worked for me once, but I must be hallucinating because it is no longer working no matter what I try. –  Robru Jul 17 at 23:01
add comment

I would like to add to the great answer of @lovinglinux a way to make Firefox to load the theme when opened from a launcher in the taskbar instead of command line:

  1. Edit /usr/share/applications/firefox.desktop as sudo,
  2. In the "Exec" line, replace the value after the "=" with a command using the instructions provided by the mentioned @lovinglinux:

    bash -c 'GTK2_RC_FILES=/usr/share/themes/Redmond/gtk-2.0/gtkrc firefox %u' Kate editing firefox.desktop

And the result is this:

Firefox with Redmond theme and all other applications with a dark theme

share|improve this answer
    
Thank you for showing how to modify the .desktop file. That makes it very convenient! I'm using your solution for LibreOffice. –  user25656 Dec 30 '13 at 7:11
add comment

You could start Firefox with a different user and the same profile. Copy your current profile (~/.mozilla/firefox/profile) to that different user's folder, chown it to the user, and then on your console run:

su newuser
firefox -profilemanager

This sounds a bit overkill, but you can put it into a script. Firefox will use the theme on the profile, but keep the unthemed GTK from the new user.

Also, this is the kind of stuff that makes it fun to use Firefox and Ubuntu :P

share|improve this answer
add comment

You can add another theme to Firefox that you like from Tools -> Addons -> Themes. Then just use that theme instead of the default one.

share|improve this answer
1  
You can't use a different Firefox theme while using Personas –  lovinglinux Oct 19 '10 at 20:01
1  
Oh wow, thanks. Did not realize. (Also glad you are here, Firefox users should be helped a great deal! :)) –  NightwishFan Oct 19 '10 at 20:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.