I see that $display is set to localhost:0,0 if i am running over a vnc server this may not be correct, is there a way to automatically set it in my login script? do you use Bash? Go to the file .bashrc in your home directory and set the variable, then export it. DISPLAY=localhost:0.0 ; export DISPLAY you can use /etc/bashrc if you want to do it for all the users. You may also want to look in ~/.bash_profile and /etc/profile EDIT:
Linux Display环境变量介绍: http://wenku.baidu.com/view/4c6d1852f01dc281e53af0bd.html http://wenku.baidu.com/view/4e953bfb04a1b0717fd5dd7a.html |
|
来自: Harrison.Ding > 《Linux》