"Failed to execute child process (no such file or directory)"
"Failed to execute child process (no such file or directory)"
我正在尝试将命令绑定到 运行 将脚本绑定到 openbox 中的某个键 WM.I 使用以下 xml 行:
.
.
<keybind key="W-t">
<action name="Execute">
<command>"bash /home/bibek/test.sh"</command>
</action>
</keybind>
.
当我尝试使用指定的组合键调用命令时,我收到一个弹出窗口,其中包含错误消息:
Failed to execute child process "bash /home/bibek/test.sh" (no such file or directory)
这就是 ~/test.sh
的样子:
#!/usr/bin/env bash
audacious & exit`
显然我希望能够做更多的事情;这是一个测试脚本。
脚本 运行s 正如终端预期的那样。
这可能是什么问题?
首先确保 bash
和您的脚本都有正确的路径。
$ which bash
$ ls /home/bibek/test.sh
从 which bash
返回的路径应该在您的 shebang and/or 在 openbox wm 的脚本中。如果你得到 'command not found',那么你需要修复你的 $PATH 变量。
这可以通过在绑定 openbox 中的密钥时删除 bash
来解决。 openbox 进程运行脚本,脚本中提供的 shebang 调用相应的解释器本身。
第一行应该是 #!/usr/bin
,而不是 #!/usr/bin/
。那/
也是个问题
我正在尝试将命令绑定到 运行 将脚本绑定到 openbox 中的某个键 WM.I 使用以下 xml 行:
.
.
<keybind key="W-t">
<action name="Execute">
<command>"bash /home/bibek/test.sh"</command>
</action>
</keybind>
.
当我尝试使用指定的组合键调用命令时,我收到一个弹出窗口,其中包含错误消息:
Failed to execute child process "bash /home/bibek/test.sh" (no such file or directory)
这就是 ~/test.sh
的样子:
#!/usr/bin/env bash
audacious & exit`
显然我希望能够做更多的事情;这是一个测试脚本。 脚本 运行s 正如终端预期的那样。 这可能是什么问题?
首先确保 bash
和您的脚本都有正确的路径。
$ which bash
$ ls /home/bibek/test.sh
从 which bash
返回的路径应该在您的 shebang and/or 在 openbox wm 的脚本中。如果你得到 'command not found',那么你需要修复你的 $PATH 变量。
这可以通过在绑定 openbox 中的密钥时删除 bash
来解决。 openbox 进程运行脚本,脚本中提供的 shebang 调用相应的解释器本身。
第一行应该是 #!/usr/bin
,而不是 #!/usr/bin/
。那/
也是个问题