Fallback on xrandr to get linux DPI info.

xdpyinfo is not always available on Linux (even with a DE), whereas
xrandr is (AFAICT) at least dependency of KDE and XFCE.  But xrandr
fails when used remotely, so keep it too.
Avoid `try/except` when possible. Is the problem that `xdpyinfo` is completely missing on some systems? If so, it would be cleaner to use the return code of `command -v xdpyinfo` to tell whether or not it's installed.