Scale QT Apps for HiDPI

Updated: In Code

Most of Ubuntu/GNOME scale nicely with a high dpi (hidpi) display, there has been built-in support since 19.04 and now fractional scaling is just a simple toggle away in the latest 20.04.

I use a 4K external monitor so a 150% scaling works great, however, not for all apps. Zoom is the most common app that appears really small on my hidpi display.

Zoom is written using the QT toolkit, that does not inherent the scaling setting from GNOME. You can fix this by setting an environment variable prior to running Zoom.

Starting Zoom like this fixes it:

QT_SCALE_FACTOR=2 zoom

If you do not want to start Zoom from the command-line, you can edit the desktop file that launches zoom. This can be found at:

/usr/share/applications/Zoom.desktop

You need to edit the Exec line and add an additional env to the start. So the final line in the desktop entry looks like:

Exec=env QT_SCALE_FACTOR=2 /usr/bin/zoom %U

With that in place, each time launching Zoom I get it scaled properly. Here’s the entire desktop entry for reference:

[Desktop Entry]
Name=Zoom
Comment=Zoom Video Conference
Exec=env QT_SCALE_FACTOR=2 /usr/bin/zoom %U
Icon=Zoom.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Network;Application;
StartupWMClass=Zoom
MimeType=x-scheme-handler/zoommtg;x-scheme-handler/zoomus;x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/zoomphonecall;application/x-zoom
X-KDE-Protocols=zoommtg;zoomus;tel;callto;zoomphonecall;
Name[en_US]=Zoom

Now, who can help me with Gimp?

Leave a Reply