LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-25-2006, 01:25 PM   #1
jalla
Member
 
Registered: Oct 2003
Posts: 33

Rep: Reputation: Disabled
X problem again


Hi,

I am trying to run a web application that uses some graphical interface (www.jfree.org) to generate a graph on "Linux test.bb.com 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386 GNU/Linux".

Getting this error:
Can't connect to X11 window server using 'localhost:0.0' as the value of the DISPLAY variable.
Code:
java.lang.InternalError: Can't connect to X11 window server using 'localhost:0.0' as the value of the DISPLAY variable.
	at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
	at sun.awt.X11GraphicsEnvironment.(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.Font.initializeFont(Font.java:308)
	at java.awt.Font.(Font.java:344)
	at org.jfree.chart.plot.PiePlot.(Unknown Source)
	at org.jfree.chart.ChartFactory.createPieChart(Unknown Source)
Before starting application I did export DISPLAY=localhost:0.0 (also tried export DISPAY:0.0), doesn't help.
I also tried logging as root and running "xhost +" (and xhost +localhost) but getting Unable to open display.

I saw an error message when I rebooted the box "test login: Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list". Is this a source of my problem?
I also checked if xfs was running and yes it is actually
Code:
[root@test root]# ps waux | grep xfs
xfs        788  0.0  0.2  5648 3352 ?        S    20:11   0:00 [xfs]
root      1466  0.0  0.0  3576  632 pts/0    S    20:22   0:00 grep xfs
Anyone any suggestion? Thank you in advance
 
Old 04-25-2006, 01:49 PM   #2
ataraxia
Member
 
Registered: Apr 2006
Location: Pittsburgh
Distribution: Debian Sid AMD64
Posts: 296

Rep: Reputation: 30
Are you running the application as the same user that's logged in to X? You need to.

The font error message from when you reboot is not important, ignore it.
 
Old 04-25-2006, 01:54 PM   #3
jalla
Member
 
Registered: Oct 2003
Posts: 33

Original Poster
Rep: Reputation: Disabled
app started with Putty

Hmm, not sure if I got it correctly, but the box is started and nobody is logged in. The web application is started via putty. The webapplication is actually resin. If you are asking if resin was started by root, yes the it is running as root user because it is listening to port 80.
 
Old 04-25-2006, 05:15 PM   #4
jalla
Member
 
Registered: Oct 2003
Posts: 33

Original Poster
Rep: Reputation: Disabled
Looks like Xvfb is running too:
Code:
[root@test root]# ps waux | grep Xvfb
root       835  0.0  0.0  8280  136 ?        S    Apr25   0:00 /usr/bin/X11/Xvfb -nolisten tcp :0
root      4422  0.0  0.0  3576  632 pts/0    S    00:12   0:00 grep Xvfb
[root@test root]#
 
Old 04-26-2006, 03:16 AM   #5
jalla
Member
 
Registered: Oct 2003
Posts: 33

Original Poster
Rep: Reputation: Disabled
I fixed the problem on resin, the solution was to pass -Djava.awt.headless=true argument.
 
Old 04-26-2006, 03:37 AM   #6
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Quote:
Originally Posted by jalla
Hmm, not sure if I got it correctly, but the box is started and nobody is logged in. The web application is started via putty. The webapplication is actually resin. If you are asking if resin was started by root, yes the it is running as root user because it is listening to port 80.
You are using it over SSH; so if you want to use X, you need to run an X server and use X forwarding, which you didn't do.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:24 AM.

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
Open Source Consulting | Domain Registration