Live data from Hacker News

Hyperlinks in terminal emulators

gist.github.com

31–40 of 70 posts

Re: Hyperlinks in terminal emulators

#31
post #27

I've found it nice to have the terminal emulator be able to match text with regexp and upon a click convert it to an external action. For example, I can click Python traceback in terminal and have Emacs go into that exact line in code, or the JIRA issue id and go to the web page. I wonder though if this is a popular feature. Tilix is under minimal maintenance at the moment, so alternatives would be good to have..

Not sure about popularity but Plan 9 has had this for decades, thanks to Plumber [1].

[1]: https://p9f.org/sys/doc/plumb.html

Re: Hyperlinks in terminal emulators

#33
post #15

Earlier quoted context omitted.

Trivially, `less` to see README.md of a malicious/compromised open source project. There are perhaps more plausible avenues of exploiting, but this one popped to mind immediately.

Opening a URL should always be safe. It's a security bug if it isn't.

Yet such security bugs exist in their multitude. Plenty of internal-only systems are not locked down securely and only thing preventing mass exploitation is browsers CORS settings. But if request is originating from inside the network (as it would from a terminal emulator), then all bets are off.

Granted, on its own, this should be safe. But attacks are usually composed from multiple bugs and/or weaknesses in design. Hence why security folk keep talking about “defence in depth” — ie not to rely on the security of any single facet but instead layering your security just in case any one particular layer does prove to be insufficient.

This is why in my own terminal emulator I implemented hyperlinks via user defined RegEx. The terminal user gets to decide what text becomes click-actionable rather than the attacker.

I actually voiced some concerns with this original hyperlink proposal several years back. In fact lots of developers and security researchers did. And the gist authors response was to delete the replies and turn off comments. Which adds additional concern about this proposal. It follows no process, no feedback, nothing. Just one persons mission to dictate how everyone else’s terminal, and security model, should operate.

Re: Hyperlinks in terminal emulators

#34

Browsers are great at hyperlinks, like really great. How about using browsers for hyperlinks instead?

Opening links is an operating system feature that any program can use and pass a link to.

Yeah, but it’s only browsers that render hyperlinks from untrusted sources…unless you’re saying you often download random executables and then click their hyperlinks?

Re: Hyperlinks in terminal emulators

#35
post #33

Earlier quoted context omitted.

Opening a URL should always be safe. It's a security bug if it isn't.

Yet such security bugs exist in their multitude. Plenty of internal-only systems are not locked down securely and only thing preventing mass exploitation is browsers CORS settings. But if request is originating from inside the network (as it would from a terminal emulator), then all bets are off. Granted, on its own, this should be safe. But attacks are usually composed from multiple bugs and/or weaknesses in design.…

I don't know if it is a trend, but I did notice a larger willingness in FOSS to be uncooperative with more common response to suggestions/questions being "if you don't like it, fork it". I almost wonder if advent of llms prompted people to be more comfortable with saying 'I am building this based on my needs'.

Re: Hyperlinks in terminal emulators

#37
This is barbarianism. This is Babel. Too many dunces trying to turn VT220 into Google Chrome. The long-term effect: the ruination of terminals. You can already see it. Try to run newer terminal apps on classic hardware terminals. Most of the time, you just get garbage, since nobody seems to bother to even check termcap anymore. They just directly shit out whatever bleeding-edge escapes that vte/iterm2/ghostty or other barbarianisms support as of the last five minutes.

If you want something half-way between VT220 and Google Chrome, please be original and make something new, rather than wiping your butt on a standard that is still somewhat functioning.

Re: Hyperlinks in terminal emulators

#38

This is barbarianism. This is Babel. Too many dunces trying to turn VT220 into Google Chrome. The long-term effect: the ruination of terminals. You can already see it. Try to run newer terminal apps on classic hardware terminals. Most of the time, you just get garbage, since nobody seems to bother to even check termcap anymore. They just directly shit out whatever bleeding-edge escapes that vte/iterm2/ghostty or othe…

Isn't VT220 meant to be extensible? Just the hardware stopped at a certain point.

Re: Hyperlinks in terminal emulators

#39

This is barbarianism. This is Babel. Too many dunces trying to turn VT220 into Google Chrome. The long-term effect: the ruination of terminals. You can already see it. Try to run newer terminal apps on classic hardware terminals. Most of the time, you just get garbage, since nobody seems to bother to even check termcap anymore. They just directly shit out whatever bleeding-edge escapes that vte/iterm2/ghostty or othe…

Isn't VT220 meant to be extensible? Just the hardware stopped at a certain point.

That's the point. The hardware stopped at a certain point, which has gifted us with a de-facto standard. I would prefer if our "woo look at me" attention-whore graffiti artists would actually create something positive and original instead of riding someone else's gift into oblivion for attention.

Re: Hyperlinks in terminal emulators

#40
post #10

I really think this is a security disaster waiting to happen, landing right in time for all the agentic terminal apps: printf '\e]8;;http://evil.com\e\\https://good.com\e]8;;\e\\\n' The next step would be to embedd a full javascript VM in the terminal and a CSS engine.

Yeeeeah, I made it as far as...

> It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages

before saying "oh... no.... I hate this. Please don't."

Post reply on HN