Gtk-WARNING **: cannot open display
I am using SUSE 9.1 and am having a peculiar problem that I don't understand.
If I log into KDE as user1 and run firefox (or any gui app) at the command line, no problem. If I "su - root", set DISPLAY=ipaddress_of_machine:0.0, I get a long wait and eventually an error
"Gtk-WARNING **: cannot open display"
The same happens when I log into KDE as root (run 'xhost +' just to be sure) and "su - user1", set DISPLAY=ipaddress_of_machine:0.0
If I don't set the DISPLAY variable, I get the error instantaneously, as one would expect. I don't know what else to look for and the long delay before the error makes me thing there may be something else wrong or something is not set up properly.
It doesn't matter what display you set to use. What matters is the access control list (correct me if I'm wrong) of the XServer you're using. By default, whoever created the X session will be the only one who can use it. To allow other users to use the X server, you have to mess around with the xhost command. I'm lazy and just use xhost + which allows any client to connect.
That was one of the first things I tried (see original post) which is why this is frustrating me so much. In all the time I have used Linux, "xhost +" and "DISPLAY=..." solved any display issues.
Any more suggestions?
|All times are GMT -5. The time now is 10:31 PM.|