What is the proper way to set DPI value now? gnome-tweak allows to set only scaling factor, which is unsatisfactory and also not all applications take that into account (Chrome for example).

I would like to pass "-dpi" flag to Xorg when it starts, but can't find a way to configure "lightdm" to do so. Is it possible?


In /etc/lightdm/lightdm.conf, you can override the xserver-command parameter (which usually defaults to simply "X"). Here is mine:

xserver-command=X -dpi 75

This has the intended effect of scaling my entire desktop, gnome programs included. Desktop effects are fine, no odd artifacts. It also sets the xdpyinfo, but xft.dpi must be set separately:

$ xdpyinfo|grep dots
  resolution:    75x75 dots per inch
$ xrdb -query|grep dpi
Xft.dpi:    96

See madmuffin's answer for how to set Xft.dpi appropriately.

  • I'm currently trying this on the Ubuntu 16.04 live cd, and it does not get taken into account. I don't reboot, I use service lightdm restart. Any ideas? – exhuma Jan 2 '17 at 7:50

There actually is a way:

Change this line in /etc/lightdm/unity-greeter.conf


to whatever fits your computer best.

Caution: It will break the desktops looks, some effects might not be avaliable. This is a bug in in Unity and will hopefully be fixed soon.

  • Thanks for pointing at this config, I wasn't aware of it. Nevertheless, it seems it sets only Xft.dpi resoure which I am not sure all modern applications are using.Xorg.0.log still reports "(==) intel(0): DPI set to (96, 96)", while when started with -dpi switch it reports the desired value - "(++) intel(0): DPI set to (142, 142)" – dilettant Nov 11 '11 at 10:34
  • Well, I gnome 3 applications seems to ignore Xft.dpi value, I still have to set font scaling manually, and that still doesn't work for all applications... Should be noted Windows has similar problems with hi-dpi screens... – dilettant Nov 11 '11 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.