Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#5 X11, Can't Connect?

v1.0_(example)
closed
nobody
5
2003-01-13
2002-11-05
Anonymous
No

Hello,

I'm attempting to tie the Cewolf package into a some
data stored in a database.

When I deployed the example application into a Jakarta-
Tomcat 4.0 server, running on SuSE Linux v7.2, I got the
following error :

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

I've seen this before when attempting to run an X11
application as root. Does this mean I need to set up my
development environment to run as a non-privileged user?

Let me know,
- Tim Fulmer

Discussion

  • James Norman
    James Norman
    2002-11-11

    Logged In: YES
    user_id=641334

    If you have a 1.4 or greater JDK you can fix with the
    following sys property
    java.awt.headless=true
    In tomcat set your env variable CATALINA_OPS to be the following
    CATALINA_OPS=-Djava.awt.headless=true
    And tomcat will set the sys property when it starts up.
    This is only with
    jdk 1.4 or greater. If you are running an earlier version
    of java run the following
    command: "xhost +". Careful though this will grant access
    to anyone connecting to your x11 server. Hope this helps.

     
  • toppo gigio
    toppo gigio
    2002-11-21

    Logged In: YES
    user_id=654192

    Hi,

    I tried using the xhost command, but that is not available in
    our sun system. By the way, why is a X server required?

    Thanks.

    toppo_gigio

     
  • Guido Laures
    Guido Laures
    2003-01-13

    • status: open --> closed
     
  • Guido Laures
    Guido Laures
    2003-01-13

    Logged In: YES
    user_id=574032

    The Vm needs to have access to the graphics context. Please
    consult the Help forum where this problem has been fixed.

     
  • toppo gigio
    toppo gigio
    2003-01-14

    Logged In: YES
    user_id=654192

    We were using the same non-super user both to start tomcat
    and the graph environment, and all we had to be sure was
    that the first request was made while the (ReflectionX)
    session was still open. Afterwards, we could even shut down
    our workstation :)