Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo and bash terminals
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
JoeyJoeJo
Apprentice
Apprentice


Joined: 08 Sep 2004
Posts: 155
Location: Fairfax, Va

PostPosted: Wed Sep 08, 2004 6:21 pm    Post subject: gentoo and bash terminals Reply with quote

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
View user's profile Send private message
Gotterdammerung
l33t
l33t


Joined: 11 Feb 2004
Posts: 627
Location: Rio de Janeiro, Brazil

PostPosted: Wed Sep 08, 2004 8:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
computx
Tux's lil' helper
Tux's lil' helper


Joined: 29 Oct 2002
Posts: 109
Location: northeast missouri

PostPosted: Wed Sep 08, 2004 9:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
zojas
Veteran
Veteran


Joined: 22 Apr 2002
Posts: 1138
Location: Phoenix, AZ

PostPosted: Wed Sep 08, 2004 9:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
JoeyJoeJo
Apprentice
Apprentice


Joined: 08 Sep 2004
Posts: 155
Location: Fairfax, Va

PostPosted: Thu Sep 09, 2004 12:02 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum