Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
FYI - similar launchpad bug: – fossfreedom Nov 2 '11 at 19:25
@dilettant Does the posted answer work for you? – Jorge Castro Nov 8 '11 at 10:53
Thanks for link to the bug. – dilettant Nov 11 '11 at 10:35
up vote 1 down vote accepted

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.

share|improve this answer
Thanks. Precise answer. – dilettant Nov 15 '11 at 13:15

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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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