Re: RFC: root/non-root bash prompts different colours?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim Waugh wrote:
Should we implement a scheme to differentiate root/non-root bash
prompts by colour?

Don't the colour escape sequences break (FSVO break) some terminals? Could be annoying for people connecting in from other systems.


I'd say no regardless. It's too dificult to choose appropriate colours. If you really wanted to do this then bold might be more suitable (though still has the above issue). However, I don't know that either of them necessarily make it clear to the user "this is a root shell, it can be used to destory your system".

Personally, I think the current \u and \$ in the prompt are sufficient to determine that the shell has changed and you are now root. Though I would agree that \$ doesn't do this by itself. If all you want to do is draw more attention to the fact that the shell has changed, or which one you're currently in (trying to help people not type into the wrong terminal for example), then you could just make the prompts just look a bit more different. Eg: "\u@\h \W \$" for regular users, "[[[SUPERUSER \u@\h \W]]]\$" for root.

If the main point is trying to alert the user to the fact that it's far easier to do damage when you're root then whey not have a message in su/sudo that gets printed if it's attached to a terminal? Though I think if someone's managed to find that out how to become root on the command line they should be aware enough of what they're doing.

My vote is change nothing.

--
Stuart


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux