added check for xrandr; improved some checks