Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Strange su behaviour I've never figured out [Solved]
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
Hawklad
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2004
Posts: 87
Location: Broomfield, Colorado

PostPosted: Mon Feb 26, 2007 5:25 am    Post subject: Strange su behaviour I've never figured out [Solved] Reply with quote

This is one that probably has a simple solution, but I've never been able to figure it out.

I can su to root just fine, but when I su back to regular user within that same terminal it seems to work -- it "says" I'm the user (using whoami) -- but I can run any programs without getting

Code:
 
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Error: couldn't open display :0.0


If I open up a new terminal window it work fine. Its just the switching back to a regular user from root that elicits that error.

Also, when I su back into root again (for second time) it takes a loooong time to authenticate the root password (>20 seconds). I imagine that's related somehow.

This has been the case with every Gentoo install I've ever done, going back over 3 years.

Am I alone on this? Is there some simple solution I'm missing?

(I use Eterm if that matters).


Last edited by Hawklad on Mon Feb 26, 2007 6:21 am; edited 1 time in total
Back to top
View user's profile Send private message
jtaylor72
Apprentice
Apprentice


Joined: 01 Feb 2004
Posts: 197
Location: "the can", WA

PostPosted: Mon Feb 26, 2007 6:02 am    Post subject: Reply with quote

instead of su'ing back to the regular user, you can exit the su to root by typing exit. That's what I usually do. I tried your example, su to root, then su to user, and I got the same behavior as you do, with and without the '-' option (though different error messages slightly).
Back to top
View user's profile Send private message
Hawklad
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2004
Posts: 87
Location: Broomfield, Colorado

PostPosted: Mon Feb 26, 2007 6:20 am    Post subject: Reply with quote

Perfect! That's exactly what I was looking for. Thanks for the tip, it works great now.

I love these forums!
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