Shell脚本可以';登录时启动时找不到其他文件(Debian Linux)
因此,我有一个通过rc.local登录时启动的脚本。该脚本调用一些其他脚本来启动和运行。但是,控制台说找不到文件和/或目录。当我在登录后手动运行脚本时,它工作正常。我甚至尝试添加一个小延迟,以便知道系统已登录。你知道为什么会这样,怎么解决吗 如果我的回答有点模糊,很抱歉,但据我所知,脚本需要通过管理员权限运行。让我详细说明一下,当系统启动时,它运行一组特定的脚本,这在不同的发行版中是不同的。因此,我要检查Shell脚本可以';登录时启动时找不到其他文件(Debian Linux),linux,shell,raspberry-pi,Linux,Shell,Raspberry Pi,因此,我有一个通过rc.local登录时启动的脚本。该脚本调用一些其他脚本来启动和运行。但是,控制台说找不到文件和/或目录。当我在登录后手动运行脚本时,它工作正常。我甚至尝试添加一个小延迟,以便知道系统已登录。你知道为什么会这样,怎么解决吗 如果我的回答有点模糊,很抱歉,但据我所知,脚本需要通过管理员权限运行。让我详细说明一下,当系统启动时,它运行一组特定的脚本,这在不同的发行版中是不同的。因此,我要检查~/.bashrc/etc/profile.d,最重要的是~/.bash\u登录。看看你能在
~/.bashrc
/etc/profile.d
,最重要的是~/.bash\u登录
。看看你能在那里做些什么。我个人在这里添加了它。~/.config/autostart
运行良好。不要忘记创建一个.desktop
文件
希望这有帮助