Linux 如何解决[export display=:0]redhat?

Linux 如何解决[export display=:0]redhat?,linux,crontab,redhat,gnome-terminal,Linux,Crontab,Redhat,Gnome Terminal,我有一个shell脚本,需要在前台定期运行,因此我尝试将crontab与使用以下语法从中生成新的终端窗口的功能结合起来: export DISPLAY=:0 && /usr/bin/gnome-terminal -e "test.sh" 其中test.sh是我要执行的shell脚本请尝试以下操作:

我有一个shell脚本,需要在前台定期运行,因此我尝试将crontab与使用以下语法从中生成新的终端窗口的功能结合起来:

export DISPLAY=:0 && /usr/bin/gnome-terminal -e "test.sh"
其中test.sh是我要执行的shell脚本

请尝试以下操作: