You are not logged in.

#1 2017-12-24 02:44:39

IceS2
Member
Registered: 2017-05-04
Posts: 39

[SOLVED] Firefox GTK Theme issue

Hello guys, I'm trying to  setup my first i3 rice and I'm having some trouble fixing the Firefox bug with dark GTK3 themes.
I tried the solutions on Arch Wiki, heck, I've even tried editing directly /usr/share/applications/firefox.desktop as sudo.
But it didn't work.
Tried as:
Exec=GTK_THEME=Arc /usr/bin/firefox/firefox
Exec=env GTK_THEME=Arc /usr/bin/firefox/firefox
and a few others.
I've even restarted my computer after each change to make sure...
Can you guys help me?

Thanks \o/

Last edited by IceS2 (2017-12-26 14:08:34)

Offline

#2 2017-12-24 02:47:39

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Firefox GTK Theme issue

Remove the redundant plea for help from your title: https://wiki.archlinux.org/index.php/Co … ow_to_post



Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-12-24 02:50:21

IceS2
Member
Registered: 2017-05-04
Posts: 39

Re: [SOLVED] Firefox GTK Theme issue

Sorry, thought it was OK on the other forums ;P

Offline

#4 2017-12-24 02:51:41

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Firefox GTK Theme issue

This place is not run like other forums. Read the entire Code of Conduct, it will save you from issues in future.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2017-12-24 07:11:12

brynildsen
Member
Registered: 2017-12-18
Posts: 14

Re: [SOLVED] Firefox GTK Theme issue

Could you pls try opening some other applications using the same GTK stuff, to make sure if it is firefox that is the problem or if we need to look elsewhere for a solution..?
I could very likely be some library or color setting missing in the theme itself instead.

Last edited by brynildsen (2017-12-24 07:11:30)

Offline

#6 2017-12-24 16:17:33

IceS2
Member
Registered: 2017-05-04
Posts: 39

Re: [SOLVED] Firefox GTK Theme issue

Hey brynildsen, It's a well known Firefox bug for what I saw (It uses my GTK theme, but a few elements get screwed up). My problem here is that I can't modify firefox configuration in order to open it with the theme I want. It just works when I open firefox by running that command from the terminal.
I wanted to make firefox automatically open with the selected theme like it's told in https://wiki.archlinux.org/index.php/fi … .2B_themes (The alternative way)

Offline

#7 2017-12-24 18:02:01

NoSuck
Member
Registered: 2015-03-04
Posts: 157
Website

Re: [SOLVED] Firefox GTK Theme issue

You get the results you want when opening Firefox from a terminal, correct?  Sounds like an environment variable issue.  Try exporting in the earliest possible place.

Offline

#8 2017-12-24 18:05:04

IceS2
Member
Registered: 2017-05-04
Posts: 39

Re: [SOLVED] Firefox GTK Theme issue

That might make sense, although I think using it on the last possible place makes more sense because it should overwrite the first set up variable, shouldn't it?
Any idea where Firefox sets that variable? Thanks!

Offline

#9 2017-12-24 18:37:52

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,863

Re: [SOLVED] Firefox GTK Theme issue

i'd rather check the firefox process environment on whether that var is set at all.
How do you suppose to invoke the relevant desktop service? You launcher might ignore it altogether ...

Offline

#10 2017-12-24 19:51:41

IceS2
Member
Registered: 2017-05-04
Posts: 39

Re: [SOLVED] Firefox GTK Theme issue

Hey seth, I'm so sorry, but I literally understood nothing from what you said ><

Offline

#11 2017-12-24 20:23:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,863

Re: [SOLVED] Firefox GTK Theme issue

You suggested it works when you run "env GTK_THEME=Arc /usr/bin/firefox/firefox" from an interactive shell.
So the question is how you run it otherwise.

tr '\0' '\n' < /proc/_PID_OF_FIREFOX_/environ | grep GTK

should print the environment that is passed to the firefox process, replace _PID_OF_FIREFOX_ with the actual numeric PID.

Offline

#12 2017-12-25 01:37:14

Maniaxx
Member
Registered: 2014-05-14
Posts: 761

Re: [SOLVED] Firefox GTK Theme issue

Try
Exec="sh -c 'GTK_THEME=Arc /usr/bin/firefox/firefox'"

Not sure about the proper quote notation here though. Just change them if it doesn't work.


sys2064

Offline

#13 2017-12-26 13:11:35

IceS2
Member
Registered: 2017-05-04
Posts: 39

Re: [SOLVED] Firefox GTK Theme issue

Seth, the only GTK environmental variables set for firefox when running it from rofi are:
GTK_IM_MODULE=gtk-im-context-simple
GTK_MODULES=canberra-gtk-module

I'll try out Maniaxx solution now and see how it goes!

Offline

#14 2017-12-26 13:21:23

IceS2
Member
Registered: 2017-05-04
Posts: 39

Re: [SOLVED] Firefox GTK Theme issue

Well Maniaxx, I'm starting to think that the file I'm changing ain't doing nothing.
Tried with every quote notation possible and rofi still starts firefox, but it always starts it with my dark theme.

Offline

#15 2017-12-26 13:47:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,863

Re: [SOLVED] Firefox GTK Theme issue

IceS2 wrote:

running it from rofi are

And what makes you believe rofi is operating on the desktop services?
Afaiu it's a dmenu clone, so it will most likely operate on a pre-build list of entries.
=> You got to rebuild them somehow (but i've not used rofi myself so far)

Offline

#16 2017-12-26 13:52:42

IceS2
Member
Registered: 2017-05-04
Posts: 39

Re: [SOLVED] Firefox GTK Theme issue

I see.... I have no idea that's the way dmenu worked. How can I test if firefox.desktop modifications are working, seth?

Edit: Ok Seth that seems to be the problem. Running

Rofi -show run

doesn't read desktop entry.
If I run rofi as

i3-dmenu-desktop --dmenu='rodi-dmenu'

it actually reads the desktop entry!
I actually prefer to run rofi -show run, but I need to see if there's a way to change the theme for it.

Last edited by IceS2 (2017-12-26 13:59:43)

Offline

#17 2017-12-26 13:58:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,863

Re: [SOLVED] Firefox GTK Theme issue

seth wrote:

i've not used rofi myself so far

...

Looking at rofi's homepage, it runs either binaries directly OR desktop services, so you should ensure to operate it in the proper mode.
Also just make the desktop service run eg. xterm. If you're still running firefox, you can be sure you're not starting this desktop service.

Offline

#18 2017-12-26 14:08:20

IceS2
Member
Registered: 2017-05-04
Posts: 39

Re: [SOLVED] Firefox GTK Theme issue

Seth, thank you so much!!!!!
Mainly because you put up with my noobish self!
You're awesome \o/

Managed to solve  it by running

rofi -show drun

It works just as 

rofi -show run

But if there's a menu entry it uses it!!!

Offline

Board footer

Powered by FluxBB