Running GUI app in Cron

  1. In ~/.profile add these 2 lines:
    1. xhost +local:
    2. xhost
  2. Add env DISPLAY=:0 before cron command
    00 06 * * * env DISPLAY=:0 gui_appname

To run cron as root or anacron, add this to ~/.bashrc

xhost local:mpromber > /dev/null

Comments

Popular posts from this blog

Useful aliases

Enable Search Engine Friendly (Pretty URLs) in Yii2