LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-08-2003, 05:40 AM   #1
jaregi
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Rep: Reputation: 0
can't make custom prompt work for root!?


I managed to change the prompt for my standard user to a simple "\u:\w >" but when I su I still see my standard user name and not "root" as prompt. I changed the .bashrc file in the standard user's home.

Any suggestion?
 
Old 09-08-2003, 10:37 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 250Reputation: 250Reputation: 250
Try a su - with the dash...

This enables to use root's full path and should read from root's bashrc file you've created.
 
Old 09-09-2003, 11:53 PM   #3
jaregi
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Original Poster
Rep: Reputation: 0
This is my setting for the prompt in /home/user/.bashrc:

PS1="\n\e[37;40m\u:\w \$\e[0m "

Using your tip, the bash now treats the user's home as ~ when logged in as root (path used to be displayed in full). But the colouring still does not work in a root terminal.

Which file do I have to edit to affect which user? (I assume there must be more prefs files hidden somewhere other than the user directory.)
 
Old 09-09-2003, 11:58 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 250Reputation: 250Reputation: 250
Your original question asked: "can't make custom prompt work for root!?"

Are you wanting to change root's prompt or you user's, I"m confused now as your not clearly stating what you want to achieve.
 
Old 09-10-2003, 12:40 AM   #5
jaregi
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Original Poster
Rep: Reputation: 0
sorry.

I want to change all prompts (user and root) to the line I quoted in the last reply.

So far, I can only fully customise the users prompt and I loose some settings when su to root.

Is that clearer?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i make custom installer mithereal Debian 1 09-11-2005 04:45 PM
cannot make a custom kernel work dannyk1 Linux - General 5 06-12-2005 08:20 AM
How do I link to my custom libGL.la during configure/make/install if I am not root? lbermude Linux - Software 2 12-13-2004 09:51 AM
getting custom PWD in bash prompt techrolla Linux - Software 2 08-09-2004 01:39 AM
Custom boot prompt. drewskiamk Linux - General 1 06-22-2003 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration