I expect xrandr --dpi 180 to change the dpi from 90 to 180 on the fly per-session and thus downscale resolution, but nothing happens. Am I missing something? I was able to change the dpi with the silly hack of adding fonts.fontconfig.dpi=180 to /etc/nixos/configuration.nix then nixos-rebuild test, which is less than ideal.

To be very clear, here's my situation: 1. the default resolution is too low for my laptop screen and everything (fonts) looks painfully small. 2. I learned adding fonts.fontconfig.dpi=180 to /etc/nixos/configuration.nix on nixos can set the dpi to 180 from the default 96 so that everything has normal size (fonts). 3. However, I now sometimes open the vm on a monitor which has lower resolution than my laptop, and I'd like to change the dpi on the fly when switching between using the laptop screen and the monitor.

  • How is your monitor connected? With DisplayPort you can not change resolution, and can not change DPI on the fly. Commented Oct 2, 2016 at 19:39
  • Rather than reposting your question from SO, you should have asked a moderator to migrate it ;)
    – Zimm i48
    Commented Oct 2, 2016 at 20:01
  • @BarafuAlbino It's shown as VGA-0 in virtualbox and the physical connection is mini display port dongled to HDMI. I was able to do xrandr --output VGA-0 --scale 2x2 to scale down everything, but that has the strange bug of partially freezing X11...
    – rem
    Commented Oct 2, 2016 at 22:27

1 Answer 1


Setting custom DPI in xfce4-appearance-settings always seemed to work fine for me. I've never tried another way.

  • 1
    Any idea how xfce handles it? I'm using xmonad
    – rem
    Commented Dec 4, 2016 at 3:08
  • Incidentally, I use xmonad in an xfce session. IIRC for some X changes to apply "as one expects", one needs a daemon - in Xfce this is filled by xfsettingsd. Commented Dec 5, 2016 at 8:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .