9

I am trying to inspect the gnome-terminal with the GTK Inspector. This inspector works on other GTK programs like gnome-calculator and gedit. However, when I try to run this on the gnome-terminal, nothing happens. I've tried the many possibilities like Ctrl+Shift+I and Ctrl+Shift+D (which never works for me) and running GTK_DEBUG=interactive gnome-terminal. The latter works for other GTK programs but not for the terminal. It also doesn't matter if I run this command from a different terminal like xterm. Any suggestions on how I can GTK Inspect the gnome-terminal?

2

2 Answers 2

11

I've found the solution, I'm using GTK+ 3.22 for reference, just need to turn on this setting:

gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true

And then the "Help" menu of gnome-terminal will show a "Inspector" item you just need to click it.

This is for the VTE widget only: Alternatively, if you are using jhbuild, the vte module has a test program for the vte widget (that gnome-terminal uses) so you can run it like this:

# inside jhbuild/checkout/vte
GTK_DEBUG=interactive src/testvte

Update:

On 20.04, the "Inspector" link is in the gnome-terminal window's "hamburger‑menu‑button > Advanced" submenu.

2
  • Wow, that was well hidden! Nov 18, 2018 at 20:03
  • The org.gtk.Settings.Debug schema is part of libgtk-3-dev. You need to install that package or you'll get a "no such schema" error.
    – GcL
    Aug 6, 2019 at 20:30
0

You can recompile gnome-terminal with --enable-debug passed to the ./configure step, and then it'll have a Help -> Inspector menu entry which works properly.

(I'm not sure how to inspect gnome-terminal as it is shipped by Ubuntu, or whether it is possible at all.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.