Dark Mode on Linux

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
GigaPain
Posts: 2
Joined: Tue Jun 29, 2021 9:26 am

Dark Mode on Linux

Post by GigaPain »

So I've been looking around for how to activate dark mode for Linux, but can't seem to find anything actually stating it even exists and how to enable it. If there is a way, it would be wonderful to have it documented somewhere so that people can easily figure out how to swap between light and dark mode. Possibly even a setting under preferences to allow people to choose their theme right from the programs menu.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Dark Mode on Linux

Post by JohnAStebbins »

In gnome, you can set the system wide theme with the tool gnome-tweaks. If you wish to set the theme for a single application, you can do that from the command line with the environment variable GTK_THEME. E.g.

Code: Select all

GTK_THEME=Adwaita-dark ghb
You can see a list of available themes either in the gnome-tweaks app or in /usr/share/themes directory.
The Linux HandBrake app does not currently have a preference option for setting the theme.
GigaPain
Posts: 2
Joined: Tue Jun 29, 2021 9:26 am

Re: Dark Mode on Linux

Post by GigaPain »

JohnAStebbins wrote: Tue Jun 29, 2021 3:31 pm In gnome, you can set the system wide theme with the tool gnome-tweaks. If you wish to set the theme for a single application, you can do that from the command line with the environment variable GTK_THEME. E.g.

Code: Select all

GTK_THEME=Adwaita-dark ghb
You can see a list of available themes either in the gnome-tweaks app or in /usr/share/themes directory.
The Linux HandBrake app does not currently have a preference option for setting the theme.
I ran the command and it worked, but the only problem is if I open it again without entering the same command it reverts right back to light theme. The desktop environment that I'm using is KDE, so is it possible to have it do the same thing that Gnome is able to do with its global themes?
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Dark Mode on Linux

Post by JohnAStebbins »

I don't know KDE well. But this post has some answers that may help
https://forums.opensuse.org/showthread. ... DE-desktop
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Dark Mode on Linux

Post by JohnAStebbins »

One of the suggestions in that post is to link a directory under /usr/share/themes/*/gtk-3 into ~/.config. The suggestion "works" but would overwrite any other local gtk-3 settings you might have in .config/gtk-3. A better solution is to copy or link the gtk.css file that is inside the themes directory into ~/.config/gtk-3/ directory.
Post Reply