Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Overriding ENV variable in .desktop file
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
r7l
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2019
Posts: 89

PostPosted: Sat Jun 04, 2022 9:31 am    Post subject: Overriding ENV variable in .desktop file Reply with quote

Updating Gnome to 42 with GTK 4 made my chosen GTK theme break or disappear. That wasn't unexpected and announced (rant towards Gnome here) and as a workaround you now need to put GTK_THEME=Arc-Darker as an ENV variable. I did so by adding a file to /etc/env.d. This works as expected but it breaks the feature to switch between dark and light mode within a single Gnome based application or within Gnome Settings. I would assume that setting ENV vars globally makes the theme setting pretty much static system wide.

My issue now is that while using Arc-Darker (a light theme), i want Gnome Builder to have Arc Dark (dark theme). This was working perfectly before by just setting the application to "dark" in settings. But it does no longer work. There is a solution for it by running "GTK_THEME=Arc-Dark gnome-builder" from terminal. I've also tried to apply that to the .desktop file as it is explained in Arch Wiki.

What works on terminal:
    - Using "env GTK_THEME=Arc-Dark gnome-builder"
    - Using "env -u GTK_THEME gnome-builder" (it then falls back to what is set in Gnome-Tweaks)
    - Using "GTK_THEME=Arc-Dark gnome-builder"
My issue now is, that Gnome completely ignores what is set in .desktop file. It doesn't matter if it's in /usr/share/applications or .local/share/applications.

I've tried the following things:
    - Setting "Exec=env GTK_THEME=Arc-Dark gnome-builder %U" in ~/.local/share/application/org.gnome.Builder.desktop
    - Patching the desktop file with /etc/portage/patches to have the setting in /usr/share/applications/org.gnome.Builder.desktop
    - Using a small script as Exec in .desktop file (this is not even called)

Can anyone help me to find the place where Gnome stores the execution call for applications?
Back to top
View user's profile Send private message
mega_flow
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jun 2016
Posts: 84
Location: Belgium

PostPosted: Sat Jun 04, 2022 3:47 pm    Post subject: Reply with quote

Have u restart gnome-shell - or logout after editing the .desktop file ?
Exec=env GTK_THEME:Arc-Dark gnome-builder
_________________
Intel(R) Core(TM) i7-10875H - GeForce GTX 1660 Ti Mobile
Back to top
View user's profile Send private message
r7l
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2019
Posts: 89

PostPosted: Sat Jun 04, 2022 7:50 pm    Post subject: Reply with quote

Thanks for your help. I've actually restarted my computer multiple times. I've also reinstalled the package multiple times with the patch to .desktop file in /etc/portage/patches. It doesn't work. No matter what i am doing.

I've tried the same thing on another non Gnome related application (Geany) and it does work there using .desktop file and terminal. There has to be something else for applications coming from Gnome.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum