News for hackers. Stuff that matters.
Re:You might not need tmux by JdeBP on Friday August 01, 2025 @06:41AM (#44755081)
> if you do not set TERM with tmux properly, your colors will render incorrectly

This is of course true of every other terminal emulator as well, and indeed it's not only colours that are incorrect. Function and editing keys get recognized incorrectly; REP can get used where it does not work; and even simple relative cursor motions can be done wrongly.

TERM and the ideas incorporated into terminfo/termcap are inherent in the way that terminal devices work on Unices and Linux-based operating systems. That there are different terminals and terminal emulators not all speaking exactly the same protocol is also an unavoidable reality.

Setting TERM properly isn't some tmux-specific problem.

Re:You might not need tmux by blueflow on Friday August 01, 2025 @07:40AM (#44755439)
Yet the author incorrectly blames it on tmux, which gives the article a bad taste.

Also im not sure whether the scolling problem is actually tmux fault. Tmux uses the alternate screen buffer, the alternate screen buffer is activated using the smcup/rmcup terminfo capabilities, whose semantics actually say that it "fixes" the window viewport in-place so absolute cursor movement has a known zero position. In this state, any native scrolling attempt should have no effect, and the keypress/scroll wheel events should be forwarded to tmux directly.

For some reason, every other terminal emulator still allows local scrolling in the alternate screen, which kinda breaks the semantics of smcup/rmcup and easy scrolling in tmux, too.

Re:You might not need tmux by aragilar on Friday August 01, 2025 @07:49AM (#44755501)
Sadly after experimenting with a bunch of "modern" terminals I'm forced to consider that their primary audience is more interest in ricing than actually implementing the terminal commands (or connecting to anything other than their favourite linux box) and so I'm stuck with xterm as the only reliable terminal emulator that won't occasionally spew unreadable junk.
Re:You might not need tmux by sgarland on Friday August 01, 2025 @08:12AM (#44755651)
Have you tried Ghostty? Its creator has been pretty serious about getting everything right.
Re:You might not need tmux by nomad41 on Friday August 01, 2025 @08:40AM (#44755912)
I tried it a few months ago and it didn’t even have a way to search terminal output.
Re:You might not need tmux by metaltyphoon on Friday August 01, 2025 @10:42AM (#44757502)
That's the most annoying part of ghostty at the moment. I have no idea why it isn't a priority :( https://github.com/ghostty-org/ghostty/issues/189
Re:You might not need tmux by tristan957 on Friday August 01, 2025 @02:36PM (#44760673)
Because Mitchell doesn't use terminal search, and neither do most of the maintainers.
Re:You might not need tmux by metaltyphoon on Friday August 01, 2025 @03:25PM (#44761254)
How is this even possible? Just pipe result from a command into a file and open in vim and search it that way? Perhaps use Neovim's built in terminal where you can search at will? I find it hard to believe that "I don't ever search" is a thing.
Re:You might not need tmux by wredcoll on Friday August 01, 2025 @06:10PM (#44763020)
He probably uses tmux which has features for all of those things, why should the terminal re-implement them?
Re:You might not need tmux by metaltyphoon on Friday August 01, 2025 @09:21PM (#44764187)
He gave an interview on YouTube, which contradicts this.

https://youtu.be/o-qtso47ECk?si=6gWzcL9-69Njd8jq

Re:You might not need tmux by wredcoll on Saturday August 02, 2025 @01:34AM (#44765110)
Well, I am perplexed then.

It does kinda sound like he's trying to reinvent X11.

Re:You might not need tmux by meepmorp on Friday August 01, 2025 @07:44PM (#44763641)
I don't think I've ever intentionally used the scroll back search in iterm2 and deliberately disabled the shortcut for it because I kept triggering it by accident. I don't understand wanting or needing it, at all.
Re:You might not need tmux by shiomiru on Saturday August 02, 2025 @02:50AM (#44765352)
That's what pagers are for (e.g. less.)
Re:You might not need tmux by udev4096 on Friday August 01, 2025 @10:37AM (#44757424)
Oh yes, using a new terminal emulator instead of one which has been around for decades. What could go wrong? It's creator has been vocal that it's nothing more than a side project
Re:You might not need tmux by sarlalian on Saturday August 02, 2025 @04:18PM (#44771034)
That’s underselling the community around it. Most subsystems have dedicated maintainers at this point, and it’s improving at a reasonable rate. It’s just new and new tools don’t have the full set of features of older tools.

I’m assuming based on your dismissal of people using a new terminal emulator instead of one which has been around for decades, that you don’t want any time or effort invested in new tools.

Re:You might not need tmux by GuinansEyebrows on Friday August 01, 2025 @12:45PM (#44759266)
ironically, the last time i tried it in my normal workflow, it refused to interpret certain escape sequences... to the terraform cli application. i couldn't finish a `terraform apply` - i'd type `y` and hit enter but it would just print `^M`.
Re:You might not need tmux by aragilar on Friday August 01, 2025 @10:15PM (#44764387)
I asked what test suite they used to ensure they had the correct behaviour, and they were fairly dismissive, so I'm not sure what you're basing that on. I think they're far more interested in a specific set of features than getting things right.
Re:You might not need tmux by sarlalian on Saturday August 02, 2025 @04:11PM (#44770963)
Or they have experience as open source maintainers, and don’t really answer questions that you can find out for yourself if you look at the github repo.
Re:You might not need tmux by aragilar on Saturday August 02, 2025 @11:56PM (#44773974)
I did look, hence the question, and the response I got was sufficient to tell me what I needed to know.
Re:You might not need tmux by t_mahmood on Friday August 01, 2025 @11:21AM (#44758154)
And, actually having terminals crush. It is kind of absurd to have a terminal crush.

I've tried

Wezterm Ghoatty Ptyxis

First two had some frequent crushes, ptyxis is quiet reliable, but I felt it consumes too much memory for a terminal. But I feel it's a good terminal.

Though I wish I could get rid of the headerbar

Re:You might not need tmux by Modified3019 on Friday August 01, 2025 @11:57AM (#44758671)
What is “terminal crush”? I’ve not heard of this before.
Re:You might not need tmux by rstupek on Friday August 01, 2025 @12:39PM (#44759201)
I think he's referring to being married to or "crush" on the terminal you use
Re:You might not need tmux by partdavid on Friday August 01, 2025 @12:56PM (#44759379)
I'm assuming "crash"--it's a mild malapropism based on some varieties of English phonetics that I've seen before.
Re:You might not need tmux by t_mahmood on Friday August 01, 2025 @02:58PM (#44760924)
Oh, my bad he he, as other corrected
Re:You might not need tmux by elzbardico on Friday August 01, 2025 @01:41PM (#44759895)
you mean "crash"? But who I am to judge if you have a crush on a terminal, some of them are really beautiful in their minimalism. :-D
Re:You might not need tmux by t_mahmood on Friday August 01, 2025 @03:08PM (#44761055)
Ah, terminals ARE really nice, aren't they? Fast and efficient. Can't say that for too many apps.

Nevertheless, yeah, I meant crashing, All these years of gnome terminal, Tilix I never had them crashing.

Re:You might not need tmux by nobleach on Friday August 01, 2025 @07:51AM (#44755506)
I agree. It's also true of nearly any program. If you do not set its configuration properly, it may not work as expected.

In the case of TMUX, it can be a bit annoying because it's not immediately apparent _why_ things look wonky. But I'm not sure what the solution is. Default to 256 colors?

Re:You might not need tmux by JdeBP on Friday August 01, 2025 @07:58AM (#44755559)
Indeed, the TERM environment variable actually is the configuration of "nearly any program" (excluding the ones that aren't doing explicitly terminal I/O, of course, and the bad ones that just ignore TERM and make assumptions). Set TERM wrongly, and one has set the configuration incorrectly for a whole load of programs, in one fell swoop.
Re:You might not need tmux by jcgl on Saturday August 02, 2025 @04:56AM (#44765867)
Well, not “nearly any program”; I believe that probing for capabilities is the preferred method these days.
Re:You might not need tmux by JdeBP on Saturday August 02, 2025 @06:18AM (#44766325)
I shall merely smile knowingly and tell you that no, it isn't, and you should try that with a broad range of actual terminals and terminal emulators. (-:
Re:You might not need tmux by jcgl on Saturday August 02, 2025 @08:02AM (#44766921)
If you would like to productively add some input, I'd certainly welcome it. I like to learn more about this space. My own experience of course includes various terminal emulators with unset or unsupported TERMs. Of course I have of course experienced breakage.

Please note that I didn't say few or no programs use TERM. Rather, I mildly disagreed about "nearly any program," and pointed out that there are more robust alternatives to TERM.

Especially when it comes to greenfield development, it's not clear to me why anyone would use TERM rather than capabilities. In any case, I always try to leverage caps whenever I can.

Re:You might not need tmux by qudat on Friday August 01, 2025 @10:29AM (#44757335)
> Setting TERM properly isn't some tmux-specific problem.

Correct, but it's another layer to deal with. There are `tmux` specific TERMs that should be used which sit on top of your terminal emulator TERM. This was my point: you have another layer that you need to be aware of when using tmux and when debugging.

Just look at the top of tmux's FAQ:

https://github.com/tmux/tmux/wiki/FAQ

> PLEASE NOTE: most display problems are due to incorrect TERM! Before reporting problems make SURE that TERM settings are correct inside and outside tmux.

> Inside tmux TERM must be "screen", "tmux" or similar (such as "tmux-256color"). Don't bother reporting problems where it isn't!

> Outside, it should match your terminal: particularly, use "rxvt" for rxvt and derivatives.