3

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.

rem
  • 893
  • 4
  • 18
  • "but nothing happens" what do you expect to happen? Try `xdpyinfo | grep resolution`. – n. m. could be an AI Oct 02 '16 at 12:05
  • See edit, I want to change dpi from 90 to 180. I don't have xdpyinfo installed, but `xrdb -query | grep dpi` returns `+Xft.dpi: 180 \n Xft.dip: 90` – rem Oct 02 '16 at 13:01
  • The edit is rather puzzling. It is clear you have tried to change the parameter from some value to some other value. What kind of effects do you expect from this change? Also note that xrdb queries the resource database which may contain arbitrary string placed there by arbitrary programs before the attempted change. – n. m. could be an AI Oct 02 '16 at 13:50
  • Does it make more sense now? I realize I was mixing dpi and resolution. – rem Oct 02 '16 at 14:02
  • 1
    I think this question is actually offtopic here, being not directly connected with programming. – n. m. could be an AI Oct 02 '16 at 14:06
  • You are right, I forgot there's Unix/Linux stackexchange. – rem Oct 02 '16 at 14:58

1 Answers1

1

After changing the DPI via that setting, programs won't necessarily immediately react to it.

You may need to re-open certain applications to see the change.

Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286