How can I open the GTK Inspector in Darktable on Windows?

I want to customize Darktable via CSS, and I really need GTK Inspector to isolate the various UI elements to customize.

So I’ve tried all of the following:

1. Read through this: GTK Inspector - GNOME Developer Documentation
2. Set the environment variable GTK_DEBUG to interactive and then starting Darktable - followed by pressing Control-Shift-D
3. Following this guide: The GTK Project - A free and open-source cross-platform widget toolkit
A. Installing MSYS2
B. Running pacman -S mingw-w64-ucrt-x86_64-gtk4
C. Running pacman -S mingw-w64-ucrt-x86_64-toolchain base-devel
D. Copied the contents of the gtk-4.0 folder to share/themes/Windows10/gtk-4.0
E. Copied the Adwaita icon theme
4. Tried following this: GitHub - wingtk/gvsbuild: GTK stack for Windows and failing
5. Too much more to list…

Is there any chance someone can point me in the right direction towards getting GTK Inspector to run on my Windows 11 box? I really want to make my own Darktable theme.

Any advice or guidance would be extremely appreciated!

Best,
Joseph

Only using GTK inspector on linux, so can’t tell you if it is possible on Windows, but darktable uses GTK3, maybe this is your issue ?

The darktable shortcut system intercepts ctrl-shift-D, so you have to use it when that isn’t active, for example while in the preferences dialog.

Did you manage it?

I’d also like to have the GTK inspector on Windows 10 to fine-tune my theme, but I don’t know how to install the program and get it working.

Following your post, I got to step C.

Then I got lost in technical jargon and links that only confused me more, and I ended up giving up. I’m unfamiliar with Linux.

So, I’m just wondering if there’s a step-by-step guide for beginners, or if anyone can provide one, where the last step is simply pressing Ctrl+Shift+D and enjoying!

This works, and much of the trick is where you press the keys.

  1. In the Registry Editor, go to HKEY_CURRENT_USER\Software\GSettings\org\gtk\settings\debug — create that path if it isn’t there.
  2. Inside it, add a new DWORD (32-bit) value named enable-inspector-keybinding, set to 1.
  3. Start darktable and open preferences (the gear icon, top right).
  4. With the preferences window in front, press Ctrl+Shift+D, and answer OK to “Do you want to use GTK+ Inspector?”

The Inspector opens. It may come up behind darktable — check your taskbar.

Two things that don’t work, so you don’t waste an evening on them:

  • GTK_DEBUG=interactive does nothing at all.
  • Ctrl+Shift+I, and Ctrl+Shift+D pressed on the main window, don’t work either — darktable’s own shortcuts claim those keys first. (Ctrl+Shift+I just opens “copy & import”.) That is exactly why it has to be done with the preferences window focused.

Once open, the crosshair button at the top left lets you click any part of darktable and see that element’s name and style classes — and the CSS tab applies CSS live to the running program.

1 Like

Ultimately, I am using it on Windows 10 without a keyboard shortcut, as I am reluctant to modify the registry or system configurations.

Here is my imperfect workaround:

Installing GTK Inspector:
-Download the MSYS2 installer

  • MSYS2 page: https://www.msys2.org/
  • Download the appropriate installer for your machine and follow the steps outlined at https://www.msys2.org/
    • Run the downloaded installer, accepting the default settings.
    • A terminal window will open upon completion; enter the following commands:
    • $ pacman -S mingw-w64-ucrt-x86_64-gcc
    • Proceed with installation? [Y/n] y
    • $ gcc --version (verify successful installation)
    • $ exit
  • Install GTK3 and its dependencies:
    • Launch MSYS2 MINGW64 from your installed applications.
    • $ pacman -S mingw-w64-ucrt-x86_64-gtk3 (install GTK3 packages; in the future, this will be GTK4)
    • Proceed with installation? [Y/n] y
    • $ exit

Usage:
Ensure darktable is closed before starting. This command launches both GTK Inspector and darktable simultaneously.

  • Open the MSYS2 MINGW64 terminal.
  • $ GTK_DEBUG=interactive /c/Program\ Files/darktable/bin/darktable.exe &
  • $ exit

Drawbacks:

  • If the darktable configuration menu is open, it captures focus, preventing inspection.
  • [Ctrl]+[Shift]+I and [Ctrl]+[Shift]+D do not affect the inspector; instead, they trigger the functions assigned within darktable.

Tips:

  • The next times you launch MSYS2 MINGW64, simply press the Up Arrow key in the terminal to recall the previous command, so you don’t have to type it again.
  • If you are in full-screen mode, use [Alt]+[Tab] to switch between the Inspector and darktable.