LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-10-2006, 05:06 AM   #1
kofibull
LQ Newbie
 
Registered: Jun 2006
Posts: 13

Rep: Reputation: 0
Can't connect to X11 window server


I am new to linux(using Suse 9.3) and have a program (grahics) on running it I get this error
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:134)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
at java.awt.Window.init(Window.java:231)
at java.awt.Window.<init>(Window.java:275)
at java.awt.Frame.<init>(Frame.java:401)
at javax.swing.JFrame.<init>(JFrame.java:198)
at JPanels.<init>(JPanels.java:15)
at JPanels.main(JPanels.java:11)

On the linux machine, it runs fine, but when I ssh into the box and try to run it I get this error. Y is this so an any solution.
 
Old 06-10-2006, 05:20 AM   #2
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,031

Rep: Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539
X server usually isn't configured to run remotely because it runs as root. You can use NFS to link to the executables and libraries, and then run the program on another X server. Lastly, you can configure the X server to run on a remote machine. This is a big security hole. You might also want to to try logging into ssh as a regular user on the remote machine and:

xhost +

Then log in as root and try to run it again.
 
Old 06-10-2006, 05:42 AM   #3
kofibull
LQ Newbie
 
Registered: Jun 2006
Posts: 13

Original Poster
Rep: Reputation: 0
But how do I use NFS and besides what is NFS, sorry I am new. Please could you give me step by step to tackle this problem.
Thank.
 
Old 06-10-2006, 05:54 AM   #4
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 50
Quote:
Originally Posted by kofibull
I am new to linux(using Suse 9.3) and have a program (grahics) on running it I get this error
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:134)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
at java.awt.Window.init(Window.java:231)
at java.awt.Window.<init>(Window.java:275)
at java.awt.Frame.<init>(Frame.java:401)
at javax.swing.JFrame.<init>(JFrame.java:198)
at JPanels.<init>(JPanels.java:15)
at JPanels.main(JPanels.java:11)

On the linux machine, it runs fine, but when I ssh into the box and try to run it I get this error. Y is this so an any solution.
add the -Y flag when you SSH to use X forwarding
Code:
ssh -Y user@host ...
 
Old 06-10-2006, 09:29 PM   #5
kofibull
LQ Newbie
 
Registered: Jun 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks,

I did the xhost +myLinusBox.com and that added new access list. But it did not do anything. Sorry, but I am able to run my JPanel.class on the Linux Box but not when I am away from home. I get the
"Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable."
I have tried compiling as root and regular user but no luck. I am still lost.

Thanks in advance
 
Old 06-11-2006, 01:12 AM   #6
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 50
Quote:
Originally Posted by kofibull
Thanks,

I did the xhost +myLinusBox.com and that added new access list. But it did not do anything. Sorry, but I am able to run my JPanel.class on the Linux Box but not when I am away from home. I get the
"Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable."
I have tried compiling as root and regular user but no luck. I am still lost.

Thanks in advance
Did you read my post above?
 
Old 06-11-2006, 09:22 AM   #7
kofibull
LQ Newbie
 
Registered: Jun 2006
Posts: 13

Original Poster
Rep: Reputation: 0
I read the post and did the ssh - Y ssh -Y user@host but no luck

Last edited by kofibull; 06-11-2006 at 09:57 AM.
 
Old 06-15-2006, 01:52 PM   #8
rob_of_owensboro
LQ Newbie
 
Registered: Jan 2006
Location: Owensboro KY
Distribution: RHEL, Fedora, GENTOO
Posts: 6

Rep: Reputation: 0
I am not clear on your original post but I believe you are logging in to a remote machine to run an x-windows application that will display on your local terminal. If this is the case there are a few things that need to be done.

On the local machine allow remote access to your loacl x-windows.
Change your x configuration files to allow remote access.
This will depend on what version of X you are using.

Two examples
Older RH distros (xfree, early x.org)
in /etc/X11/gdm/gdm.conf
DisallowTCP=false

Newer RH distros (newer x.org)
in /etc/gdm/custom.conf
[security]
DisallowTCP=false
[xdmcp]
Enable=true

Restart x-windows.

Alloy a specific remote machine to access to your local x-windows
On your local machine: xhost +(remote machine)

Telnet,ssh or whatever into remote machine
export Display=local_machine:0.0
run application on remote machine


There are more secure ways to to this as a previous post implies. I do this way everyday on a relatively secure network without worries.
 
Old 06-16-2006, 02:17 AM   #9
kofibull
LQ Newbie
 
Registered: Jun 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Hello,
Thanks for reading and replying,
I do not have the gdm folder in my filesystem but these are the files in etc/X11/
". qt_gtk_fnt2fntrc xdm Xmodmap.remote
.. qt_plugins_3.3rc XF86Config xorg.conf
fs .qt_plugins_3.3rc.lock XF86Config-20060506 xorg.conf.install
fvwm2 qtrc xim xorg.conf.saxsave
kstylerc .qtrc.lock xim.d Xresources
.kstylerc.lock rstart xinit xserver
lbxproxy twm xkb xsm
proxymngr WindowMaker Xmodmap
"
do you know where elseI might have to look or prop installing the folder?

This is the senerio, lest say I have a program that I am running but I would run it on your server. If I try doing so it gives me the error as stated above.
I am using suse 9.3

Thanks

Ko
 
Old 06-16-2006, 01:00 PM   #10
rob_of_owensboro
LQ Newbie
 
Registered: Jan 2006
Location: Owensboro KY
Distribution: RHEL, Fedora, GENTOO
Posts: 6

Rep: Reputation: 0
A quick google search for suse allow remote x clients provided this information from the first hit.

/etc/sysconfig/displaymanager
# Allow remote access to your display manager (kdm only for now)
#
DISPLAYMANAGER_REMOTE_ACCESS="yes"

Also the export Display=... should be export DISPLAY=... (all caps)
 
Old 06-16-2006, 11:47 PM   #11
kofibull
LQ Newbie
 
Registered: Jun 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks,
I have the "DISPLAYMANAGER_REMOTE_ACCESS="yes"" already but no luck.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. defa0009 Linux - General 13 01-20-2012 02:55 PM
Cannot connect to X11 window server using ":).0" as DISPLAY variable cclack Linux - Newbie 4 09-06-2007 09:32 PM
Can't connect to X11 window server suresheva31 Linux - General 0 10-19-2004 02:17 PM
Can't connect to X11 window server Checking operating system version: must be redha pmarino Linux - General 2 09-20-2004 04:18 PM
get "can't connect to X11 window server using :0.0" andytorn Linux - Newbie 3 05-09-2004 06:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration