Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Change the appearance for the root account System
I occasionally do things as root, and I've tried running the Finder as root. I know it's dangerous; I think I just wanted to easily move some files, or maybe it was curiosity. In any event...

Running things as root being dangerous, so I thought it'd be good to have a visual reminder of that. I ran System preferances as root using Pseudo, and changed the appearance to grey and the highlight colour to red -- this is very different from my normal appearance. Now any application running as root is immediately obvious and I am warned.

[robg adds: Despite the visual warning, I still strongly advise not running stuff as root. It is easier, no doubt about it. It's also easy to do really stupid things that you may regret later, like deleting the wrong folder. But if you're going to use root mixed with the normal environment, you really should have some sort of visual distinction!]
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)

Change the appearance for the root account | 8 comments | Create New Account
Click here to return to the 'Change the appearance for the root account' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Authored by: pxlated on May 20, '05 12:38:11PM

Been doing this since 10.1 and I make the screen really bright and ugly so I don't stay in it longer then absolutely necessary :-)

[ Reply to This | # ]
Authored by: osxpounder on May 20, '05 06:08:59PM

You could probably go to a Finder window's View Options and set the background colour, for "all windows", to something obviously unusual [for you]. For me, that would be RGB 0/255/0 -- not that I'd run Finder as root.

I use the window background colours as my own sort of Label system, though, which is why it frustrates me that Finder keeps defaulting to "All windows" when I try to change View Options for a window.

Example: for a folder that holds original files, which I wouldn't want to change, nor lose, nor fail to notice, I make that folder's background bright red.

For folders that contain finished products, ready to be delivered, backed up, etc., I turn the folder background green.

You get the idea; I won't go into the rest of my color code, except to say that I use subtle shades, which is something I can't do with ordinary file Labels. Example: some files are originals, or early drafts, and I *probably* don't want to delete or change them -- I make that folder background red, but not bright red. Darker red means less crucial, in my scheme.

I very much appreciate that feature and use it often. When I set up another's Mac, I change the background windows of their admin user accounts to red [all windows], to help them realize they shouldn't be doing ordinary work when logged in as admin. I also change the desktop background to a huge warning sign.


[ Reply to This | # ]
Change the appearance for the root account
Authored by: afb on May 20, '05 05:23:21PM

Another great way to see this distinction is if you use ShapeShifter. The theme will only change processes run by your user. Apps launched as root will not appear in the set theme (unless you install ShapeShifter on the root account, which may not be a good idea).

[ Reply to This | # ]
Change the appearance for the root account
Authored by: dleifm on May 20, '05 09:00:09PM

I made an image for the desktop background that has a personal reminder for me. Whenever I log in as root, I'm greeted by a violent neon green background with "Don't f*ck it up!" written in 48pt font. Works like a charm.

[ Reply to This | # ]
Change the appearance for the root account
Authored by: overrider on May 20, '05 10:44:30PM

i never use root to login into my system initially, but quiet often i change to root in the terminal via sudo su. to know and be aware that i am root, i did this:
open terminal
type sudo su followed by your password
type cd ~ to change to roots home directory
your terminal should look similar to this [root@machinename:~]$
type pico .bashrc to create a new .basrc profile file
copy and paste : declare -x PS1="\[\033[0;31m\][\u@\h:\w]$\[\033[0m\] "
hit ctrl+x followed by y to close and save the file
type exit and close the terminal
now when you open the terminal again and use sudo su to change to the root user, the root users command line will appear as a nice red to make sure you are aware.

[ Reply to This | # ]
Change the appearance for the root account
Authored by: hombre on May 22, '05 12:48:08AM

This is very helpful. I have always wished I could make the Terminal background a different color when I su to root, but I don't think that is possible, and the red text is hard to miss. It feels weird to me to have a '$' instead of '#' in the prompt, though.

[ Reply to This | # ]
Change the appearance for the root account
Authored by: devlogic on May 23, '05 04:16:37AM

That's easy enough to fix, though; just change the "$" to "\$" (only works in bash, not tcsh); the shell will automagically change the '$' to '#' for the root shell. Or, since the outlined procedure explicitly creates/changes the root .bashrc (and not your personal .bashrc), just use a '#' instead of a '$' in the PS1 variable declaration to begin with.

[ Reply to This | # ]
Change the appearance-->TCSH
Authored by: macubergeek on May 22, '05 10:30:44AM

If you use TCSH put this line at the top of your root account's .tcshrc file:
edit /private/var/root/.tcshrc

set prompt="%{\033[31m%}%n @ %/@Xmac-->"

will turn the prompt red

[ Reply to This | # ]