参考文档:
https://help.ubuntu.com/community/EnvironmentVariables
.bashrc里设置环境变量的方法在图形程序中不起作用,查询文档后发现需要这样做:
~/.profile
In this file you can also place environment variable assignments, since it gets executed automatically by the DisplayManager during the start-up process desktop session as well as by the login shell when one logs in from the textual console. This is a ~/.profile equivalent of the above example:
export FOO=bar export PATH="$PATH:$HOME/MyPrograms"