You are not logged in.

#1 2025-11-28 13:36:51

syscall
Member
Registered: 2025-11-28
Posts: 8

GTK theme not chaning despite changes in the config files

I am trying to change GTK theme and from reading the wiki I found that in order to change the theme I have to change the following files:

~/.gtkrc-2.0
$HOME/.config/gtk-3.0/settings.ini

here is the configs I have:
~/.gtkrc-2.0
gtk-theme-name="Tokyonight-Dark"

$HOME/.config/gtk-3.0/settings.ini
[Settings]
gtk-theme-name=Tokyonight-Dark
gtk-application-prefer-dark-theme=true

I've installed the following theme, here is directory structure for the ~/.themes/ directory:

Tokyonight-Pink-Dark  Tokyonight-Pink-Dark-hdpi  Tokyonight-Pink-Dark-xhdpi

I have also tried changing Tokyonight-Dark to Tokyonight-Dark-Pink with no visible effect, it seems that the GTK apps ignore this option completely, as they default to light theme

Last edited by syscall (2025-11-28 16:40:09)

Offline

#2 2025-11-28 15:48:24

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: GTK theme not chaning despite changes in the config files

the GTK apps

Which one? GTK2, 3 or 4?
Notably gtk4/libadwaita is nasty, https://wiki.archlinux.org/title/GTK#Themes

Offline

#3 2025-11-28 16:38:32

syscall
Member
Registered: 2025-11-28
Posts: 8

Re: GTK theme not chaning despite changes in the config files

it uses GTK3

Offline

#4 2025-11-28 16:42:04

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: GTK theme not chaning despite changes in the config files

Do you have https://aur.archlinux.org/packages/gtk-engine-murrine ?

printenv | grep -i gtk

Offline

#5 2025-11-28 17:11:56

syscall
Member
Registered: 2025-11-28
Posts: 8

Re: GTK theme not chaning despite changes in the config files

here is env:

GTK_THEME=Tokyonight-Pink
GTK2_RC_FILES=/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc

gtk-engine-murine is installed: gtk-engine-murrine 0.98.2-4.1
P.S settings GTK_THEME=Tokyonight-Pink-Dark didn't help
P.P.S changing GTK2_RC_FILES to .themes/Tokyonight-Pink-Dark/gtk-2.0/gtkrc works for GTK2 applications, I've also tried changing GTK_THEME to Tokyonight-Pink-Dark but it had no effect whatsoever

Last edited by syscall (2025-11-28 17:23:42)

Offline

#6 2025-11-28 17:27:06

tethys
Member
Registered: 2019-08-13
Posts: 168

Re: GTK theme not chaning despite changes in the config files

Does the file "/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc" exist in your system?
Which desktop environment/WM do you use?
I use openbox and it works for me with "GTK_THEME=Adwaita:dark".

Offline

#7 2025-11-28 17:52:28

syscall
Member
Registered: 2025-11-28
Posts: 8

Re: GTK theme not chaning despite changes in the config files

@tethys No, the file  "/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc" doesn't exists on my system. However,I don't think that this is the problem, all GTK2 apps work fine with the provided gtkrc file, but for some reason it is not true for GTK3 apps. I use hyprland. As for the last option, I don't know why, but even with Adwaita:Dark dark mode didn't really work on the system

Offline

#8 2025-11-28 19:56:43

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: GTK theme not chaning despite changes in the config files

strace -o /tmp/gtk.strace gtk3-demo
cat /tmp/gtk.strace | curl -F 'file=@-' 0x0.st

Offline

#9 2025-11-28 22:14:28

syscall
Member
Registered: 2025-11-28
Posts: 8

Re: GTK theme not chaning despite changes in the config files

@seth https://0x0.st/K4YL.txt
P.S I don't know why, but for some reason all demo application look like just they should(dark mode), however when I start another apps it looks like the theme being loaded, but the dark mode option itself is ignored, as I can see other colors close to the selected theme

Last edited by syscall (2025-11-28 22:24:31)

Offline

#10 2025-11-29 09:43:07

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: GTK theme not chaning despite changes in the config files

demo application look like just they should(dark mode), however when I start another apps it

Time to drop your pants and show us your … apps tongue
What is the *actually* affected process, is it maybe some appsnapflatschdock?
(and ideally post a strace for that)

Offline

#11 2025-11-29 15:48:45

syscall
Member
Registered: 2025-11-28
Posts: 8

Re: GTK theme not chaning despite changes in the config files

@seth Ok, so the app I am experiencing problem with is hiddify, here is strace for it. For the record, I also had a problem with Firefox-based browser right-click menu being in light mode, but it turned out to be a problem with the custom theme overriding the settings.  As for the hiddify though, for some reason it detects system theme as light K4Gg.png
P.S same goes for anydesk K4Dr.png

Last edited by syscall (2025-11-29 16:14:02)

Offline

#12 2025-11-29 15:53:37

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: GTK theme not chaning despite changes in the config files

