簡體   English   中英

“無法執行子進程(沒有此類文件或目錄)”

[英]“Failed to execute child process (no such file or directory)”

我試圖綁定一個命令來運行腳本到openbox WM中的某個鍵,我使用以下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`  

我希望能夠做更多的事情。 這是一個測試腳本。 該腳本將按預期從終端運行。 這可能是什么問題?

通過在綁定openbox中的密鑰時刪除bash可以解決此問題。 openbox進程運行腳本,腳本中提供的shebang調用相應的解釋器本身。

首先,請確保bash和腳本均具有正確的路徑。

$ which bash
$ ls /home/bibek/test.sh

which bash返回的路徑應在您的shebang和/或openbox wm中的腳本中。 如果收到“找不到命令”,則需要修復$ PATH變量。

第一行應該是#!/ usr / bin,而不是#!/ usr / bin /。 那“ /”是個問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM