Re:Be Careful Using Tmux and Environment Variables
by CoolCold on Sunday March 05, 2023 @07:09AM
(#35028897)
I've found for myself that it better start tmux/screen session on server up on login and don't spend time thinking on per case basis. So 95% on ssh sessions I use run tmux inside and usually the first command after ssh login is tmux attach. 5% cases are exception when no tmux/screen available or cannot copy my own tmux.conf
Other posters are right that the "correct" workflow is to set all your environment variables explicitly within the session before launching whatever process you're running, but on an ad-hoc basis, I've often found myself logged into a server and thinking "this may take a long time, I should run this in a tmux session," and this kind of behavior would have (and probably has) bitten me in that case.