5

In Ubuntu 16.04 LTS and before, the gThumb application (version 3.4.3) has a light background in its menus, its browser and its dialogues – like white or light grey. So the gThumb application fits nicely with my light Ubuntu desktop and the other applications.

Now since Ubuntu 17.04 or 17.10, and so also with Ubuntu 18.04 LTS beta, the gThumb application (version 3.6.0 in Ubuntu 18.04) has a dark background for all its menus, its browser and its dialogues – like black or dark grey. This breaks the harmony with my Ubuntu desktop and the other applications which all use light backgrounds, since I use a light Ubuntu theme. (Actually I am using Xubuntu but that's not the point here.)

Is there a way to configure gThumb's background color for menus, browser and dialogues? I didn't find any possibility, also not in dconf Editor.

pomsky
  • 70,557
Fidelis
  • 152

4 Answers4

9

You can run gThumb with your preferred GTK+ theme and its variant (light/dark) by the following command

GTK_THEME=<Theme-Name>:<Theme-variant> gthumb

for example

GTK_THEME=Ambiance:light gthumb

If you wish to make a change to the gThumb launcher so that it always launches the application with your preferred theme, then follow the steps below.

  1. Copy the correct .desktop file associated to gThumb (it should be called org.gnome.gThumb.desktop or gthumb.desktop or something similar) from /usr/share/applications to ~/.local/share/applications.

  2. Open the copied .desktop file using a text editor.

  3. Look for the Exec= line. Add env GTK_THEME=<Theme-Name>:<Theme-variant> just after Exec= so that it now looks like

    Exec=env GTK_THEME=<Theme-Name>:<Theme-variant> gthumb %U
    

    for example

    Exec=env GTK_THEME=Ambiance:light gthumb %U
    
  4. Save the .desktop file.

pomsky
  • 70,557
3

For anyone who wants to auto grab the current desktop theme when launching (e.g dark/night mode switching)

Use the following solution:

Create script: /usr/local/bin/gthumb-themed

#!/bin/bash

eval theme=$(gsettings get org.gnome.desktop.interface gtk-theme) GTK_THEME=$theme gthumb "$@"

Make it executable: sudo chmod +x /usr/local/bin/gthumb-themed

And modify your /usr/share/applications/org.gnome.gThumb.desktop to use the new Exec

...
Exec=gthumb-themed %U
...
[Desktop Action new-window]
...
Exec=gthumb-themed --new-window

It'll now automatically grab the default theme at startup.

Khaled
  • 131
0

If you start your graphical session with a display manager like GDM or LightDM then you can set the GTK theme environment variable in your ~/.xprofile.
This is automatically picked up by the display manager without the need to modify individual .desktop files for each application.

The syntax is GTK_THEME=Theme:variation, e.g.:

File: ~/.xprofile
───────────────────────────────
export GTK_THEME=Adwaita:light

And then logout/login again. You can then check whether this was correctly set using your terminal:

> echo $GTK_THEME
Adwaita:light

More info on the Arch wiki xprofile page.

0

None of these solutions work on version 3.12 on MX23(wildflower) XFCE Apparently this version is hard coded not to accept any theme variations, or won't work with Xfce! I think the whole application would have to be re-written and recompiled? For now I refuse to use this application (on this machine.) Switching to Ristretto (written for Xfce) works with my theme!