LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 04: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, 09:37 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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, 10: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, 10:58 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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-09-2003, 11:40 PM   #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



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 03:45 PM
cannot make a custom kernel work dannyk1 Linux - General 5 06-12-2005 07: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 08:51 AM
getting custom PWD in bash prompt techrolla Linux - Software 2 08-09-2004 12:39 AM
Custom boot prompt. drewskiamk Linux - General 1 06-22-2003 01:42 PM

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

All times are GMT -5. The time now is 11:01 AM.

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
Open Source Consulting | Domain Registration