LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   terminal not opening up : accidentally modified its custom command (https://www.linuxquestions.org/questions/linux-newbie-8/terminal-not-opening-up-accidentally-modified-its-custom-command-711200/)

vanna 03-12-2009 08:16 PM

terminal not opening up : accidentally modified its custom command
 
An improper shutdown of my linux machine led to the following command prompt "bash3.00$" in the terminal .
In order to restore it back ,...i accidentally modified its custom command and wrote my current path . ..by editing current profile. (doubled my troubles )
I am using Red Hat..please help me out

alan_ri 03-12-2009 09:47 PM

Quote:

Originally Posted by vanna (Post 3473777)
i accidentally modified its custom command and wrote my current path . ..by editing current profile. (doubled my troubles )

Will you explain a little better what you did and post a screenshot or somethnig.
Have you tried to reinstall gnome-terminal?Can you login as root.If you can run
Code:

usermod -s /bin/bash vanna
if your username is vanna,maybe that will do.

vanna 03-12-2009 10:59 PM

thanks alan
 
In the terminal window
i went to edit > current profile > title & command
and in custom command entered the path name i.e. "[vanna@linux ~] $" that i had desired to be displayed on the terminal prompt instead of "bash-3.00$"
after this .....the terminal simply crashed
every time i tried opening it ....it would just not open

i looked further through root ..that in my home path ...the .bashrc file was missing. and copied it in the said location ...which solved the problem.

however i am still wondering why did it happened?

alan_ri 03-13-2009 03:36 AM

Improper shutdown can cause totaly unusable system,so you can consider yourself lucky... :D.
Well,if you want to go deeper into this,will you create new user and then post if that user have a .bashrc file in his directory.You can post all files in your home directory and from new user home directory also,that have bash in the name.I don't use Red Hat but it might have /etc/bashrc file or similar wich is default for all users on the system and actually all of the users .bashrc files are the same as bashrc file in /etc directory but there might be no bashrc files at all in /home directory,it all depends on the system.
I think that Bash prompt variable was damaged on shutdown so it changed to bash-3.00$ on restart and when you tried to fix it you damaged few more variables,but when you added good .bashrc file to your home directory things started to work.
Shell variable-The full pathname to the shell is kept in this environment variable. If it is not set when the shell starts, Bash assigns to it the full pathname of the current user's login shell and I guess you just didn't have your shell.
You might wanna read this short tutorial. :D

vanna 03-13-2009 05:07 PM

:)
 
thanks again Alan...
for giving me an insight into the workings of linux...it really improved my understanding.
i will read through the reference u gave me too


All times are GMT -5. The time now is 08:41 PM.