Let’s discuss how you can find and change screen DPI in Linux distribution. This is the most common setting for users using i3 dynamic tiling window manager. For systems with higher resolution, the default DPI setting is often lower than the required setting. This means you may get blurry or small icons and fonts.

First, check your system resolution.

$ xdpyinfo | grep -B 2 resolution
screen #0:
dimensions: 1920x1080 pixels (508x285 millimeters)
resolution: 96x96 dots per inch

If you don’t have xdpyinfo command, it may need to be installed.

# Install xdpyinfo on Debian / Ubuntu
$ sudo apt -y install x11-utils

# Install xdpyinfo on Debian / Ubuntu
$ sudo pacman -S xorg-xdpyinfo

# Install xdpyinfo on CentOS / RHEL / Fedora
$ sudo yum -y install xorg-x11-utils

Once you have screen resolution of your system, visit http://dpi.lv/. or goodcalculators ppi calculator

generate dpi from resolution

Input your screen resolution and diagonal values. The pixels per inch will be auto-generated for your Computer with provided resolution values.

generate dpi from resolution goodcalculators

We can now set correct dots per inch (DPI) on ~/.Xresources file. The Xresources is a user-level configuration dotfile used to set X resources, which are configuration parameters for X client applications.

This is my DPI setting on the file.

Xft.dpi:   141

Load a resource file using:

$ xrdb ~/.Xresources

You can also load a resource file, and merge with the current settings:

$ xrdb -merge ~/.Xresources

To see the currently loaded resources:

$ xrdb -query -all

Your system display should now be fine for all Applications. You should not have to manually tweak scaling factor for high resolution displays.

Also check:

Configure i3pystatus on Linux

How to configure mpd and ncmpcpp on Linux

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here