No X11 DISPLAY variable set

Need help? Post your questions here.

Moderator: moderators

No X11 DISPLAY variable set

Postby bubbaloo » Wed May 28, 2008 9:51 am

Hi!

I am trying to run the Subsonic app on my Debian Lenny server.
I downloaded the 3.4 standalone version.
I set the parametres in the "subsonic.sh" to fit the installation.
I have java-common, sun-java6-bin and sun-java6-jre installed.

I tried to start it on my Ubuntu 8.04 desktop install, using "sudo subsonic.sh".
That worked.
Then I logged as root (su -) and tried to run "subsonic.sh".
I got the same error as on my server.

Neither the server (Lenny) nor the desktop (Hardy) have Tomcat installed.

Is it at all possible to run Subsonic on a server without running the Xwindow server ? I do not need/want the X server running. I am low on resources (CPU, RAM) as is.

Thanks for your help in advance!

Here is the complete error message:
<error>
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:135)
at net.sourceforge.subsonic.booter.Main.<init>(Main.java:27)
at net.sourceforge.subsonic.booter.Main$1.run(Main.java:40)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at sun.awt.HeadlessToolkit.getScreenResolution(HeadlessToolkit.java:203)
at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:480)
at com.jgoodies.looks.LookUtils.<clinit>(LookUtils.java:249)
... 11 more
</error>
bubbaloo
 
Posts: 2
Joined: Wed May 28, 2008 9:32 am

No X11 DISPLAY variable set

Postby mawkish » Wed May 28, 2008 8:52 pm

I have the same question. I tried to start Subsonic from a Debian startup script but it fails to start, and I think the reason is that DISPLAY is not set.

So is there a way Subsonic stand-alone version can be run without X server?
(Hmm, wonder why java GUI classes are needed for a non-GUI application?)

Thanks to Sindre for a great app!
mawkish
 
Posts: 2
Joined: Wed May 28, 2008 8:46 pm

Postby sindre_mehus » Sat May 31, 2008 6:51 am

Can you please try to add the following to the last line in subsonic.sh:
Code: Select all
-Djava.awt.headless=true


Please let me know if it works, then I can add it permanently to the script.

Thanks!
Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby mawkish » Sat May 31, 2008 8:54 am

Thanks for the reply!

I tried:
$JAVA_HOME/bin/java -Xmx${MAX_MEMORY}m -Dsubsonic.home=${SUBSONIC_HOME} -Dsubsonic.port=${SUBSONIC_PORT} \
-Dsubsonic.contextPath=${SUBSONIC_CONTEXT_PATH} -Djava.awt.headless=true -jar subsonic-booter-jar-with-dependencies.jar

and got:
Code: Select all
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
        at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:135)
        at net.sourceforge.subsonic.booter.Main.<init>(Main.java:27)
        at net.sourceforge.subsonic.booter.Main$1.run(Main.java:40)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.awt.HeadlessException
        at sun.awt.HeadlessToolkit.getScreenResolution(Unknown Source)
        at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:480)
        at com.jgoodies.looks.LookUtils.<clinit>(LookUtils.java:249)
        ... 11 more

Let's see what bubbaloo gets.
mawkish
 
Posts: 2
Joined: Wed May 28, 2008 8:46 pm

Postby sindre_mehus » Sat May 31, 2008 12:03 pm

Ok, thanks for the quick reply.

I think I know what the problem is, and I'll fix it in the next release.

Until then, the Subsonic standalone version requires an X server.

Cheers,
Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby bubbaloo » Sat May 31, 2008 7:30 pm

mawkish wrote:Let's see what bubbaloo gets.


After a short beauty sleep (believe that at your own discretion :wink: ) Bubbaloo got the same result.

sindre_mehus wrote:I think I know what the problem is, and I'll fix it in the next release.

I am eagerly awaiting the new release.
Have you got any insider info on when we might expect it ? :D

And thank you for your quick reply on both counts.
bubbaloo
 
Posts: 2
Joined: Wed May 28, 2008 9:32 am

Postby sindre_mehus » Sat May 31, 2008 9:27 pm

Hi bubbaloo,
I think I have enough new features/bug fixes to justify a new beta release within a few weeks. It all depends on wife and children, I guess ;-)
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby Dante » Sun Jun 15, 2008 2:25 pm

Hi. I was just looking at subsonic and it I got this error with the standalone on Ubuntu 8.04 without X installed:
(.:32010): Gtk-WARNING **: cannot open display:


You say that the standalone will require X-server for now (not anything under requirements on the webpage); will the WAR-version need x-server?

I've got a mini-itx running as my homemade gateway/router at home and would be nice to access my music "on the road" without a X-server installed on it.
Dante
 
Posts: 4
Joined: Sun Jun 15, 2008 2:18 pm

Postby sindre_mehus » Sun Jun 15, 2008 6:47 pm

No. I'm quite confident that the war version doesn't require an X11 server. (But I haven't tested it).

Sindre
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby Dante » Sun Jun 15, 2008 8:24 pm

Thank you Sindre for a quick reply, but it looks like tomcat is as huge as I seem to remember.. I dont think i will run it on my frontend without proper knowledge to secure it :)

I'll be looking forward to the standalone without X requirements!
Dante
 
Posts: 4
Joined: Sun Jun 15, 2008 2:18 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 26 guests