←back to thread

466 points CoolCold | 1 comments | | HN request time: 0s | 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 #
10000truths ◴[] No.40217545{3}[source]
Any sane command line program will only output color codes if isatty(STDOUT_FILENO) succeeds.
replies(1): >>40217597 #
1. withinboredom ◴[] No.40217597{4}[source]
That can succeed in a number of cases, where it actually isn't a tty with a user on the other end of it. There are a number of internal tools at work that only output logging if there is a tty and thus are run in their cronjobs with a tty. If there were unexpected color outputs in the logs, that would suck since the log aggregators probably wouldn't know what to do with it.