Re: [SLE] how to export a variable when in xterm (in bash script in xterm)

On Sat, 17 Aug 2002 15:05:21 +0200
Thus a global variable in a xterm console is not the same global variable in console mode with the same user.
Thus how to uniformize all these environments and have them talk the same language.
You have a misconception about what a global variable is. First each console and xterm has it's own global variables. They default to those in .bashrc, so it seems they are the same, but each one is separate. If you change one, it does not affect the others. If you want to export a variable so that all consoles and xterms see it, you can write it to .bashrc,(or some file) then every NEW console or xterm will see the variable; BUT the existing consoles and xterms WILL NOT see it, unless you type "source .bashrc" in them, OR you kill and restart them. There is no way you can make variables totally global between xterms and consoles, otherwise 1 program would have the ability to screw up other programs......it would be choas. -- use Perl; #powerful programmable prestidigitation
participants (1)
-
zentara