You are not logged in.

#1 2011-02-03 03:25:07

daemonspecter
Member
Registered: 2010-11-21
Posts: 11

[SOLVED] Changing user prompt

I figured out how to change the prompt for the su, but when I go back to the normal user, it is the same old prompt.  I would like to have the same set up but with a different \u color to be able to easily tell them apart.  Does the bash.bashrc file not change the prompt for the user, because no matter what I'm doing, all I can get it to change is for the su.  Thank you!

Last edited by daemonspecter (2011-02-03 04:39:43)

Offline

#2 2011-02-03 03:42:14

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [SOLVED] Changing user prompt

It would help if you told us what you are actually doing, rather than just telling us that it isn't working. What have you added to .bashrc?

It should be as simple as setting the PS1 variable.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2011-02-03 03:48:42

daemonspecter
Member
Registered: 2010-11-21
Posts: 11

Re: [SOLVED] Changing user prompt

Sorry.  I'm trying to change how the prompt colors/layout.  I have edited PS1 in my .bashrc file, and that changes how the SU prompt looks, but I want to also change the normal user's prompt.  My current PS1 is:

PS1='\[\e[1;30m\][\t]\[\e[1;31m\][\u]\[\e[1;34m\][\W]\[\e[1;0m\]\$ '

Other things are changed in the .bashrc file, but are irrelevant (aliases and the like). 

Maybe its as simple as the computer needs a reboot before konsole will change it?

Offline

#4 2011-02-03 04:23:49

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] Changing user prompt

su switches to root who uses a different .bashrc than the regular user
be sure you are editing the correct one


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#5 2011-02-03 04:31:35

daemonspecter
Member
Registered: 2010-11-21
Posts: 11

Re: [SOLVED] Changing user prompt

I'm in /etc/bash.bashrc and that seems to be changing the su one.  Where would I find the .bashrc for the regular user?

Offline

#6 2011-02-03 04:32:32

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] Changing user prompt

if you don't have one, you can create one under /home/user  --- >> ~/.bashrc


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#7 2011-02-03 04:39:24

daemonspecter
Member
Registered: 2010-11-21
Posts: 11

Re: [SOLVED] Changing user prompt

That's what I needed, and its working now, thanks!

Offline

Board footer

Powered by FluxBB