Omarchy

How-To: Find Out Whether a Linux App Is Qt or GTK, and Why It Ignores Your Theme

Leave a comment

With Omarchy moving Qt theming to qtengine, I wanted a quick way to tell which toolkit an app uses when it doesn’t match my theme. Here’s what I use.

1. Check the binary

ldd "$(command -v someapp)" | grep -E 'libQt[56]|libgtk-[34]|libgtk-4'

libQt6 or libQt5 means it’s a Qt app. libgtk-3 or libgtk-4 means GTK.

2. Check a running app (works for wrappers and Flatpaks too)

pid=$(pgrep -n someapp)
grep -oE 'lib(Qt[56][A-Za-z]*|gtk-[34])[^ ]*\.so' /proc/$pid/maps | sort -u

3. See what Qt is told to use

echo $QT_QPA_PLATFORMTHEME
tr '\0' '\n' < /proc/$pid/environ | grep -E 'QT_|GTK_'

After the Omarchy update, Qt apps launched from Hyprland should show qtengine. If an app was started some other way (a systemd user service, say), it may not have that variable, and that’s usually why it looks wrong.

4. Restart the stragglers

QWidget apps repaint when you switch themes, but Qt Quick apps only pick up the change at their next launch. If a Qt Quick app looks wrong after a theme switch, close it and open it again before you go digging.

God Bless, and Use the Source!

References & Further Reading

Subscribe (RSS) Follow How-Tos via RSS

Leave a note

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.