News for hackers. Stuff that matters.
Re:GNU Screen 5.0 Released by lloeki on Thursday August 29, 2024 @12:05PM (#41392257)
The one thing I hate about tmux is that it leaks env vars across instances:

    # terminal 1, start a fresh first tmux session, which magically spawns a daemon with the same env
    $ env FOO=bar tmux
    
    # terminal 2, start another tmux session, which reuses the daemon's env
    $ tmux
    $ echo $FOO
    bar
Try the same with `screen` and you're safe.

This is especially annoying when you're using, say, direnv, and project-specific env vars appear magically on an unrelated subsequent session because your first `tmux` turned out to be from a direnv-enabled directory, which polluted the global environment, which in turn pollutes every subsequent session environment as long as a session (not necessarily the original one) is alive.

Replace FOO with SOME_SECRET/ACCESS_KEY/TOKEN and you can actually accidentally expose/leak stuff or point to the wrong thing.

The unattended workaround is to have the tmux daemon spawn at login via `start-server` + enable some tmux settings like `exit-empty` plus some I can't recall regarding environment handling, but nobody does that.

Re:GNU Screen 5.0 Released by Arnavion on Thursday August 29, 2024 @01:17PM (#41393083)
You can start the server as a user session service if you have a service manager for that, like systemd, instead of needing to do it manually. For systemd specifically, tmux also supports socket activation for the server since some time ago, so you can do that to start it on-demand.
Re:GNU Screen 5.0 Released by rauhl on Thursday August 29, 2024 @02:03PM (#41393601)
> The unattended workaround is to have the tmux daemon spawn at login via `start-server` + enable some tmux settings like `exit-empty` plus some I can't recall regarding environment handling, but nobody does that.

I just have my terminal emulator spin up tmux when it starts, and I start my terminal emulator from my desktop, so it always runs in a clean environment.