我正在尝试使用CentOS上的upstart脚本启动GUI应用程序。我的测试脚本位于/ etc / init /文件夹中。
start on desktop-session-start
stop on desktop-shutdown
respawn
script
export DISPLAY=:0
sleep 5
exec /.1/Projects/UpstartTest/start.sh &
end script
start.sh脚本正在为GUI应用程序运行二进制文件。
重新启动我的计算机后。当我输入时:
[root@mg-CentOS ~]# initctl status test
test stop/waiting
因此,我的暴发户不是runnig。当我键入
初始化测试
手动它可以正常工作,没有任何问题。
用户登录(桌面启动)后如何运行此upstart脚本?我正在尝试查找有关CentOS的详细文档,但没有。
在centos 7上,用于gnome-session-properties
在GUI中进行编辑:
这将在中添加.desktop
文件~/.config/autostart/
。您也可以.desktop
自己复制文件。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句