I've installed Xubuntu 19.04, and to account for my laptop's screen resolution, in /etc/lightdm/lightdm.conf
I've added the line
xserver-command=X -dpi 166
The result is that XFCE panel, terminal and other GTK2 and GTK3 programs take on the correct font sizes (the same as if I had set Custom DPI setting in Appearance→Fonts to 166), but all the others like e.g. Yakuake still see 96 DPI. Moreover, if I try xdpyinfo
, I do get this 96 DPI:
$ xdpyinfo | grep dot
resolution: 96x96 dots per inch
Also, if I tick and untick back the Custom DPI setting option, the fonts shrink back in XFCE too (apparently, DPI gets re-queried from X server).
So I suspect that, during session startup, some entity changes the screen DPI setting as if by running xrandr --dpi 96
. If I manually run xrandr --dpi 166
, programs start behaving correctly.
I'd like to find out what exactly entity is doing this, so as to fix this at the core instead of adding post-startup workarounds. How can I find it?
Xft.dpi
and other workarounds). If you're NOT using multiple monitors with diverse resolutions, you can put this in your~/.xsession
or other startup script (depending on your config):xrandr --fbmm "$(xrandr | sed -n 's/.* \([0-9]*\)mm x \([0-9]*\)mm.*/\1x\2/p')"; xdpyinfo | sed -n 's/.*x\(.*\) dots per inch/Xft.dpi: \1/p' | xrdb -merge -nocpp
– mosvy Mar 19 '20 at 8:27startx /usr/bin/xterm -- -dpi 166
, as well as by the default font sizes in XFCE). It's just some bad X client that resets it to 96. – Ruslan Mar 19 '20 at 8:37Xft.dpi
, which they assume that it "should" be 96 dpi if not set. – mosvy Mar 19 '20 at 8:40xrdb -merge -nocpp <<< 'Xft.dpi: 166'
results in Yakuake having larger fonts afterxfce4-session
is run, butxdpyinfo
still outputs the reset value of 96, and ticking&unticking Custom DPI setting in XFCE Appearance dialog still shrinks XFCE fonts. Same with the case when I forcexrandr --fbmm
as you suggested. – Ruslan Mar 19 '20 at 9:13