View previous topic :: View next topic |
Author |
Message |
JoeyJoeJo Apprentice
Joined: 08 Sep 2004 Posts: 155 Location: Fairfax, Va
|
Posted: Wed Sep 08, 2004 6:21 pm Post subject: gentoo and bash terminals |
|
|
Whenever I use xterm as either a user or root, my prompt looks like this bash-2.05b# or bash-2.05b$. When I am a user, I cant su. I get a message that the password is wrong, but I doubt I typed it wrong that many times. Lastly, when I'm root and I su to a user account and try to run a gtk based program, it says that it cant open a display. How to I get rid of the weird bash thingy? |
|
Back to top |
|
|
Gotterdammerung l33t
Joined: 11 Feb 2004 Posts: 627 Location: Rio de Janeiro, Brazil
|
Posted: Wed Sep 08, 2004 8:21 pm Post subject: |
|
|
If you set the file "/etc/sudoers" correctly after emerging "sudo", your user should belong to the group "wheel" in order to usa "su". _________________ A mind that is stretched by a new experience can never go back to its old dimensions. - Oliver Wendell Holmes |
|
Back to top |
|
|
computx Tux's lil' helper
Joined: 29 Oct 2002 Posts: 109 Location: northeast missouri
|
Posted: Wed Sep 08, 2004 9:36 pm Post subject: |
|
|
You need to customize a .bashrc file to clean up your bash prompt. There is a default one in /etc/skel/ you can copy to your home directory or you can make your own. Look up bash prompt in google for some ideas for colorized prompts etc.
Add yourself to the wheel group to make su root work.
Add
xhost + localhost to that .bashrc file for a quick and dirty way to get around the dsiplay problem you mentioned. |
|
Back to top |
|
|
zojas Veteran
Joined: 22 Apr 2002 Posts: 1138 Location: Phoenix, AZ
|
Posted: Wed Sep 08, 2004 9:41 pm Post subject: |
|
|
it has nothing to do with sudo.
your user must belong to the 'wheel' group to be able to su.
you need to set your DISPLAY environment variable when you are root and then run su. so after the su, type this:
Code: |
export DISPLAY=':0'
|
for the bash prompt, try running 'xterm -ls' rather than just xterm. the bash running inside xterm will then be a login shell. or you can hack your ~/.bashrc file to load your ~/.bash_profile or something ugly like that. read the bash man page about login shells, and when each of the various bash rc files are read. it will be quite illuminating. _________________ http://www.desertsol.com/~kevin/ppc |
|
Back to top |
|
|
JoeyJoeJo Apprentice
Joined: 08 Sep 2004 Posts: 155 Location: Fairfax, Va
|
Posted: Thu Sep 09, 2004 12:02 am Post subject: |
|
|
That did it. Adding my user to wheel got su going, and copying over the bashrc got my colors and whatnot going. Thanks. I'm sure I'll have plenty of more questions in the future. |
|
Back to top |
|
|
|