←back to thread

466 points CoolCold | 3 comments | | HN request time: 0.438s | source
Show context
fn-mote ◴[] No.40212557[source]
Overall, this seems great.

However...

> [...] by default it will tint your terminal background in a reddish tone while you are operating with elevated privileges

?!! ouch ... seems orthogonal to the actual important parts.

Disclaimer: I didn't try it.

replies(4): >>40212686 #>>40215695 #>>40219040 #>>40225604 #
NekkoDroid ◴[] No.40212686[source]
I tried it a bit ago (when it was still called uid0, pre-release), I also wasn't a fan of the tinting.

I like the intent behind it, but some terminals already tint the header color when running sudo, I haven't tested if its done specifically for sudo or if its in a more generic way that could handle this as well.

replies(2): >>40212858 #>>40213006 #
withinboredom ◴[] No.40213006[source]
I can think of a number of things this tinting would break.
replies(2): >>40213766 #>>40216548 #
seanc ◴[] No.40216548[source]
It violates the principle of Least Surprise; if I'm invoking run0 I'm expecting it to run my program with a different UID and return the same stdout I'd have gotten if I had just run the program in my shell. Not inject a whole bunch of color control bytes in there. Which hopefully my terminal will handle. Unless it doesn't.

I'll give them the benefit of the doubt and assume they only do this if $TERM supports color. But still. That $TERM variable can surprise a poor programmer in all sorts of ways.

replies(2): >>40217545 #>>40217883 #
1. zeroimpl ◴[] No.40217883[source]
But sudo already doesn’t do that either. Eg sudo may ask for a password, and output some control sequences which hide the text so your password is not visible.

This feels like much ado about nothing.

Edit: Also don’t forget the “with great power comes great responsibility” blurb that sudo likes to output. I know that doesn’t happen in scripts when output is redirected, but I’m sure run0 will figure that out too.

replies(2): >>40218131 #>>40220144 #
2. dijit ◴[] No.40218131[source]
asking for a password to do an authenticated action is about as far away from surprising as I can legitimately reason about.

The contextual blurb does have a way of disabling it in a persistent config, which is easy enough to set. It also goes to stderr and not stdout and does nothing to alter the output of the command itself.

It also does not show if you have NOPASSWD: set in your sudoers. So even less surprising.

3. withinboredom ◴[] No.40220144[source]
> sudo may ask for a password, and output some control sequences which hide the text so your password is not visible.

You can turn this off for certain users and/or programs.