0

我曾经pyinstaller使我的脚本可执行,现在我希望它在每次登录/启动时运行。gnome 调整工具没有列出我的可执行文件。我怎样才能做到这一点?

4

1 回答 1

1

你在这里问3个问题。启动和登录不一样。

1) 要在登录时运行脚本,您可以将其添加到 .bash_profile(用户主目录中的隐藏文件): https ://ask.fedoraproject.org/en/question/35263/execute-shell-script-at-登录/

2)要让脚本在启动(启动)时运行,您可以选择创建一个 /etc/rc.local 文件(https://ask.fedoraproject.org/en/question/26898/what-is-the-auto- start-file-like-rclocal/
确保它是可执行的:

chmod +x /etc/rc.local

启用服务:

systemctl enable rc-local.service

3)运行'gnome-session-properties'并在那里添加你的脚本。

于 2016-10-31T18:55:46.030 回答