Obtain the variable in bash.

Chris Angelico rosuav at gmail.com
Wed Mar 23 04:45:08 EDT 2016


On Wed, Mar 23, 2016 at 7:35 PM, Hongyi Zhao <hongyi.zhao at gmail.com> wrote:
>> My guess is that you started the IDEs from your GUI in some way (the
>> Applications menu or something). If that's the case, they'll inherit
>> their environment from your GUI. You _may_ be able to have them "notice"
>> your change to .bashrc by logging out and in again, or rebooting; it
>> depends how your system is configured.
>
> I tried and find that I must set the variable in .profile file, instead
> of .bashrc, in order to let the IDEs started from my GUI to recognize
> them after I logged out and in again.

Yep, that would do it! Sometimes your GUI will be started from an
interactive shell (or one that thinks it's interactive), in which case
.bashrc will be processed, but in your case, .profile is the solution.

ChrisA



More information about the Python-list mailing list