ubuntu18进入桌面后执行自定义的脚本(开机自启动)

mkdir -p ~/.config/autostart

cat >~/.config/autostart/run.desktop <<END
[Desktop Entry]
Type=Application
Name=StartupScript
Exec=你要执行的脚本的完整路径
Path=如果你的脚本需要设置启动目录,在这里设置
Terminal=true
X-GNOME-Autostart-enabled=true
END

chmod +x ~/.config/autostart/run.desktop
gio set ~/.config/autostart/run.desktop metadata::trusted yes

posted @ 2021-05-19 18:08  一只羊JAS  阅读(575)  评论(0编辑  收藏  举报