3 ms·
I agree that it is more sane and predictable. I'm pretty happy with this behaviour and being able to tweak it if I need more.
by isaacremuant 4y ago
I agree that it is more sane and predictable.
I'm pretty happy with this behaviour and being able to tweak it if I need more.
- kelnos 4y agoHow is that "predictable"? The standard behavior for more or less everything is that, by default, when you run a process, it will get its environment from the parent process. Getting its environment from a magical hidden server process that a casual user may not even know about is the opposite of "predictable".
- em-bee 4y agoit's not magical or hidden. every invocation of tmux is a call to a running tmux server. the only exception is when no server is running, in which case a new one is started. i have tmux running all the time. started once when i connect to a server for the first time, it keeps running until the server is rebooted. i have tmux sessions that go back years. the only time the environment is causing me trouble is when a new ssh connection is forwarding an ssh agent, which doesn't get transferred into the tmux session when i attach. but screen would not help here either. if you connect to an existing screen session it has the same problem. we really want a way to adjust the environment for specific variables on attach.
- joshuaissac 4y agoIf you run an SSH client process to connect to an SSH server, the resulting SSH session will not inherit the environment from the parent process of the client by default. Although not the same, connecting to a tmux server is more similar to that than starting a regular child shell.