Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Fix vlc ui scaling problems

Vlc disable hidpi scaling

tl;dr

Set the environment variables:

export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCREEN_SCALE_FACTORS=1

The story

I am testing Fluxbox on Devuan on a physical system (instead of just a VM) with two monitors. I discovered that on one monitor, the ui for vlc is scaled way wrong. For my left monitor, the buttons are way larger than they should be. VLC with large buttons and normal
menus And on the other monitor, the buttons were normal-sized, but the menus and other text widgets were way too small. VLC with normal buttons and tiny
menus When I set the environment variables as described above, vlc appears in the correct scaling. At one point, I had some OS or DE installed that showed that my system viewed the left monitor (HDMI-connected) as a 7" screen with 1920x1080 resolution, which is why the scaling on the left side was messed up. VLC with normal buttons and
menus Not only did I add those variable exports to my ~/.fluxbox/startup file, I also wrote a wrapper for vlc as /usr/local/bin/vlc

1
2
#!/bin/sh
QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCREEN_SCALE_FACTORS=1 /usr/bin/vlc

I was not aware that VLC was a QT program. But, after setting some environment variables,

References

Weblinks

  1. How to Enable hiDPI Scaling? - The VideoLAN Forums

Internet searches

  1. vlc disable hidpi scaling

Comments