從 /etc/profile 執行 xterm 腳本會導致“無法載入字體”

從 /etc/profile 執行 xterm 腳本會導致“無法載入字體”

我想自動啟動 shell 腳本,因此我將此行新增到我的/etc/profile

/bin/su -c "/path/to/my/script" user -

腳本本身啟動 xterm shell 命令並在自動啟動期間輸出以下錯誤:

xterm: cannot load font '-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1'

=> 如果我手動啟動 xterm 腳本,我沒有問題

我該如何解決這個問題?

答案1

新增腳本來~/.bash_profile解決我的問題。無需更改使用者。 (感謝@user2965433)


所以只需附加:

/path/to/my/script

發送至~/.bash_profile所需用戶。

相關內容