rikard.me/blog/007.txt Mon 01 Jan, 2024 All terminals suck I have used GNU for more than ten years at this point. I've been aware of it and have used it casually for far longer. My dad was one of the early users in the 90s, and during all of my childhood he would have either Slackware or Red Hat installed on his computer (remember Gnome 1 and 2?). I love the freedom that you have with the system. There are other things I don't love as much, such as the terminal emulators. I do not for the life of me understand why making a simple, basic terminal is seemingly so hard, despite it being an essential tool for every developer. I use Gnome as my desktop environment. This ships with a terminal called 'gnome-terminal'. This is a big, clunky and most cripplingly slow terminal. It has keybinds that out-of-the-box interfere with my workflow. That's fine though, because it has a settings page where you can rebind a lot of things. It offers you this, but somehow manages to forget to give you essential options such as binds for scrolling up and down the terminal buffer with your keyboard. It's not like it doesn't have the functionality, it allows you to scroll with Page Up and Page Down, but my keyboard doesn't have those. Let me rebind it, Gnome! It also suffers from being incredibly ugly. I never liked the thick title bars of GTK3/4 programs. I would have preferred if the things they put in those bars would have remained in menu bars that you could hide. I don't need to see a big [+]-button at all times, or a search icon. If I want to create a new tab or search the terminal buffer (which I never do), the keybinds would be easy enough to learn, or I could in those rare instances just open the menu bar, and select the relevant action from there. The alternative from Gnome would be Console, or 'kgx' as its also known as. This on the other hand is too basic, lacking any form of customisation, either through the use of a GUI settings page or a configuration file. It also suffers from the general ugliness of GTK programs that I described above. I'm on Gnome, and will not even consider alternatives from other desktop environments, such as Konsole from KDE or 'xfce-terminal' from... well, XFCE. Even if they were good (which they're not), I'm not pulling in 200 dependencies just to run a terminal. Why does a terminal even need DE specific dependencies? So the mainstream alternatives suck, surely the old reliables would be perfect for me? Wrong! XTerm is a monstrous Frankenstein of cobbled together code, kept alive by power crazed programmers too preoccupied with the notion of keeping their monster alive, that they've not stopped to reflect on whether they should. Oh, you want to emulate a terminal? Nice! which one? VT102 or VT220, or any of these fifty other ones we for some reason still support? Oh, you want to configure this piece of trash? Yeah, please use this archaic .Xresources file. Good luck getting fonts to render well! URxvt is in theory good, but it suffers from the same problems XTerm is riddled with, being overall too complex for what it is. I've also had issues with text rendering on URxvt, having it sometimes blink onto screen instead of being instantly rendered. It makes you wonder how a program with the sole purpose of putting text on the screen can struggle with putting text on the screen. 'foot' is the only terminal that I've found myself liking. It does just what it says on the tin, it emulates a terminal. There are no performance issues, and it even comes with sane defaults and quality of life features that you would expect modern software to have. If I scroll with my mouse the terminal buffer scrolls, it has a configuration file with an easy syntax, its code base isn't burdened with the legacy of a bygone age. But, it's for Wayland only. For X the only viable terminal I've found is 'st' from Suckless, and even this I'm not fully satisfied with. True, it does everything I want it to do. It doesn't have any needless menus, it's easy to configure (I'd say even if you don't know C), and like 'foot' it just emulates a terminal and it does so fairly efficiently. The only thing I dislike about 'st' and keep swearing over is when I've spent time on my laptop (where I use Wayland with 'sway' and 'foot'), and little dumb me tries to mouse wheel scroll up the terminal buffer. In 'foot' or any other sanely designed terminal, you would move up the terminal buffer. In 'st' nothing should happen, but there is (I assume) a bug where it will sometimes instead paste the previously executed command to the prompt, over and over and over again, stringing together a huge nonsensical command, which you will then have to delete, introducing needless faff. Being a bug it only happens sometimes, which somehow makes it more irritating, as you're never conditioned to *never* scroll on the window. I have mainly given design choices as negatives for me in this article. Many times poor design can be excused by saying that what you are getting is leaps and bounds more performative than the other alternatives (a poor excuse, but an excuse often heard nonetheless). With terminal emulators this just isn't the case. As I noted with 'gnome-terminal', it's slow. Have a look at this super scientifically sound comparison. The purpose of a terminal is to put text on the screen. So here I have generated a 512M text file, which I then cat to stdout. > dd if=/dev/random of=large.txt bs=1M count=512 > time cat large.txt st . . . . . . . . . 0m31.731s kgx . . . . . . . . . 0m53.207s alacritty . . . . . . 0m53.255s gnome-terminal . . . 0m54.382s xterm . . . . . . . . 1m12.696s urxvt . . . . . . . . 1m15.289s kitty . . . . . . . . DNF I would still argue that taking 30 seconds to put text on a screen is laughable, but I guess 'Suckless' inherently implies that the software still sucks, just less. I was not able to test the speed of Wayland specific terminals such as 'foot' as my desktop only has X. I live my life in the terminal, and the fact that there's no perfect option bothers me. With Wayland being the future for the GNU desktop, I'm happy that 'foot' will be there for me, but in this current state where I'm locked into X due to my hardware, the state of the GNU terminal space just feels awful.