SysTutorials

Qt Cursor Theme Support in GNOME and MATE

· updated April 12, 2026

Qt and GTK applications often use different cursor themes, which creates visual inconsistency across your desktop. This mismatch is common in mixed-DE environments where Qt applications (like VLC, KeePass, or Telegram) inherit the wrong cursor style from system defaults.

How Qt finds cursor themes

Qt applications read cursor configuration from ~/.icons/default/index.theme. This file specifies which cursor theme Qt should use. If this file doesn’t exist or points to a non-existent theme, Qt falls back to a generic cursor that may look out of place in GNOME or MATE.

Setting the cursor theme via configuration file

The simplest approach is to create or edit ~/.icons/default/index.theme:

mkdir -p ~/.icons/default

Then add this content:

[Icon Theme]
Inherits=mate

Replace mate with whichever cursor theme you actually have installed. Common options include:

List available themes with:

ls /usr/share/icons/ | grep -i cursor

After editing the file, Qt applications need to restart to pick up the change. Log out and back in, or kill and restart the specific application.

Using environment variables

For a session-wide override without editing config files, set the XCURSOR_THEME environment variable:

export XCURSOR_THEME=mate
export XCURSOR_SIZE=24

Add these to ~/.bashrc or ~/.profile to make them persistent. The XCURSOR_SIZE variable controls cursor size (typically 24 or 32).

Qt configuration tools

If you’re running Qt 5 or Qt 6, you can also use qt5ct or qt6ct (available in most distributions’ package managers):

# Install the tool
sudo apt install qt5ct  # Debian/Ubuntu
sudo dnf install qt5-qtstyleplugins  # Fedora

# Run the configurator
qt5ct

This opens a GUI where you can set the cursor theme under the “Fonts & Colors” tab. Settings are saved to ~/.config/qt5ct/qt5ct.conf.

For this method to work, you may need to set:

export QT_QPA_PLATFORMTHEME=qt5ct

in your shell profile or desktop environment startup script.

Verifying the theme is applied

Check which theme Qt is currently using:

grep -A2 "\[Icon Theme\]" ~/.icons/default/index.theme

If you’re unsure which cursor theme looks best, preview them by changing the theme and testing a few Qt applications. GNOME/MATE users typically prefer matching their system theme, so Adwaita or mate work well depending on your desktop.

Troubleshooting

Cursors still look wrong after restart: Verify the theme name exists in /usr/share/icons/. Typos or removed themes will fall back to defaults.

No ~/.icons/default/ directory: Create it manually as shown above. Some distributions don’t set this up by default.

Qt 4 applications only: The legacy qtconfig-qt4 tool (package qt-config on older Fedora) can be used, but Qt 4 is obsolete. Upgrade to Qt 5/6 applications if possible.

2026 Best Practices and Advanced Techniques

For Qt Cursor Theme Support in GNOME and MATE, understanding both the fundamentals and modern practices ensures you can work efficiently and avoid common pitfalls. This guide extends the core article with practical advice for 2026 workflows.

Troubleshooting and Debugging

When issues arise, a systematic approach saves time. Start by checking logs for error messages or warnings. Test individual components in isolation before integrating them. Use verbose modes and debug flags to gather more information when standard output is not enough to diagnose the problem.

Performance Optimization

Security Considerations

Security should be built into workflows from the start. Use strong authentication methods, encrypt sensitive data in transit, and follow the principle of least privilege for access controls. Regular security audits and penetration testing help maintain system integrity.

These complementary tools expand your capabilities:

Integration with Modern Workflows

Consider automation and containerization for consistency across environments. Infrastructure as code tools enable reproducible deployments. CI/CD pipelines automate testing and deployment, reducing human error and speeding up delivery cycles.

Quick Reference

This extended guide covers the topic beyond the original article scope. For specialized needs, refer to official documentation or community resources. Practice in test environments before production deployment.

← All posts