📜 ⬆️ ⬇️

Linux GUI Setup for High DPI Monitors

Recently, quite a lot of high-resolution monitors have appeared, 150 dbi and higher, especially in laptops. And while it looks terribly small.
The reason for this is that the system thinks that your monitor has a resolution of 96..100 dpi.
To solve this only by increasing the font size is wrong, because the dimensions of all the other elements of the interface remain small. It is necessary that the graphical shell itself does this.

I had to rummage on the Internet for a very long time to solve this problem, collecting small notes, since there was no place where it could be seen all together.

Below will be a list of where to fix something, I’ll quote all the parameters for my monitor - 13.3 "at 2560x1600, this gives 226 dpi. Now I only saw a higher resolution in the Fujistu U904 laptop - 262 dpi.

Monitor settings: in xorg.conf in the monitor settings add:
Option "DPI" "226 x 226"
or
DisplaySize 286 179 # is the same, but the screen size is in millimeters
If you do not have xorg.conf and you have only 1 monitor, you can set this to the default monitor. To do this, the xorg.conf.d / 90-monitor.conf file is created in the X configuration directory with the following contents:
 Section "Monitor"
     Identifier "<default monitor>"
     Option "DPI" "226 x 226"
 Endsection

')
In the X startup keys, you need to add -dpi 226, in kdm this is the string of the ServerArgsLocal parameter

For fonts in / etc / X11 / Xresourse or ~ / .Xresourse:
Xft.dpi 96 replaced by 226

After restarting the lawsuits, you can verify that this has taken effect:
- in the X log, there should be such lines /var/log/Xorg.0.log
intel (0): clock: 268.5 MHz Image Size: 286 x 179 mm
intel (0): DPI set to (226, 226)
- xdpyinfo | grep -B2 resolution
screen # 0:
dimensions: 2560x1600 pixels (287x179 millimeters)
resolution: 227x227 dots per inch
- xrdb -query | grep dpi
Xft.dpi: 226

But there are a lot of programs and GUI that do not look at the parameters of X. Therefore, we continue.

For KDE: System Parameters => Basic Appearance Settings => Fonts => Use a different DPI: 226.
But the icons will have to be increased separately: System Parameters => Basic Appearance Parameters => Icons, Advanced tab.

For Gnome: in gconf I’ll write to / desktop / gnome / font_rendering / dpi (I don’t know if I need something else additionally, since I don’t use the Dwarf).

For Firefox: in about: config: layout.css.PixelsPerPx = 2.26, layout.css.dpi = 226.
But often, the browser does not need a 100% match, so I myself, for more on the screen prescribed layout.css.PixelsPerPx = 2. Although firefox gives the most accurate picture at 100 dpi, but it uses odd scaling of bitmap images. First, the inside gets an image that would have to be at 100 dpi, and then stretches 2 times. Because of this, the pictures are soapy, even if they are high resolution.

For Opera: it is enough to install 200% mastabbing - the opera does it quite correctly.

For Chrome, in chrome: // flags / there is a “High Resolution Mode” option, but for linux it is not available. Therefore, it remains only to put 200% and "very large" font size. Unfortunately, this does not affect flash.
But I put 120% on it and use it to view maps (maps.yandex.ru, maps.google.com) for high-level details.

Konqueror does not understand high dpi yet, and it scales incorrectly, although akregator, using the same engine, shows everything correctly without additional instructions.

Check that your dpi is correctly understood by the system by opening an A4 page in an office program, such as OpenOffice, and attaching a paper sheet at 100% zoom. If everything works correctly, the sizes will match.
Also in OpenOffice in the settings you should put the size of the icons "large".

After all the settings, there were conflicts of hard-coded raster images and enlarged fonts.
I saw this in kdm and in Opera: you can work, but it doesn’t look very nice - the edges of the letters crawl over the fields for the inscriptions. Therefore, in Xresourse I replaced 226 with 175. (In general, it is strange that opera, reading the dpi size for menus and other inscriptions, does not use the same dpi for displaying the html page).

PS It was originally collected only for myself here , but it turned out that now many people have such a question. I would be glad if there will be any constructive additions.

Source: https://habr.com/ru/post/233551/


All Articles