Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I am trying to change the propmpt in tcsh in Redhat.
I did all the following:
In ~/.cshrc I added at the end of the file the new prompt.
Copied csh.cshrc and csh.login to ~/ and added the new prompt at the end of both of them.
I get the new prompt every time I open a terminal window, but the minute I am changing a directory, I get the old prompt again.
Can you tell me where else I should change the prompt?
Next, read the tcsh(1) manpages for your OS / version, and confirm that ~/.cshrc is read at shell startup (as opposed to, say, ~/.tcshrc) -- and in what order.
Red Hat Enterprise Linux ES release 4 (Nahant Update 2)
I couldn't find anything in the manual that could solve the problem.
I don't have ~/.tcshrc, only ~/.chrc. I tried changing the latter to .tcshrc, and also didn't work.
A login shell begins by executing commands from the system files
/etc/csh.cshrc and /etc/csh.login. It then executes commands from
files in the user’s home directory: first ~/.tcshrc (+) or, if
~/.tcshrc is not found, ~/.cshrc, then ~/.history (or the value of the
histfile shell variable), then ~/.login, and finally ~/.cshdirs (or
the value of the dirsfile shell variable) (+).
If you're sure you have the file named correctly (it's misspelled in your last post), then post its contents here...
Again, it loads the configurations, but as soon as I am changing the directory (Actually I don't have to change - just write the cdcommand), I get the old prompt back.
set path = (/usr/kerberos/bin /bin /usr/bin /usr/local/bin /usr/bin/X11 /usr/X11R6/bin /rtsw/workbench25/gnu/3.4.4-wrlinux-1.3/x86-linux2/bin/ ./)
# global enviroment file for csh/tcsh
source /auto/tools/etc/ENV.rtsw
# END
setenv EDITOR kedit
set prompt = "%/>"
set prompt2 = ">"
alias myPrompt 'set prompt="%/>"'
alias cd 'cd \!*; myPrompt'
Nope.
Again - getting the same behaviour.
I am starting to think that it is related to some strange user privileges, my sys-admin configured (He himself has no idea about how to solve this problem).
I have never seen this before, I didn't have this problem on any other platform - Ubuntu, Kubuntu, OpenSuse, and even Red Hat in another places.
Anyway, thanks a lot for all of your help.
Is it possible that you have prompt config file somewhere in the PATH? Like did you backup one of those files to /etc folder for example? Maybe your prompt change gets overridden by rouge config file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.