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.
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.
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.
From the linked mastodon thread:
> For example, by default it will tint your terminal background in a reddish tone while you are operating with elevated privileges. That is supposed to act as a friendly reminder that you haven't given up the privileges yet, and marks the output of all commands that ran with privileges appropriately. (If you don't like this, you can easily turn it off via the --background= switch).
(emphasis mine)
FWIW, systemd is normally pretty good at providing autocomplete suggestions, so even if you don't want to set up an alias you'll probably just have to type `--b<TAB> ` to set it.
> I wonder what random ASCII escape sequences we can send.
According to the man page source[0]:
> The color specified should be an ANSI X3.64 SGR background color, i.e. strings such as `40`, `41`, …, `47`, `48;2;…`, `48;5;…`
and a link to the relevant Wikipedia page[1]. Given systemd's generally decent track record wrt defects and security issues, and the simplicity of valid colour values, I expect there's a fairly robust parameter verifier in there.
In fact, given the focus on starting the elevated command in a highly controlled environment, I'd expect the colour codes to be output to the originating terminal, not forwarded to the secure pty. That way, the only thing malformed escapes can affect is your own process, which you already have full control over anyway.
(Happy to be shown if that's a mistaken expectation though.)
[0] https://github.com/systemd/systemd/blob/main/man/run0.xml
[1] https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_G...
`alias grep='grep --color=auto'`
`alias ls='ls --color=auto'`
It's canon.
> back when I used linux
What do you use now? :0 BSD? Plan 9???