xhost + refused by server
I have a new redhat machine I am trying to configure. As the user root, I can open display using xterm. When I try the same using any other user, I get the error
Xlib: connection to ... refused by server
Xlib: No protocol specified
xhost: unable to open display ...
the DISPLAY variable is set properly (same as used by root)
I tried running xhost + and xhost + localhost etc...same error.
After doing some reading, I looked into the .Xauthority file. It is present under the root users home directory, but not for the username I am having problems with.
I first did chmod 777 .Xauthority as root user
then, for the non-root user I set the XAUTHORITY variable to /root/.Xauthority
Still no luck. Same error. What am I missing here?
Thanks in advance