Which of https://aur.archlinux.org/packages?K=hiddify specifically?
This is no strace

flutter: 02:31:21.436592 [INFO]     [bootstrap] initializing [directories]
flutter: 02:31:21.436955 [DEBUG]    [bootstrap] [directories] initialized in 0ms
flutter: 02:31:21.436998 [INFO]     [bootstrap] initializing [app info]
flutter: 02:31:21.437777 [DEBUG]    [bootstrap] [app info] initialized in 0ms
flutter: 02:31:21.437812 [INFO]     [bootstrap] initializing [preferences]
flutter: 02:31:21.437841 [DEBUG]    [preferences] initializing preferences
flutter: 02:31:21.437996 [DEBUG]    [bootstrap] [preferences] initialized in 0ms
flutter: 02:31:21.438073 [INFO]     [bootstrap] initializing [preferences migration]
flutter: 02:31:21.438097 [DEBUG]    [PreferencesMigration] already using the latest version (v1)
flutter: 02:31:21.438120 [DEBUG]    [bootstrap] [preferences migration] initialized in 0ms
flutter: 02:31:21.438164 [DEBUG]    [PreferencesEntry<bool, dynamic>] getting persisted preference [debug_mode](bool)
flutter: 02:31:21.438179 [INFO]     [bootstrap] initializing [window controller]
flutter: 02:31:21.446141 [DEBUG]    [bootstrap] [window controller] initialized in 7ms
flutter: 02:31:21.446200 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [silent_start](bool)
flutter: 02:31:21.446234 [DEBUG]    [bootstrap] silent start [Disabled]
flutter: 02:31:21.450609 [INFO]     [bootstrap] initializing [auto start service]
flutter: 02:31:21.450714 [INFO]     [AutoStartNotifier] auto start is [Disabled]
flutter: 02:31:21.450732 [DEBUG]    [bootstrap] [auto start service] initialized in 0ms
flutter: 02:31:21.450745 [INFO]     [bootstrap] initializing [logs repository]
flutter: 02:31:21.451567 [DEBUG]    [bootstrap] [logs repository] initialized in 0ms
flutter: 02:31:21.451593 [INFO]     [bootstrap] initializing [logger controller]
flutter: 02:31:21.451610 [INFO]     [bootstrap] hiddify v2.5.7 (20507) [prod]
general release
linux [Linux 6.17.7-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Sat, 08 Nov 2025 15:35:56 +0000]
flutter: 02:31:21.451622 [INFO]     [bootstrap] initializing [profile repository]
flutter: 02:31:21.451985 [INFO]     [bootstrap] initializing [active profile]
flutter: 02:31:21.453152 [INFO]     [bootstrap] initializing [deep link service]
flutter: 02:31:21.453234 [INFO]     [bootstrap] initializing [sing-box]
flutter: 02:31:21.453272 [INFO]     [bootstrap] initializing [system tray]
flutter: 02:31:21.453524 [INFO]     [ConnectionNotifier] connection status: DISCONNECTED
flutter: 02:31:22.454883 [ERROR]    [bootstrap] [system tray] error initializing
flutter: 
flutter: 02:31:22.455082 [INFO]     [bootstrap] bootstrap took [1018ms]
flutter: dynamic_color: Accent color detected.
flutter: 02:31:24.383786 [INFO]     [ProxiesSortNotifier] sort proxies by: [delay]

But if you enforce the dark mode it uses your theme?
For it to dynamically follow the global time variant you'll likely have to make it use gsettings or xdg-desktop-portal, https://wiki.archlinux.org/title/Dark_m … tching#GTK

Offline

#13 2025-11-29 16:37:10

syscall
Member
Registered: 2025-11-28
Posts: 8

Re: GTK theme not chaning despite changes in the config files

I am using this hiddify package and the following anydesk pacakge. In terms of strace, here is the correct one. From the link you've sent, I think I force the apps to dark mode:
gsettings get org.gnome.desktop.interface color-scheme
'prefer-dark'

gsettings get org.gnome.desktop.interface gtk-theme
'Tokyonight-Pink-Dark'

Offline

#14 2025-11-29 16:45:48

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: GTK theme not chaning despite changes in the config files

