No matter the dark theme I use in Xfce (Gtk) or the dark theme I define in Kvantum (an app that lets you select a theme for QT apps while running them under a Gtk-based desktop environment, like Xfce or Gnome), Calibre kept on using its default light theme.


How was I supposed to go from this to this?


I could not find an option in Calibre's settings to select a theme.

The official documentation explains one can modify Environment variables, including CALIBRE_USE_SYSTEM_THEME and CALIBRE_USE_DARK_PALETTE, two options that did look promising but without any explanation on how to use them…

Searching on 'how to set Calibre Environment variables', I stumbled upon this thread in Linuxmint's forum. I quote one answer:

initially, i tried env CALIBRE_USE_SYSTEM_THEME=1 calibre but it did nothing. i then tried env CALIBRE_USE_DARK_PALETTE=1 calibre and it worked. the developer said he didn't give instructions for linux because there's multiple answers (because there's multiple linux flavors)

I still wasn't sure how and where I was supposed to use that but, at least, I add a clue which one to use ;)

Using Whiskermenu to launch all my apps and knowing how to add custom launchers to it, I decided to create a new launcher for Calibre and add this environment variable to it, and see what it would do. If anything.

Launchers are just text files with a .desktop extension you can create one in any text editor (save it into ~/.local/share/applications/) but if you'd rather use a graphical tool and not worry about anything, I like Menulibre a lot. It integrates very well with Whiskermenu.

After you have installed Menulibre, right-click on Whiskermenu's icon and click Edit Applications. Then Click the + sign and select Add Launcher. Here is the launcher being created in Menulibre:


Here it is opened in a text editor:

[Desktop Entry]
Comment=Calibre with a dark theme
Icon=/home/yal/Pictures/App icons/app-calibre.png

And here is the same launcher displayed in Whiskermenu:


There is probably a better way to force Calibre to use a dark theme under GNU/Linux and/or to give it custom environment variables, but this works too and lets me enjoy a dark-themed Calibre under Xfce—and probably under any other Gtk-based desktop environment ;)