Skip to main content
3 of 3
Commonmark migration

-dpi sets the resolution (in dots per inch, aka pixels per inch or 25.4 x pixels/mm).

You don't see any difference because most programs ignore the resolution reported by the X11 server (which is most of the time unreliable), or simply do everything in pixels.

You can easily check by running xdpyinfo on the Xephyr display:

$ Xephyr -dpi 20 :1 & $ xdpyinfo -display :1 | grep resolution resolution: 20x20 dots per inch $ Xephyr -dpi 177 :2 & $ xdpyinfo -display :2 | grep resolution resolution: 177x177 dots per inch 

BTW, if you want to get the real size of a monitor in an X11 app, you should get via RandR, but xrandr reports 0 x 0 on Xephyr:

 $ xrandr -display :2 | grep connected xrandr: Failed to get size of gamma for output default default connected 640x480+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 
user313992