求助:放在/etc/init.d/下的脚本不能自动执行
Tofloor
poster avatar
lo******11@sina.com
deepin
2017-10-04 19:36
Author
我在/etc/init.d/目录下放一个脚本,但是没有自动执行,在deepin要如何才能让脚本开机后自动执行?谢谢!!
Reply Favorite View the author
All Replies
avatar
zouqilin
deepin
2017-10-04 19:58
#1
rc.local中调用你的脚本  init.d目录下的脚本一般针对是服务
Reply View the author
avatar
lo******11@sina.com
deepin
2017-10-04 20:09
#2
找到了,要在/etc/rc2.d/下创建软连接。 sudo ln -s /etc/init.d/demo.sh ./demo.sh ,测试后,正常启动了。谢谢大家 。
Reply View the author
avatar
Lyvnee
deepin
2017-10-04 20:15
#3
开机后在桌面新建一个文档,可以这么干
  1. mkdir ~/.xsessionrc   ##建立
  2. echo "touch ~/Desktop/startup.txt" > ~/.xsessionrc  ##写入
Copy the Code

Reply View the author
avatar
herdde
deepin
2017-10-04 20:25
#4
shell 脚本-深度科技论坛|深度操作系统正在为全世界的电脑提供强劲动力! https://bbs.deepin.org/post/143522
Reply View the author