I'm trying to create a background bash script which creates a popup in certain circumstances, however, my code only works when run manually in a terminal (e.g. not in the background). I've tried various things such as:
screen env DISPLAY=:0.0 su $USER -c 'zenity --warning --text "Warning message here"' Or
screen zenity --warning --text "Warning message here" I've spent hours trying various different things, and I feel like there must be a simple solution and I'm just missing something.
Nothing I've tried works while the script is run in the background with cron.
I'm running Lubuntu 12.04, LXDE.
Any ideas to why I can't get it working?