我試圖獲得一個簡單的.sh腳本,在請求用戶輸入後運行一組X應用程序的windowmaker下運行。我所有的嘗試都是徒勞的;終端窗口在提問後蒸發,應用程序根本無法運行。我試圖通過在X控制檯上鍵入它的路徑來運行這個腳本,並且它完美地工作,但是當我運行該圖標時它不會。在windowmaker下使用腳本運行圖形應用程序
這些是我的2次嘗試;
echo "this or that? [a, b] "
read input
if [[ $input == "a" || $input == "A" ]]; then
/path/to/app1 "/file/to/open" &
/path/to/app2 "/file/to/open" &
/path/to/app3 "/file/to/open" &
path/to/app4 &
else
/path/to/app5 "/file/to/open" &
/path/to/app6 "/file/to/open" &
/path/to/app7 "/file/to/open" &
path/to/app8 &
fi
read -p "this or that? [a, b] " doit
case $doit in
a|A)
/path/to/app1 "/file/to/open" &
/path/to/app2 "/file/to/open" &
/path/to/app3 "/file/to/open" &
path/to/app4 &
b|B)
/path/to/app5 "/file/to/open" &
/path/to/app6 "/file/to/open" &
/path/to/app7 "/file/to/open" &
path/to/app8 &
;;
esac
在WindowMaker的設置,我創建了一個運行的xterm -e 「/path/to/script.sh」 的圖標。我不知道還有什麼要做。我希望有人能幫助我。提前致謝。
你會得到什麼樣的錯誤? –