When this happens to me, it'¡s because i'm not using the account of the user logged in the X session. I mean: Sometimes, I log into my KDE session with my mortal user, I open the terminal, su to root, and then if I try to xhost+ a host, it could fail. If it does, I open another terminal, and from my mortal user, I do the xhost+ and it normally works. Hope that works for you too.
|