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.
The two errors are `OSError` from `xdpyinfo` (arguably recent Python3's do better here as you can catch the much more specific `FileNotFoundError`, which can really only come from the command not being there) and `AttributeError`, which comes from trying to get `groups()` on a non-match (i.e., `None`).  Arguably, best would probably be:
```
try:
    out, _ = run_subprocess(["xdpyinfo"])
    match = re.search(...)
    if match:
        x_dpi, y_dpi = ...
        return ...
except (OSError, CalledProcessError):
    pass
# <repeat same code for xrandr here>
raise RuntimeError("...")
```