Terminal Prompt Problem
hello everyone,
i am a newbie to red hat and working my way towards learning...i am having a problem that when i open the terminal in red hat linux 9 it shows me bash-2.05b instead of my login prompt i read a post in here about this issue in which the mod told the person to use P1="[\u@\H \W]" and to include it in the end of bashrc to make it permanent...i added this line to the root's .bashrc file's end and also to the /etc/skel/.bashrc but whenever i restart i get the same prompt back i either have to do su or type the above command to get back to normal |
the two files you've changed will have no effect on a normal user that already exists. that would be /home/username/.bashrc
|
Quote:
|
It should be PS1, not P1. You also need an "export" in there (i.e. the line should read "export PS1=[\u@\H \W]"). You shouldn't be logging in as root all the time either, make a normal account for everyday use.
|
you really shouldn't log in as root all the time, do you not appreciate how dangerous it is??
you also shouldn't call people sir if they have not been knighted, are your boss, or have the ability to put you in prison. :) |
Quote:
i will try using the export string with the command today thanks |
Quote:
Quote:
|
ok i was able to remove that bash prompt but i have another problem what i try i connect through vnc to the system i get that .bash prompt again so i have to su to root or any other user but when i do that i i start getting Xlib: Invalid MIT-MAGIC-COOKIE-1 key messages and i cant run gui based programsany suggestions??
|
The MIT-MAGIC-COOKIE issue is related to your xhost setup.
See http://www.cygwin.com/ml/cygwin-xfre.../msg00220.html Quote:
If you're constantly logged in as root, you'll do plenty of stuff and may corrupt your system in doing so. However, if you only temporarily use let's say su to switch to root for a particular job, you're likely to go back to your normal user after the job, thus limiting the risks of system corruption. Also, keeping root logged in may leave your system vulnerable to additional remote attacks. Thirdly, what happens if you temporarily go out of your office (assuming your computer is at your office), for instance to grab a cup of coffee? If you didn't remember to activate your screensaver (with password lock), then anyone who enters the room can completely erase your system in mere seconds. Maybe you can trust your colleagues, and that is very good, but it's a proven fact that many outside "attacks" on networks actually have help from the inside. To clarify the bashrc issue: /etc/skel/.bashrc : is used as "default" bashrc settings whenever a new user is created. root's .bashrc : may not be in /home/root, but for instance in /root instead. Check root's home directory by typing "echo $HOME" , "cd; pwd" or "grep root /etc/passwd" (to be called as root, except for the last one). Putting the export PS1=... command in root's .bashrc or any user's .bashrc will make it apply only to root or to that user, and only if he's using the Bash shell. If you want to use the new prompt settings for all users as default, try modifying /etc/bashrc instead. Check out "man bash" for info on $PS1, $PS2, etc. to customize your prompts. http://www.linuxjournal.com/article/3215 might help you too. |
thank you timmeke for a discrptive answer i would now login as a user and use su more :)
Quote:
#/etc/X0.hosts 127.0.0.1 192.168.0.55(the ip i login via vnc to the system on which redhat is installed) but still nothing Quote:
export PS1="[\u@\H \W]" to the end of it but i still get a bash prompt when i login via vnc to the system, when i access the system personally everything is good but via vnc(remotely) it still has a bash prompt :( sorry for being so lame but everyone has to be dumb in something :) |
No need for the apologies, kissme1. You're here to get help with your Linux problems, and we're here to help you with them. No matter what the issue is, no matter how silly you think the problem is.
The fact that you are willing to work on your problem by listening to others is the first step towards the solution. We all had to learn Linux by reading, practice and getting help at some point (or at least, I have). Now, as for your problem: did you also read the follow-ups on the link I provided you. Maybe they contain more clues. Also, you may want to check your xhost settings. Hmmm. VNC, as far as I know, only shows you what you would get to see if you were actually sitting at the computer itself. Yes, it requires a login to gain access, but it doesn't really log you on to the system itself. Are you sure it's VNC you're using? Not some other form of remote access like ssh, or ICA? Anyway, my guess is that the bashrc and/or profile settings are simply not loaded when you connect remotely. You can always load them by issuing a command like: Code:
source /home/you/.bashrc |
Quote:
Quote:
Quote:
|
ok i did some reading and found out that $root/.vnc/xstartup is the file that specifies X applications to be run when a VNC desktop is started. If it doesn't exist, vncserver will create a new one which runs a couple of basic applications.
i think that might be the problem cause i am not able to run the application that start with redhat-config extension here is the xstartup file that i have so that u ppl can analyze and gimme some advice #!/bin/sh unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc any suggestions now?? |
All times are GMT -5. The time now is 08:38 AM. |