求助,没有rc.local文件怎么弄启动脚本啊
deepin吧
全部回复
仅看楼主
level 8
萌新想在每次开机的时候执行几条命令,不懂怎么做了[乖]
2017年12月03日 02点12分 1
level 7
去deepin论坛搜一下
2017年12月03日 13点12分 2
level 5
由于现在debian发行版本已换systemd作为init程序,以前的方法已经不行。我上网搜了下,还是可以自己写rc.local文件,不过要编辑下rc-local.service文件,还需要使用systemctl enable rc-local.service
systemctl --system daemon-reload
systemctl start rc-local.service
这三条命令使得rc-local服务可开机运行以及运行,然后rc.local文件就可以正常使用了。另外rc.local文件加个可执行权限就好了。
2017年12月12日 19点12分 3
谢谢了,我试试看
2017年12月13日 11点12分
level 2
写个脚本命名a.sh,再写个a.desktop文件,把a.desktop放在~/.local/autostart目录下,就能开机自动运行了
2022年07月31日 12点07分 4
1