※ 引述《suglwu.bbs@bbs.sayya.org (suglwu)》之銘言: : ※ 引述《mantour.bbs@ptt.cc (朱子)》之銘言: : > 試過了 重開機也沒用 : > 另外,除了LD_PRELOAD之外,我還設了其他變數 : > 怪的是其他變數都有出來,只有LD_PRELOAD出不來 : > 我想這應該證明了 kdm 確實有去讀這個檔案 : > 另外,如果我用commend line登入,再用startx進入kde的話,結果是OK的 : > 所以我才會覺得奇怪 : > 難不成 kdm 在讀 .profile時,會去過濾那些變數要export那些不要嗎? : 不知道 Kubuntu 是不是有什麼特別設計 : 但在 ubuntu default 應該是 ".bash_profile" 這個檔案 : 測試 : * 新增 export LD_PRELOAD="test" 到 .bash_profile : vi .bash_profile : export LD_PRELOAD="test" : * 重新 login 後 (這邊是利用 ssh login 而沒有重開機) : :~$ export |grep LD_PRELOAD : ERROR: ld.so: object 'test' from LD_PRELOAD cannot be preloaded: ignored. : declare -x LD_PRELOAD="test" 謝謝 不過這個我也試過了 不管是 .bash_profile , .bash_login 都試過了 system wide 的 /etc/profile , /etc/environment 也都試過了 都是一樣的情況 目前只有設在 .bashrc 的有效,但只對從konsole執行的程式有效 同一個程式如果從圖形介面開啟的話就不會受到LD_PRELOAD的影響 而這不是我想要的結果 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.213.158 ※ 編輯: mantour 來自: 140.112.213.158 (03/18 10:12)