title: Error: Can't open display: (null) Failed creating new xdo instance on mac OS
body: <p>I looked at many answers on internet but no solutions helped.
  When I just do <code>open http://google.com</code> it works, my default browser is Google Chrome. I downloaded xdotool package via brew
  What I want to do is, to open the webpage(any webpage) and refresh it in every 10 seconds, I have the following code:</p>
  
  <pre><code>#!/bin/bash
  while true;
  do
      export DISPLAY=:0.0
      export XAUTHORITY=/home/dogaister/.Xauthority
      open  http://google.com
      xdotool key command+r
      sleep 10
  done
  </code></pre>
  
  <p>I also tried <code>DISPLAY=':0'</code> or <code>DISPLAY=':0.0'</code>, they didn't work either.</p>