Click to See Complete Forum and Search --> : terminal prompt changed
orangedi
11-17-2002, 06:20 PM
I recently installed XDM to give me a login screen, specifically gdm. when I did this however my command prompts in the terminals changed from:
marcelo @ prometheus #
to:
sh-2.05a$
a little mettling and i realized that this is because xdm is using the script /etc/X11/startupDM.sh rather than what i used to use, namely startx. this is probably adding another layer between me and my kernel.
I tried changing the line in inittab from x:a:once:/etc/X11/startDM.sh to x:a:once/startx to no avail. (seemed like a good idea...) XDM would not start at all. anything that refers to startDM.sh in the XDM script is commented out anyway so i can't find anything to change. i am quite puzzled what points to startDM.sh
anybody have any idea?
it is a gentoo install and i have enlightenment, fluxbox, and xserver.
GaryJones32
11-17-2002, 07:28 PM
You can try putting your prompt you like back
at the end of .bashrc i bet
just copy the prompt line "PS1=" i think
from the place that is getting trumped
to the last line in .bashrc or in your case .shrc
whatever you gat there that is read last.
GaryJones32
11-17-2002, 07:40 PM
just remembered that in order to put it in
.shrc you have to put the word export
at the start of the line then the definition
also of course can just fix the PS1=
in that script you are talking about
I could write it here but i don't know how to do the colors.
orangedi
11-17-2002, 07:47 PM
where can i find .bashrc? I've looked for it but no sign.
hop-frog
11-17-2002, 08:49 PM
.bashrc should be in your home directory (/home/yourname/), but the "." in front of it makes the file hidden. If it isn't there try running slocate .bashrc to find it.
orangedi
11-17-2002, 10:10 PM
it isn't here, it isn't there... it isn't anywhere
I suspect I don't have one because i do have a bash_history file. isn't that usually handled by bashrc? i did however get an idea from your suggestion... quite clever of you. i'll get back after i try it.
unless, of course... i'm in the middle of a reinstall.
orangedi
11-17-2002, 10:55 PM
okay. that didn't work but at least nothing is broken. I did find my bashrc file and it is located in /etc/skel i also found that it is invoked by bash.profile when i read that file. The most interesting part is this
quote:
#This file is sourced by bash when you log in interactively.
[ -f ~/.bashrc ] && . ~/.bashrc
in .bash.profile
the problem is I am no longer trying to login interactively. unfortunately it does not tell me what happens otherwise. that is the next quest.
orangedi
11-19-2002, 12:48 AM
after editing bashrc, etc/profile and even csh.login i am stuck with my colorless, ugly prompt. I even learned how to change my prompt so it says anything i want. that is... if those files actually worked on my system. has anyone a suggestion or is this such an obscure problem? does anyone know when bash is called at startup, maybe i can invoke it with comments to force it to read my bashrc file.
hlrguy
11-19-2002, 01:04 AM
Type bash. You are running plain old sh. Here is the exact text on my xterm (I start up in bash, convert to sh, get the ugly promt, enter bash, back to the origional).
[root@localhost /root]# Here I am bash
[root@localhost /root]# sh
sh-2.04# Yuk, now sh
sh-2.04# bash
[root@localhost /root]# Ahhh, back to bash
I forget how to make basht he default shell, and by the time I relearn it, someone else will have posted.
hlrguy
orangedi
11-19-2002, 01:09 AM
I see where you got that. i tried and got... well bash-2.05a$ yuk!
i also thought of the sh before but in my system sh is actaully just a link to bash. this means there is a file telling my terminal what the prompt should look like, shell and version. i would be somewhat satisfied if i could find that file and edit it though moreso if i could use bashrc like everyone else.
orangedi
11-19-2002, 04:58 PM
orangedi...
make sure your shell is set in /etc/passwd the user in question's last comment should be /bin/bash this will set the login shell
eg marcelo:x:000:000::/home/marcelo:/bin/bash
if it's not, add it
now try
orangedi
11-19-2002, 04:59 PM
wow... that was it. i don't know how to thank you
orangedi
11-19-2002, 05:00 PM
all in a day... now get back to work and stop mettling with your files and padding your post count needlessly
here a great thread on how to change the bash prompt:
http://forums.gentoo.org/viewtopic.php?t=5850