Better HN
topnewbestaskshowjobs
Log inSign up

aumerle

569 karma · joined Mar 26, 2016 (10y ago) · 213 submissions

Submissions

comment 1y ago · link · parent

Of course, I didn't mean to put you in a spot. We can always continue this later once your thoughts have matured. Sadly I have an extremely full schedule so I dont think I have the badwidth to noodle on this at this stage but if and when you have something more concrete please do post it somewhere public and I will try to contribute to the discussion.

comment 1y ago · link · parent

So if I am to understand your proposal more concretely it is something like implement an escape code that the shell can use to turn off all other escape codes (presumably with some kind of listing mechanism) and then have the shell do that before launching any third party script/program/function? How would the shell know which escape codes the program it is running needs?

I can, kind of, see the utility of a pledge() type system within a single program, but in a shell, whose whole job is basically running programs it knows nothing about beyond their name? How would that work?

comment 1y ago · link · parent

Yup kitty revolutionized my terminal experience, hence the passion. I am sorry but since you seem to be passionate enough about ghostty to try to shill it in a article about a security vulnerability in it, I don't think you have a leg to stand on when it comes to complaining about my posts.

If you want to claim that ghostty is developed very rapidly it behoves you to do a little research and compare it against its peers before making that claim.

comment 1y ago · link · parent

You proposal does not address this issue since shells would still need full privileges.

This entire class of exploits (query responses with user controlled data leading to shells executing commands) would be removed if shells just moved to using the kitty keyboard protocol with all key events represented as escape codes and implemented a full escape code parser for data received form the terminal. You cannot embed an escape code inside another, or while technically you can, it is trivial to implement a security policy of disallowing these in both terminals and shells. Then barring implementation bugs in the escape code parser (which can easily be shipped as a standalone native code library) you dont have this entire class of issues and the associated one that the bracketed paste hack was created to address.

comment 1y ago · link · parent

Yes, but this is two well known and understood functions we are talking about, wrapping them is really not that hard.

comment 1y ago · link · parent

It's not even slightly tricky, just use self pipe. I have no idea why the maintainer of make rejected it. He says select has different signatures, but select is in POSIX, so unless he is porting to a non POSIX platform, it's irrelevant and even if he is, I doubt it is that hard to write a wrapper to abstract the non POSIX compatible implementation of select. Then he complains about needing to do CLOEXEC on the self pipe. This is trivial (one line) on Linux using pipe2 and about 5 lines of code on other platforms. Given that he says make does not use threads its also perfectly robust without pipe2.

Opting for a harder algorithm just to avoid a few lines of compatibility shims seems like very much the wrong tradeoff.

comment 2y ago · link · parent

Or run

kitty --dump-commands program-whose-output-you-want-to-inspect

You can even save the --dump-commands output as edit it and then replay it with

kitty --dump-commands program > commands.txt

kitty --replay-commands commands.txt

comment 2y ago · link · parent

Ah yes, in that case there no terminals that implement it indeed. Though there are a few that implement changing window size via escape code, though in units of cells not pixels. Generally speaking I dont see how applications can use tcsetwinsize() robustly, given that the size in pixels of a cell is determined by font properties and applications runing in the terminal have no knowledge of these, therefore cannot set both the pixel and cell sizes at the same time.

comment 2y ago · link · parent

Lots of modern terminals support ws_xpixel and ws_ypixel. Hell even the venerable xterm supports it. It is used primarily for displaying raster graphics in modern terminals, see for example: https://sw.kovidgoyal.net/kitty/graphics-protocol/#getting-t...

And nowadays modern terminals even support in-band resize notification so there is no need for SIGWINCH: https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3...

comment 2y ago · link · parent

And we are all delighted to be spared from your personality in the kitty community. Enjoy your day as well.

comment 2y ago · link · parent

Then stick to commenting on posts about such software instead of trying to mislead people about software you know nothing about.

comment 2y ago · link · parent

Sigh. Go read the docs:

remote control has both a socket only mode, and has the ability to allow tty connections only with a password: https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.allow_remote...

Furthermore, remote control in kitty has capability based security where you can lock down the protocol to allow individual actions with arbitrary granularity:

https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.remote_contr...

comment 2y ago · link · parent

Nope, native applications are not ever going to get the ridiculous level of sandboxing demonstrated by the restrictions on accessing the clipboard in the article. Nor are they ever going to be prevented from accessing the file system as web applications are.

comment 2y ago · link · parent

Again, no non mobile OS prevents native applications from using the clipboard as it should be used. And none of them show any signs of changing that.

comment 2y ago · link · parent

And that's just what he did until someone showed up to do the grunt work of porting to Python 3, at which point he co-operated with that person and helped make the port happen, just as he said he would. I suggest a more facts based narrative in the future.

List of all python3 PRs merged by the developer in minutes to hours: https://github.com/kovidgoyal/calibre/pulls?q=is%3Apr+py3

comment 2y ago · link · parent

Ah, you are back with your "the kitty protocol doesn't support my pet feature that nothing else supports, aka left and right distinct modifier states" so it must be bad. I was wondering when you would show up again.

comment 2y ago · link · parent

If you mean mobile OSes sure, I can agree with you they are becoming worse with time. OSes for real computers, not so much.

comment 2y ago · link · parent

I dont run a single native application across five operating systems that requires a popup nag to access the clipboard or that is unable to put any data other than text, html and PNG on the clipboard.

comment 2y ago · link · parent

This article is a perfect illustration of why Webapps will never be as good as native ones. Webapps are always "untrusted" code so they are arbitrarily and artificially restricted from accessing resources on your local machine.

comment 2y ago · link · parent

Now, the OP has to remember, df -h -x tmpfs instead of df -h. The proper solution for this is to not have commands that are both meant for interactive and script usage. Then the defaults for their output can be changed over time to suit the evolving landscape. Or if you do want a single command for both have a --script flag that makes its output suitable for usage in scripts.
12345
8