Problems in setting display variable for X Windows server

santhosh santosh at e2esolutions.com
Fri Jun 25 23:07:29 UTC 2004


Hi Pete,
                 Thanks for those responses and forgive me if I am not
presenting my case clearly; I will make another attempt


The Linux Box IP: 192.168.1.10
Power analyzer installed on : 192.168.1.10 (i.e. same box)
Application and web server installed on : 192.168.1.10 (i.e. same box)
Servlets trying to access the X server through the  Display variable
localhost:0
Servlets not able to access the X server resulting in failure to display
charts
A log is created in the web server with the reason that the servlet cannot
connect to the X server through the Display variable

I try to set the display variable, or in other words try to figure out whats
happening with the display variable

So I try the following commands

****************************************************************************
********************
   [root at localhost root]# echo $DSIPLAY
        (blank)
[root at localhost root]#

even after I give the command export DISPLAY=localhost:0
****************************************************************************
********************
[root at localhost root]#xterm
Xlib: connection to "localhost:0.0" refused by server
Xlib: Client is not authorized to connect to Server
Warning: This program is an suid-root .........

****************************************************************************
********************
[root at localhost root]# xhost
Xlib: connection to "localhost:0.0" refused by server
Xlib: Client is not authorized to connect to Server
xhost:  unable to open display "localhost:0"

****************************************************************************
********************
[root at localhost root]# xinit

Fatal server error:
Server is already active for display 0
        If this server is no longer running, remove /tmp/.X0-lock
        and start again.

When reporting a problem related to a server crash, please send
the full server output, not just the last messages.
Please report problems to xfree86 at xfree86.org.

Xlib: connection to ":0.0" refused by server
Xlib: Client is not authorized to connect to Server
giving up.
xinit:  unable to connect to X server
xinit:  No such process (errno 3):  Server error.
[root at localhost root]#


Now I am struck with it..being unable to go ahead with my application.


Hope that I am presenting my problem clear enough so that you don't have to
take trouble in understanding problems. Meanwhile I have to appreciate the
job you people are doing to novices like us



Thanks
Santhosh





-----Original Message-----
From: redhat-list-bounces at redhat.com
[mailto:redhat-list-bounces at redhat.com]On Behalf Of Pete Nesbitt
Sent: Friday, June 25, 2004 3:54 PM
To: General Red Hat Linux discussion list
Subject: Re: Problems in setting display variable for X Windows server

On June 25, 2004 10:31 am, santhosh wrote:
> Hi Pete,
>                  Thanks for the info, but let me explain in detail the
> thing I am trying to do.
>
> I have installed Informatica Power analyzer, a Data warehouse reporting
> tool on a Linux Box. The application is running on jBoss server. There are
> servlets that create charts. The web server enables users to access these
> charts through a browser throughout the network. Now this servlet needs X
> windows server for the charts display, so they connect to the X server by
> the display variable localhost:0, but unfortunately this is not happening,
> and that's why those error messages. It was working fine till I tried to
> change the hostname of the Linux box. I have reverted back to old settings
> but things are not working yet. I am not familiar with Linux environment
to
> a great extent, so I was trying to find a way to set the display variable
> so that the servlet accesses the server, regarding the lock files, where
> should I go and delete them????
>
>
> Regards
> Santhosh

Hi Santhosh,

I'm not sure I quite follow the servlet part, as I don't know anything about
java. But shouldn't they be connecting with display set to their local IP as
in "192.168.1.10:0" otherwise it may be getting interpretted as trying to
display on the web servers localhost.

You probably don't need to worry about lock files, but if there are lock
files, they will be in /tmp.
>From one of your errors:
Fatal server error:
Server is already active for display 0
        If this server is no longer running, remove /tmp/.X0-lock
        and start again.

If you have an X server running, it will have  /tmp/.X0-lock, so you should
quit X, then from a console, check that no .X0-lock, .X1-lock... files
remain
in /tmp. However, if an Xserver was running all along, and you were trying
to
launch a second, there will only be the one lock file, which will be for
your
running X session. If you wanted to start a second X session on the same
box,
you would use display 0:1, which should creat a  .X1-lock file.

--
Pete Nesbitt, rhce


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list





More information about the redhat-list mailing list