I'm trying to setup a simple bash script. I want to open the browser.
chromium-browser <url>
works if I do it in the cli or in the bash script if I run the script by ./scrpt.
But if I put that script in crontab, which is what I really want I get.
(chromum:xxxx) : Gtk-WARNING **: cannot open display:
I added export DISPLAY=:1
and now I get Client is not authrized to connect to the Server (chromum:xxxx) : Gtk-WARNING **: cannot open display 1
I'm not sure if the export line is helpful or needed, but I was it suggested else where. Using 0 gives an error about protocol. Also other browsers cause errors too, ill use whatever browser. I've had the same issue with x-www-browser
DISPLAY=:1 xhost +
on the machine that it runs on. Whether that's a good idea is another question :)