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. – Barafu Albino Oct 2 '16 at 19:39
  • Rather than reposting your question from SO, you should have asked a moderator to migrate it ;) – Zimm i48 Oct 2 '16 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 Oct 2 '16 at 22:27

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

  • Any idea how xfce handles it? I'm using xmonad – rem Dec 4 '16 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. – Vladimír Čunát Dec 5 '16 at 8:18

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.