19 ms·
Xterm: It's better than you thought (2021)
- dang 3y agoDiscussed at the time: XTerm: It's Better Than You Thought - https://news.ycombinator.com/item?id=25732862 https://news.ycombinator.com/item?id=25732862 - Jan 2021 (152 comments)
- klodolph 3y agoOccasionally, I have switched back to XTerm on my Linux systems and it’s always been fine. Good performance, good compatibility (everything runs correctly in XTerm), what else do you need? - Tabs - Clickable URLs Otherwise, XTerm is solid. The source code is a bit of a nightmare.
- eviks 3y agoWhy settle for otherwise fine (despite so many years of development) when you can use good?
- hellcow 3y agotmux can handle the tabs.
- klodolph 3y agoNo, it really can’t. Some people are happy with TMux but it introduces some compatibility problems (TMux itself contains a terminal emulator, and not everything works correctly in TMux), and half the point of tabs is being able to organize them how you please—if you want move a tab to a new window, you can do that.
- csdvrx 3y agoTry tabbed.
- readme 3y agoif you really want a GUI tab, I suppose you're right i'll take the TUI tab with the added bonus of not losing my work when the window is closed any day.
- klodolph 3y agoI have my terminal set up so the window won’t close without prompting. I also like being able to copy-paste things out of terminals, and Tmux makes it a bit difficult. I know how to use the scrollback in Tmux but it’s just so much easier to use the scrollback in a GUI terminal editor.
- deleted 3y ago[deleted]
- hnlmorg 3y agoI think what you’re describing is more habitual than the strengths and weaknesses of different solutions. Which is fine but the discussion needs to be framed that way.
- hnlmorg 3y agoPeople disagreeing with me but that fact that we’ve had a dozen people propose a dozen different ways to do the same thing, that alone should be evidence enough that what we are arguing over is personal preference rather than “x can’t do y”. Having been a Linux (and unix before that) user for decades now, I’ve seen people argue over vi vs emacs, KDE vs GNOME, GTK vs Qt, GPL vs BSD and so on and so forth. They make all sorts of well reasoned arguments but it almost always just boils down to personal preference at the end of the day. Yet it’s amazing how many people think that their preferences are unequivocal facts.
- fiddlerwoaroof 3y agoTmux has the ability to move a tab to a new tmux session. Also, on X, there’s things like https://tools.suckless.org/tabbed/ https://tools.suckless.org/tabbed/ which can produce tabbed layouts of arbitrary applications.
- klodolph 3y agoI am not happy with the user experience I get when running multiple tmux sessions. My personal limit is one tmux session per host. Tabbed looks cool, but I don’t see any online documentation.
- bee_rider 3y agoInteresting! I usually have tmux in every terminal. I like that it keeps the session around even if I do something dumb like accidentally close my terminal. It is cool that the ecosystem is flexible enough to fit our basically opposite preferences.
- klodolph 3y agoMy terminal will stop me from closing the terminal if there’s a program running. I’ve also encountered a few problems with tmux from time to time—certain shortcuts stop working in weird, hard-to-diagnose ways, if a program is being run through tmux, or through some combination of ssh + tmux.
- mtlmtlmtlmtl 3y agoDepending on what terminal you use, this is likely to be related to the remote host missing the right termcap files and therefore there's no way for tmux to know how to do certain things. One of the nice things about xterm is this basically never happens.
- bee_rider 3y agoOne of my systems has that confirmation dialogue enabled, it is pretty annoying IMO, I don’t want to have to reach for my mouse just to close a terminal. (I’ll disable it at some point, it is a system that I mostly just remote in to anyway, so it isn’t a daily annoyance). There’s a shortcut in Vim that my tmux config gets in the way of. Ctrl-a, increment a number. This is a weird shortcut to me, though, actually I’m happy tmux over-writes it!
- msla 3y ago> TMux itself contains a terminal emulator, and not everything works correctly in TMux Which is why we invented terminfo and ncurses.
- soraminazuki 3y agoI think you'll be pleasantly surprised if you look into what tmux is actually capable of. It's extremely customizable, featureful, and well-documented. All of the complaints you've raised in this thread can actually be solved with a bit of configuration. > TMux itself contains a terminal emulator, and not everything works correctly in TMux tmux doesn't merely contain a terminal emulator. Rather, it is a terminal emulator. All terminal emulators have slight differences in behavior and tmux is no exception. But since tmux is actively developed, I haven't personally encountered any deal breaking issues.
- iforgotpassword 3y agoColleague uses tmux. Every couple months one of his tmux sessions crashes, and he loses everything that ran in it. Meanwhile I can't remember screen ever crashing on me. Don't see why I should ever take that risk.
- soraminazuki 3y agotmux never crashed on me this past decade either. So unless you're telling me that some computer science breakthrough has made screen crash-proof, I don't see why I should avoid tmux and lose many of the features I rely on.
- iforgotpassword 3y agoIt's just anecdotal evidence. Maybe it's because he's running arch and gets all the buggy beta versions, I don't know, but other than that, maybe that breakthrough is called "being mostly a finished product that has been around for way longer"?
- colordrops 3y agoI'm a constant user of Tmux but the programmatic interface is horrid. My only real complaint.
- tetris11 3y agoBut it has some of the worst bindings known to man. Scroll the mousewheel or Shift-PageUp? Forget about it.
- interroboink 3y agoI get tabs from my window manager (fluxbox), but not sure if that lacks some magical functionality you might get from it being built-in to the application. I rarely use it though, rather organizing things by whole virtual workspaces instead.
- Scarbutt 3y agoNo Text reflow when the terminal is resized. That sounds very annoying.
- bilegeek 3y agoIt really is until you settle on a larger terminal size by default (I use 100x25 or 100x50 usually, sometimes 132x25/50 for lots of output.) I still miss it though. Don't know why they never added it, for example it's got a whole Tektronix emulator built-in so bloat and extra work are no excuses.
- t-3 3y agoMost non-tui programs being run in terminals don't operate that way though, and tui stuff resizes just fine. ps, for example, only outputs text to fill the terminal size and truncates the overflow (which is why it's not safe to grep). Not reflowing makes a lot sense when compared to the complication and bugs reflowing would bring.
- BenjiWiebe 3y agoTried with SCO OpenServer (old UNIX) and modern Fedora, with Konsole and XTerm. Neither 'ps' in either terminal truncates output to fit the terminal. What 'ps' on what OS did that? Some Googling indicates that on Solaris, 'ps' would default to 80 characters wide before truncating, apparently ignoring the size of the terminal. However even that apparently did not apply when piping; it would output the full line in that case.
- t-3 3y agoAfter checking, it seems that procps-ng ps doesn't truncate when piped, heirloom ps and plan9 ps never truncate, Net- and OpenBSD ps always truncate.
- yepguy 3y agoYou can kind of get clickable links in xterm by configuring it to run a command with the current selection on right-click: *VT100.translations: #override \n\ <Btn3Down>: exec-formatted("xdg-open '%t'", PRIMARY) Now double-click a link to select it, then right-click to open.
- kQq9oHeAz6wLLS 3y agoNice. I left xterm a couple years ago due to this. High time I went back, I think
- yepguy 3y agoI used to have a script that I bound to right-click instead of xdg-open. In addition to opening URLs, it also extracted the current directory from xterm's title so that I could open files with the mouse as well. I called it plumb (after the Plan 9 tool). Unfortunately I lost the script and am not interested in rewriting it, but maybe it gives you some ideas. You could dispatch any action you want based on patterns in the selection.
- austinjp 3y agoI know precisely zero about X other than being a long-term user. How hard is it to "wrap" xterm in something that provides tabs?
- somat 3y agoThe funny(ironic) thing is. tabs as a desktop metaphor belong to the window manager.. however tabs, as implemented, were a revolt against window manager tabs. If I understand history correctly, with the meteoric rise in popularity of our modern day terminal(the web browser) people were wanting to run more and more browsers at the same time. as the existing desktop manager state of the art(probably windows 95) was coming up short when dealing with the number of windows people wanted open the browser manufacture Netscape said fine, we will do it our self, this is where my memory gets fuzzy, I forget if it was an early firefox(phoenix anyone) the full mozilla browser or netscape proper(6 ish timeframe) that invented tabs, but they were and still are a very popular way control your many many browser windows you had open. Really in the wrong layer however, it should be your desktop manager that provides tabs, not the application, and some do, but it is not a common thing what with the way DM tabs fight application tabs.
- vladvasiliu 3y agoI remember when Phoenix got tabs, it was a killer feature for me because I was using some environment which didn't handle tabs itself (KDE and Windows). It was great not having to deal with a ridiculous amount of window buttons in the task bar. But now, we've come full circle. I'm using i3 and adore its tabbed windows feature. However, it's basically impossible to disable tabs in current browsers. Firefox has some extensions [0], which combined with some custom css to hide the tab bar kinda sorta work if you're ok with a janky experience. For Chrome, I haven't found anything. [0] I use https://gitlab.com/adsum/firefox-notabs https://gitlab.com/adsum/firefox-notabs
- mmcgaha 3y agoI am not sure that it was first, but Opera was the first browser that I remember having tabs. Outside of browsers, I think UltraEdit was the first application that I remember having tabs.
- pmarin 3y agohttps://tools.suckless.org/tabbed/ https://tools.suckless.org/tabbed/
- csdvrx 3y agoxterm is very good. It's only now that I've moved to Linux on the desktop that I found better with wezterm (for tabs mostly) and foot (for a quick quaketerm). wezterm is now becoming my favorite: it's not just very fast and responsive, but it supports sixels and has many little "details" I need like ligatures, telling you when a font doesn't support some unicode character, font fallbacks to maximize unicode coverage, and a very active community that can help you with whatever may not be clear from reading the documentation alone (I'm lua-challenged lol) As for tabs in xterm, and a few other nice defaults I recommend the config I made during my last foray with Linux on the desktop: https://github.com/csdvrx/cutexterm https://github.com/csdvrx/cutexterm
- exebook 3y agoWhen you say community, where exactly you find people who can help with wezterm?
- readme 3y agoI just replaced my VT100 with an XTerm and I have to say I'm really impressed.
- bediger4000 3y agoXterm's cut-n-paste configurability is unsurpassed. You can choose what characters make a "word". I have '/', '.' and '*'. You can make double and triple clicks copy different things. Makes other cut-n-paste look unintelligent.
- eviks 3y agoWezterm has word boundary config, same for clicks, though not sure about configuring word boundaries per number of clicks (and it has rudimentary support for semantic zones so you can easily select you command instead of the whole line with prompt)
- thiht 3y agoThat’s the standard almost everywhere though isn’t it? I’ve always configured the word separators in my editors and terminal emulators. And double/triple click also works everywhere for selecting word/line/block
- jsyolo 3y agoAbandon All Hope, Ye Who Enter Here
- asveikau 3y agoI've pretty much always just used xterm. It "just works". I think I've read some things written in the early 90s that it was considered "bloated", which is funny now... This is one thing i don't get. All that old X stuff ... A lot of it is still usable. You can run a similar setup that one might have in the late 90s or early 2000s and it's unobtrusive, fast. I've run fvwm on my workstation for a while now. Was using WindowMaker long past its prime. There's no reason not to. But boy are there a lot of X haters.
- kristopolous 3y agoI've proposed X talks at a few conferences. Modern X is a fairly black art but has some really nice features. They've been 100% rejected. Linux conferences seem to only care about things like containers and automation these days. X is like emacs. Doing it well is hard but there's a lot of power and flexibility under that hood if you spend the rather significant effort to discover it. Its 40th birthday is coming up. Like JavaScript, CSS and PostScript, it's an imperfect system with compromises that gets the job done. I'm probably just going to do the talk proposals as a write-up.
- agumonkey 3y agoEager to read it
- quijoteuniv 3y ago«only care about things like containers and automation these days» In all fairness these seems to me the reason Linux has become more popular, rather than lets call it the “black arts” of Linux. However those with extensive knowledge of Linux seem to be highly in demand (scandinavia) because of the popularity of Kubernetes. And lets be honest, kubernetes is best operated by “hackers/makers/tinkerers” :)
- kristopolous 3y agoIt's one of the current commercial applications with arbitrage opportunities on the skills front, the other big one being AI. The education and conference industry are driven by those deltas because that's where the lucrative jobs are These things tend to fall in on themselves. Ten years ago for instance, large scale data stores were the rage. Everyone was rolling out petabyte solutions for megabyte problems. This went on for years before people realized it was absurd. You're finally starting to see this in containers. It's container overload for really simple problems - like hiring earthmovers and cement mixers when your construction job is installing a bookshelf. People want to expand their resume and use their current job as a stepping stone but they're also creating messes by using inappropriate tools. It's an industry problem.
- wwalexander 3y agoFor those looking for a minimal VT100 terminal emulator without the legacy baggage of Xterm, I highly recommend checking out Suckless Software’s st: https://st.suckless.org/ https://st.suckless.org/
- jchw 3y agoThough iirc, if input latency is a concern, I recall st not excelling at that. I think foot is another minimal terminal emulator which promises better latency and performance. I personally use kitty, partly for native Wayland support and partly because GPU offloading seems like a fine idea on a desktop machine. Alacritty is another popular terminal emulator that has GPU acceleration.
- alpaca128 3y agoSt performs differently based on OS. When tested separately, "linux-st" seems to be at least as responsive as Alacritty, while on Mac OS it's the slowest by far: https://danluu.com/term-latency/https://danluu.com/term-latency/ https://danluu.com/term-latency/https://danluu.com/term-late... All that said I currently use Alacritty because benchmarks are not everything and I much prefer Alacritty's font rendering (aside from missing ligature support).
- austinjp 3y agoFor the lazy/confused: https://danluu.com/term-latency/ https://danluu.com/term-latency/ :)
- deleted 3y ago[deleted]
- tmtvl 3y agoMaybe, but who wants a VT100 when you could have a VT400 and not need to reinvent 3/4ths of the universe?
- leoh 3y agoWhy is xterm so bad on OS X, though? No copy-paste, no tabs, no right-click...
- octotoad 3y agoProbably an XQuartz (or whatever it's called now) issue.
- locusofself 3y agoThe way this person describes opening URLs via shell piping and xargs looks insecure to me. There have been exploits around these kinds of things in the past.
- beginnings 3y agovery happy with Kitty
- jdboyd 3y agoThree XTERM features I would have liked to see mentioned would be the Sixel, ReGIS and GIN legacy graphics modes. I just wish they didn't interfere with UTF8 support (and maybe they no longer do?).
- yegle 3y agoI've been very happy with using rxvt-unicode with its various add-ons: 1) urxvt-selection: customize the double click selection behavior; 2) urxvt-matcher: hyperlink any text and customize behavior when you click the link (e.g. you can customize any compile error, when click on the filename with line number, open a new tmux tab and open the file at the given line);
- bwidlar 3y agoAfter years of using multiple terminals (st, kitty, alacritty, etc) I have returned to xterm. It's fast and offers a multitude of options: https://invisible-island.net/xterm/manpage/xterm.html#h2-RESOURCES https://invisible-island.net/xterm/manpage/xterm.html#h2-RES...
- jimjimjim 3y agoWay back years ago I remember the xterm vs rxvt debates, I tried both and just stuck with xterm. These day you have to change the fonts and a few of the other settings to make it look pretty but it just feels so much faster than all the 'modern' terms that are defaults in distros
- sherr 3y agoWhy is xterm as good as it is? Some good people programming it and in particular Thomas E. Dickey, who's been working on xterm for a long time. https://invisible-island.net/xterm/xterm.log.html https://invisible-island.net/xterm/xterm.log.html
- kzrdude 3y agoI'm not sure if this is a stupid question, but will Xterm be ported to support Wayland?
- _joel 3y agoThere's this I recalled, but no idea if anything official, doubt it. https://github.com/majestrate/wterm https://github.com/majestrate/wterm
- _y5hn 3y agoNice to update ~/.Xresources with a bit more sane config. I fixed my xterm background and some colors (background, cursor) in addition. However, it renders much more slower than kitty in this simple test: timeout 2 find / Since that is likely a good use case or test for performance, I don't see further use trying to make xterm usable for me. It's a good terminal, but more modern takes are faster and have more features. Rant: One annoying feature I always disable though are those cursed hyperlinks. Terminals don't need hyperlinks.
- okasaki 3y agoFor interactive use, latency is more important, and xterm wins by a lot: https://lwn.net/Articles/751763/ https://lwn.net/Articles/751763/
- mlichvar 3y agoWhen you are comparing performance to kitty, are they both scrolling line by line (xterm's default), or jumping as with the xterm jumpScroll or fastScroll option?
- _y5hn 3y agoGood point, and "jumping/cheating" did cross my mind, though was not meant to be a technical merit test. I didn't get any difference with jumpScroll, but fastScroll makes it go further with xterm, though not as far and consistently as kitty. So fastScroll option for xterm might improve the execution time.
- teo_zero 3y agoQuestion to all commenters who ask for tabs: all modern desktop environments offer powerful window management, which includes navigating between windows of the same application, hiding inactive windows, etc. What's so good about having different documents/sessions in tabs instead of separate windows?
- tourist2d 3y agoProbably the same answer as to why you would want tabs rather than separate windows in a web browser.
- teo_zero 3y agoProbably, but I still don't know what this answer is!
- layer8 3y agoI actually mostly use separate windows in a web browser, in order to utilize the normal window manager functions (like arranging windows side by side by keyboard as needed), and never quite understood the appeal of tabs. I would understand it more if tabs were a window manager-level feature.
- csydas 3y agoI think it depends on how tabs are implemented; browser tabs are temporary hold spaces for me, further context within a workspace that I'm exploring. Maybe it's separate research pages for a specific topic, some scratch space, etc. Real browser tabs I like because if something ends up becoming a new main focus, I drag it to its own window and now it becomes its own workspace with its satellites tacked onto the window as tabs. I can close/re-open them pretty fast with browser history, and it becomes very easy for me to quickly jump in/out of mental work spaces. However, what I cannot stand are non-browser native tabs that are becoming (?) standard in most web apps. It is very restricting in my opinion and defeats the point of tabs, and instead ends up cluttering the space far too much. The big CRMs are a perfect example of this as it slows down everything so much for me as everything is trapped in a single window, it's very difficult to isolate or preserve tabs, and you lose access to the history. Terminal on MacOS introduced tabs some time ago and the paradigm still doesn't sit right with me. More or less it's unobtrusive enough (and I enjoy that Apple at least preserves certain accessibility options while shuffling tabs around), but I just can't quite get to the same head-space with Terminal as I can with browsers, probably because CLI is much more concise by nature and has some already pretty good systems in place for multitasking from a single window.
- teddyh 3y agoI tried to switch from XTerm to GNOME Terminal. It went well for a while, and better Unicode and emoji display was nice, but then a new version of GNOME Terminal came out which broke the ability to use the Meta keys for sending an ESC prefix; it is now hard-coded to only accept the Alt keys to do that. So I had to switch back to XTerm. (Re-post: https://news.ycombinator.com/item?id=32424200 https://news.ycombinator.com/item?id=32424200)
- 1827163 3y agoAlso try 'mlterm', it has sixel graphics support enabled by default. While XTerm supports sixels, many distributions don't enable it by default. Then, if you have 'libsixel-bin' installed you can run e.g. 'img2sixel hamster.jpg', and there you go, a photo is displayed in the terminal, inline with the text. And 'mlterm' lets you adjust the text line spacing, even negatively, so you don't have to edit the fonts to get it the way you want.
- gandreani 3y agoThis is really cool! I'm shocked at the image quality. Thanks for sharing
- linsomniac 3y agoxterm is one of the few terminals that supports titeInhibit functionality to disable the alternate screen at the terminal level. Yes, you can disable it through termcap hacks and application configurations, but it's nice to just set it in one place and have it apply to all the machines I ssh to, etc... I understand the idea behind the alternate screen, but it really annoys me to have something on the screen (like a man page or editor session) and then have it gone while I'm trying to do my next thing (like type a command based on a man page). But, I'm addicted to wezterm's keyboard-driven copy&paste and tmux+mosh-like functionality.
- alwillis 3y ago+1 for WezTerm.
- sph 3y agoSo, the author is surprised xterm can be configured to mimic most modern terminals, though it lacks some basic conveniences like text reflow. What's the point? Why not use another terminal then? It has low latency, but it's not an order of magnitude faster than any other GPU accelerated terminal, so I don't get the point of choosing a subpar product that is 10% faster.
- suyjuris 3y ago> but it's not an order of magnitude faster than any other GPU accelerated terminal It is [0,1]. Have you tried it? Up to individual preference, of course, but for me it does feel a lot better. [0] https://lwn.net/Articles/751763/ https://lwn.net/Articles/751763/ [1] https://danluu.com/term-latency/ https://danluu.com/term-latency/
- sph 3y agoI did, it's noticeable, but not enough for me to switch from the convenience of nice antialiasing and desktop integration. I use Black Box [1] from Flatpak because it has great design and smart copy (Ctrl-C does both copy and SIGINT depending on the context), which is more important to me than shaving a few ms latency. These days a lot of terminal work is done with `eat` from Emacs [2], which is even slower than Blackbox. 1: https://flathub.org/apps/com.raggesilver.BlackBox https://flathub.org/apps/com.raggesilver.BlackBox 2: https://akib.codeberg.page/blog/introducing-eat.html https://akib.codeberg.page/blog/introducing-eat.html
- smabie 3y agoxterm has anti aliasing
- bigbillheck 3y agoI used xterm back in the day and I'm willing to concede that maybe it's gotten better, but the way I remember it is I switched to more capable terminals just as soon as I possibly could.
- deleted 3y ago[deleted]