execve("/usr/bin/hiddify", ["hiddify"], 0x7fffa50a00a0 /* 64 vars */) = 0
openat(AT_FDCWD, "/usr/share/icons/Adwaita//index.theme", O_RDONLY) = 8
read(8, "[Icon Theme]\nName=Adwaita\nCommen"..., 4096) = 3312
openat(AT_FDCWD, "/usr/share/icons/AdwaitaLegacy//index.theme", O_RDONLY) = 8
read(8, "[Icon Theme]\nName=AdwaitaLegacy\n"..., 4096) = 4045
openat(AT_FDCWD, "/usr/share/icons/hicolor//index.theme", O_RDONLY) = 8
read(8, "[Icon Theme]\nName=Hicolor\nCommen"..., 4096) = 4096
openat(AT_FDCWD, "/usr/share/icons/hicolor//index.theme", O_RDONLY) = 8
read(8, "[Icon Theme]\nName=Hicolor\nCommen"..., 4096) = 4096
openat(AT_FDCWD, "/usr/share/icons/hicolor//index.theme", O_RDONLY) = 8
read(8, "[Icon Theme]\nName=Hicolor\nCommen"..., 4096) = 4096
openat(AT_FDCWD, "/usr/share/icons/hicolor//index.theme", O_RDONLY) = 8
read(8, "[Icon Theme]\nName=Hicolor\nCommen"..., 4096) = 4096
read(14, "[Settings]\ngtk-icon-theme-name ="..., 4096) = 98
read(14, "[Settings]\ngtk-theme-name=Tokyon"..., 4096) = 83
access("/home/sat1x/.themes/Tokyonight-Pink-Dark/gtk-3.0/gtk.css", F_OK) = 0
openat(AT_FDCWD, "/home/sat1x/.themes/Tokyonight-Pink-Dark/gtk-3.0/gtk.css", O_RDONLY|O_CLOEXEC) = 14
statx(AT_FDCWD, "/home/sat1x/.themes/Tokyonight-Pink-Dark/gtk-3.0/gtk.css", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=257712, ...}) = 0
access("/usr/share/themes/Default/gtk-3.0/gtk-keys.css", F_OK) = 0
openat(AT_FDCWD, "/usr/share/themes/Default/gtk-3.0/gtk-keys.css", O_RDONLY|O_CLOEXEC) = 14
newfstatat(AT_FDCWD, "/usr/share/icons/breeze/index.theme", {st_mode=S_IFREG|0644, st_size=19306, ...}, 0) = 0
openat(AT_FDCWD, "/usr/share/icons/breeze/index.theme", O_RDONLY|O_CLOEXEC) = 14
read(14, "[Icon Theme]\nName=Breeze\nName[ar"..., 4096) = 4096
openat(AT_FDCWD, "/usr/share/icons/breeze/icon-theme.cache", O_RDONLY) = 14
openat(AT_FDCWD, "/usr/share/icons/breeze/icon-theme.cache", O_RDONLY|O_CLOEXEC) = 18
newfstatat(AT_FDCWD, "/usr/share/icons/hicolor/index.theme", {st_mode=S_IFREG|0644, st_size=55507, ...}, 0) = 0
openat(AT_FDCWD, "/usr/share/icons/hicolor/index.theme", O_RDONLY|O_CLOEXEC) = 14
read(14, "[Icon Theme]\nName=Hicolor\nCommen"..., 4096) = 4096
openat(AT_FDCWD, "/usr/share/icons/hicolor/icon-theme.cache", O_RDONLY) = 14
openat(AT_FDCWD, "/usr/share/icons/hicolor/icon-theme.cache", O_RDONLY|O_CLOEXEC) = 18
newfstatat(AT_FDCWD, "/usr/share/icons/Adwaita/index.theme", {st_mode=S_IFREG|0644, st_size=3312, ...}, 0) = 0
openat(AT_FDCWD, "/usr/share/icons/Adwaita/index.theme", O_RDONLY|O_CLOEXEC) = 14
read(14, "[Icon Theme]\nName=Adwaita\nCommen"..., 4096) = 3312
openat(AT_FDCWD, "/usr/share/icons/Adwaita/icon-theme.cache", O_RDONLY) = 14
openat(AT_FDCWD, "/usr/share/icons/Adwaita/icon-theme.cache", O_RDONLY|O_CLOEXEC) = 18
newfstatat(AT_FDCWD, "/usr/share/icons/AdwaitaLegacy/index.theme", {st_mode=S_IFREG|0644, st_size=4045, ...}, 0) = 0
openat(AT_FDCWD, "/usr/share/icons/AdwaitaLegacy/index.theme", O_RDONLY|O_CLOEXEC) = 14
read(14, "[Icon Theme]\nName=AdwaitaLegacy\n"..., 4096) = 4045
openat(AT_FDCWD, "/usr/share/icons/AdwaitaLegacy/icon-theme.cache", O_RDONLY) = 14
openat(AT_FDCWD, "/usr/share/icons/AdwaitaLegacy/icon-theme.cache", O_RDONLY|O_CLOEXEC) = 18

Looks very much like it's loading Tokyonight-Pink-Dark, but murrine doesn't show up (but doesn't for https://0x0.st/K4YL.txt either…)

Offline

#15 2025-11-29 16:51:42

syscall
Member
Registered: 2025-11-28
Posts: 8

Re: GTK theme not chaning despite changes in the config files

So what can I do with it?

Offline

#16 2025-11-29 16:56:41

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: GTK theme not chaning despite changes in the config files

File a bug upstream - apparently you're loading the correct theme but the application renders "whatever" (might be hardcoded or a bug do to the custom  internal themes)

Offline

Board footer

Powered by FluxBB