You are not logged in.

#1 2024-02-18 11:59:48

Kooothor
Member
From: Paname
Registered: 2008-08-02
Posts: 228

The wild adventure of changing my terminal emulator

Dear Arch community,

Let me tell you a tale.

You see, I've been using rxvt-unicode (urxvt) for ages. But recently, it started randomly spurting out weird characters in my shell :

execute: 0000/ff00/0000]11;rgba:0000/0000/0000/dddd_

This is obviously not acceptable. So I looked for a solution to this problem (after figuring out it was not a tmux issue).

Someone suggested to apply a patch to urxvt and recompile it.

Yay but nay.

So I started looking for a different terminal emulator. I see "termite" and "alacritty" being mentioned. Ok "termite" is an archived project and redirects towards "alacritty", great, one less choice to make.

Install alacritty, start it, ok it works but it doesn't look like what I want. Let's tweak the config.

So apparently the devs consider that users should read

man 5 alacritty

and figure it out by themselves. Yes, they feel having a default config file is a burden, and are not interested by it. Side comment, someone commented that a default config file is extra maintenance, but if they have a man page they can have an automatic action to generate a default file from it. I don't know what you, dear reader, thinks, but a default config file is pretty common for nearly all things linux. You can tell the devs decision is unpopular by the massive downvotes of the dev's comments...

One needs to scroll down that issue to find a good soul providing a usable default file.

I can now have a good basis for configuration and change things easily. Ok, let's make it green on black, transparent, Bitstream Vera Sans, yellow static cursor, etc...

It works. Great. Let's change default term from "urxvt" to "alacritty" in my rc.lua. At least I can work now without fearing for random crap getting inserted in my pane.

The cons of alacritty:

I really miss the tab feature. While I agree with the alacritty devs that tabs and split should be left to tmux, I often ssh to several machines, so one urxvt window to rule them all, with one tab per machine, and tmux for each, was ideal. Now it needs one window per machine which takes a lot of space. hmm

It's slower to start than urxvt. It's noticeable but not a big deal either, I could live with that.

When logging in on an older Ubuntu machine, or OpenBSD, I had to fix terminfo, and oh boy that's another adventure. So you can either change the TERM env, or curl a weird file and use "tic" to load it into the remote machine. Well, at least that works, and I'm glad the issue only appears on older or bsd-like machines. But it tells a lot about the mess that terminal emulators are. The fact that a user must install some definitions on a remote machine, so they can connect via ssh to it with their terminal, seems fishy. I'm sure if you're a terminal guru (writing your own terms and all) it seems perfectly fine and normal to you, but to someone that never really questioned how terminals worked, it was a surprise. It feels like there are no standard way to send keys??

I haven't got around making scroll work. Yeah, so apparently it doesn't work out of the box. Weird.

I want to click URL. In urxvt this worked through some perl scripts that needed to be installed. And guess what, for alacritty you also need some perl code to make it work. Note that this is actually for tmux, not alacritty. I didn't manage to make alacritty deal with URLs.

The plus of alacritty:

It doesn't spurt weird things in my shell.

Conclusion:

As always with GNU/Linux, encountering an issue is an opportunity to learn. I learned about "tic". But could someone tell me why this bug wasn't fixed in urxvt upstream? (it's been out for a year). Maybe now that tmux triggers the bug more visibly it will get fixed...

But let's take a step back and look at, for instance, the mac os terminal app.

When you start the app, it works, you can configure it via gui, scrolling works, clicking links work, copy paste work, no issue with remote machines, it has tabs if you want them, etc... No need to scour obscure github issues to find solutions by applying random patches to the source or curl'ing some terminfo into tic. It's a wildly different user experience, don't you think?

I mean, we all love tweaking our linux, modifying config files and all, I have no problem with that. I'm a dev by trade, I'm not afraid of doing advanced things. But I think about beginners. Things need to be accessible at least. Yes, a default config file is important. Yes, making URL and scroll work out of the box is important. Yes, tabs are not luxury feature. I realize that comparing an open source project managed by volunteers to a proprietary app of the biggest corporation in the world isn't fair, but I also feel clicking url and scroll is a solved issue, right? It's not like it's something new. I'm not requesting having chatgpt working out of the box to do shell autocompletion. I'm talking very basic features here.

Anyway, thanks for reading. There really isn't any point to this post, I just wanted to share with you this little adventure that honestly could have been much simpler. What term emulator do you use yourself? Is someone willing to make an AUR package of a patched urxvt? I see there are already a bunch of patched urxvt in the AUR, but not sure which one to select...

Because yes, at the end of this adventure, I want to go back to urxvt tongue


ktr

Offline

#2 2024-02-18 12:57:40

gxt25
Member
Registered: 2017-07-05
Posts: 54

Re: The wild adventure of changing my terminal emulator

So what caused the trouble with urxvt? It doesn't do that for me. Something is wrong, no?


a man a plan a canal panama

Offline

#3 2024-02-18 13:20:53

Kooothor
Member
From: Paname
Registered: 2008-08-02
Posts: 228

Re: The wild adventure of changing my terminal emulator

gxt25 wrote:

So what caused the trouble with urxvt? It doesn't do that for me. Something is wrong, no?

The commit message of the patch tells us:

OSC commands returning the colour sequence must be terminated by either
of ST, ESC \, or BEL. rxvt-unicode tries to use the same type of termination
as was in the query but doesn't correctly handle the multiple-char sequence
used for 7-bit queries. Force to using ESC \ instead for now.

I understand some words.


ktr

Offline

#4 2024-02-18 13:54:30

seth
Member
Registered: 2012-09-03
Posts: 58,659

Re: The wild adventure of changing my terminal emulator

Why not build a (patched) rxvt like https://aur.archlinux.org/packages/rxvt … ide-glyphs tbw?
Maybe also activate pixbuf and add the sixel (display images in the terminal) patch for more fun.

Fwwi, the problem has been reported upstream, http://lists.schmorp.de/pipermail/rxvt- … 02640.html

Offline

#5 2024-02-18 14:00:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: The wild adventure of changing my terminal emulator

Kooothor wrote:

I really miss the tab feature... I often ssh to several machines, so one urxvt window to rule them all, with one tab per machine, and tmux for each, was ideal. Now it needs one window per machine which takes a lot of space.

Tmux can be nested.  So you could still quite readily achieve your goal.

Though I'm not sure why you are doing all this ranting rather than just fixing your misconfigured urxvt.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2024-02-18 16:46:40

Kooothor
Member
From: Paname
Registered: 2008-08-02
Posts: 228

Re: The wild adventure of changing my terminal emulator

seth wrote:

Why not build a (patched) rxvt like https://aur.archlinux.org/packages/rxvt … ide-glyphs tbw?

It seems simply using this build is enough to avoid the bug, so I guess I'll use this now!


ktr

Offline

#7 2024-02-18 20:14:21

seth
Member
Registered: 2012-09-03
Posts: 58,659

Re: The wild adventure of changing my terminal emulator

Though your OP wasn't really a support request, I guess it qualifies as such now,  so please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#8 2024-02-19 01:12:44

whittlers
Member
Registered: 2024-02-19
Posts: 58

Re: The wild adventure of changing my terminal emulator

Didn't read all the full tale so I don't know if you want anything in specific, but I'll tell my experience: two days ago I tried suckless 'st', and just with the w3m patch, it has both unicode support and images, which was all I wanted. Was not a fan of suckless software since it never accomplished anything, but st did. Have you tried it?


sorry for bad english

Offline

Board footer

Powered by FluxBB