~/.bashrc doesn’t approach - “I need to save value of some variable during the session”, but bashrc works only for current terminal (?)
~/.profile hmm… it is necessary to check
.bashrc is sourced whenever a new shell is started.
Yes, it only “works” for children of this shell process. But that’s the same for ~/.profile or ~/.bash_profile.
The only difference is that ~/.profile or ~/.bash_profile is only run when a new login shell is started, whereas .bashrc is run for every new shell.
Anyway, as I verified meanwhile, ~/.bash_profile should work fine.
Your problem is indeed likely because you set the variable in a subprocess.
hcvv, Ok If to speak simply, I’m making a replacement for gnome-keyring. Therefore value (it is the password) shall be kept only in memory. That’s all))