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.
They might fail if the command generates something unexpected (I have had exactly this problem parsing xrandr output in the past).