Having just got a 4K monitor - Wow! Text looks so much clearer! Unfortunately (as of 2018), some applications do not scale well so they appear really tiny. This topic is to offer workarounds to get applications to work. This assumes you are comfortable with the terminal.
To make changes persistent, use the Main Menu tool to modify the application's launcher.
General Tips
- For GTK+ applications, check to see if it has a GTK3 build.
- GTK2 applications have no chance of scaling by themselves, such as GIMP, etc.
- Some apps can be scaled using an environment variable or parameter.
- To tell what the toolkit of an application is, take a look at its dependencies:
apt-cache show [package]
How do I enable HiDPI for the MATE Desktop?
Starting from 18.04, you'll be able to turn on HiDPI from MATE Tweak.
What is discussed here can also apply to other distributions - such as Arch, where MATE is the desktop environment.
Spotify
Spotify doesn't auto-detect scaling properly, but fear not, you can manually specify this.
spotify --force-device-scale-factor=2
Steam
Update to the beta version of the Steam client, as this supports HiDPI as of 25th January 2018.
Qt Applications
Like VirtualBox, Git Cola and KeePassXC.
QT_SCREEN_SCALE_FACTORS=2 <application>
To set this permanently for all Qt apps, add this to /etc/environment
(as sudo) or ~/.bash_aliases
(in your home directory):
export QT_SCREEN_SCALE_FACTORS=2
GTK3 Applications
This shouldn't be necessary when turning on HiDPI in MATE Tweak. For 2x scaling for 2160p (4K), set the environment variables like so:
export GDK_SCALE=2
export GDK_DPI_SCALE=0.5
Wine Applications
- Open
winecfg
- Under the "Graphics" tab, set the DPI to 192.
- Save. The Wine applications will scale accordingly on next launch.
Older games
If the game was built around a time where HiDPI was not a thing, like during the 2000s, then you may be out of luck. Unless there is a modification, the best approach is to set the resolution to 1080p or lower.
If this needs to be automated as part of a script, use xrandr
:
#!/bin/bash
xrandr -s 1920x1080
/path/to/executable
xrandr -s 3840x2160
Scaling any application
If all else fails, there is a project that can scale anything by spawning a new session using X.org (the display server).
The downsides is that the scaled app may appear or feel a little blurry to the rest of the desktop.
Media keys may not work (like for audio players); themes & mouse pointers can be inconsistent and 3D acceleration may suffer in performance.
Instructions
-
Download the
run_scaled.sh
script. -
Install its dependencies and move the script system-wide:
chmod +x run_scaled.sh sudo mv ./run_scaled.sh /usr/bin/run_scaled sudo apt install xvfb xpra xrandr
-
To use, simply prepend
run_scaled
to your command. There are optional parameters to specify scale.run_scaled <application>