Instead of ~/.profile, try ~/.zshrc instead; or ~/.bash_profile.
If I recall, the difference between ~/.zshrc and ~/.bash_profile is that ~/.bash_profile is executed at every login session, and ~/.zshrc only when a shell is initialised.
Please, try to confirm this as I’m not 100% certain. That said, a few tests of the theory should suffice.
Cheers.
You might also consider switching to bash as the default shell. There are a few guides for this somewhere.
I need my variables set before I open any terminal, so files such as ~/.zshrc wont help me, as indeed they run whenever you open a terminal.
I think ~/.bash_profile would run at login if you are using bash as your shell, which I’m not.
I originally thought the problem was that ~/.profile was not being run at login, but I’ve since verified that it is being run, but the particular setting I’ve added in are not being persisted. I’ll update the name of my other thread accordingly.
I use KDE (currently with ZSH but my default is BASH) and don’t have a ~/.profile at all. My assumption was that ~/.profile would be effectively the same as ~/.bash_profile.
Perhaps that was a wrong assumption if indeed variables contained within it are not being made available.
As the original thread remains open it might have been best to keep this contained there. Let’s see if any @Moderators consider it worth moving some of these posts.
Hi @toby1kenobi and welcome to the Manjaro community.
As a new forum user, please take some time to familiarise yourself with Forum requirements; in particular, the many ways to use the forum to your benefit:
To that end, some or all of these links may be invaluable:
@soundofthunder you’re right I should have stayed on the original thread. I started a new one because I genuinely believed I had found a different issue while I was trying to fix the first one, but it was just my misunderstanding about export
However, it doesn’t end my confusion about why it doesn’t work in .profile. I suspect that a script from the installation of Flatpack is clobbering the values already in the environment variable.