Work with 4k screens on linux
Created on July 3, 2026
linux, x11
You can set Xft.dpi: 144 in ~/.Xresources and reload with xrdb -merge ~/.Xresources.
- 96 dpi -> 100% zoom
- 120 dpi -> 125% zoom
- 144 dpi -> 150% zoom
You can set other values (like 130, 150, etc.), but sticking to these multiples of 96 tends to give cleaner UI/icon rendering because many assets are designed around those step sizes.
xrdb -query shows your current configuration. e.g. with xrdb -query | grep dpi you can find out the current dpi setting.
❯ xrdb -query | grep dpi
Xft.dpi: 96
Xft.antialias, Xft.hinting, Xft.hintstyle control the quality of the glyph rasterization: whether fonts are smoothed, how much hinting is applied, and the trade‑offs between sharpness vs. blur.
Xft.antialias: true
Xft.hinting: true
Xft.hintstyle: hintslight