LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   remote X display error (https://www.linuxquestions.org/questions/suse-opensuse-60/remote-x-display-error-644756/)

noir911 05-25-2008 11:59 PM

remote X display error
 
On a OpenSUSE 10.3 server I am trying to run a Java program which is giving me error: Can't connect to
X11 window server using ':0.0' as the value of the DISPLAY variable.

fvwm2 is running on the server. I am ssh'ing as a normal user.
I tried ssh -X username@servername and then /path/to/program.

I have the following setup on my local machine's sshd_config file :

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

when I type /path/to/program I get "DISPLAY environment variable is set to: localhost:11.0" along with lots of other Java error.

When I ssh without -X and type /path/to/program I get -

Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.

I get the same error if I su - to root and type /path/to/program.

I would like to run this program as root (after I log in as a normal user) if that's at all possible.

On the OpenSUSE server I have "Allow Remote Graphical Login" on via Yast.

I have tried the following display settings both as normal user and root but no luck:

env DISPLAY 0:0
env DISPLAY 127.0.0.1:0.0

export DISPLAY=0:0
export DISPLAY=127.0.0.1:0.0
export DISPLAY=:0

fvwm2 gets started by Suse when the system starts.

Any help on this would be much appreciated. Thanks.

jschiwal 05-26-2008 05:24 PM

You might want to restore any settings you have done on the server that you are unsure about. The three sshd_config X11 settings you posted are the same as mine, in large part because "X11DisplayOffset 10" and "X11UseLocalhost yes" are the default. The allow remote Graphical logins deals with xdmcp which is unrelated to ssh.

The X11 access errors you are getting are on the local terminal. That is where the X11 server is, not on the remote server. As long as X11 is installed on the remote server, you could even run in in init level 3 and still log in and run a GUI program.

Can you run a different program such as konsole or xterm after logging in as a regular user? Can you "su -" and then run Yast2? If you can do both, then is sounds like A) the firewall settings aren't causing the problem. B) The sshd_config program is OK. That seems to leave the java program.

Quote:

On a OpenSUSE 10.3 server I am trying to run a Java program which is giving me error: Can't connect to
X11 window server using ':0.0' as the value of the DISPLAY variable.

fvwm2 is running on the server. I am ssh'ing as a normal user.
I tried ssh -X username@servername and then /path/to/program.
I think that the java program might be defining DISPLAY itself, changing it from "localhost:10.0" to "localhost:0.0". Does this java program have a manpage, or a README file or a javadoc or reply to --help. See if a config file for it is changing the DISPLAY variable. It may be redefining the environment, and may even be a jail rooted service.

I'm not familiar enough with Java. Changing the DISPLAY variable may be something that is done when the java vm is setup.


All times are GMT -5. The time now is 07:49 PM.