redirect xwindow

Mikkel L. Ellertson mikkel at infinity-ltd.com
Sat Jan 28 18:04:20 UTC 2006


brouwers roland lx wrote:
> The following situation:
> I am using VNC and on the desktop I start Putty to connect to my
> application. In the application, p.e. creation of contracts for leased
> cars, I do a system call which brings me down to a Linux shell, where I
> can execute the command 'display' (system "display carpicture.jpg"). As
> you already understand, I want to display the picture of the car. 
> 
> After the execution of 'display carpicture.jpg, I get the error:
> display: unable to open X server
> 
> So when I enter the following:
> $ export DISPLAY=localhost:0.0
> $ xhost +1
> still nothing happens.
> 
> When I open een Terminal window as user Roland, the picture is
> displayed, without the commands above.
> 
> Is there anybody who understands this.
> 
> One should be clear, I am using VNC not MSwindows. I have the same
> problem with Ltsp.
> 
> I browsed the web for some howto's on this, but I still do not
> understand.
> 
A couple of questions:

Are you running PuTTY in the VNC client, or on the local machine?

Do you have X forwarding turned on in PuTTY? (It is turned off by
default.)

Is the VNC client connected to Windows, or an X server?

Are PuTTY and the VNC client connecting to the same machine?

In any case, setting DISPLAY=localhost:0.0 will only work if you
want the program to display on the same machine as yo have the
shell prompt on. If you used PuTTY to get the shell prompt, then
that is the remote machine. The "xhost +1" command is not going
to work for two reasons. The first is that it must be run in a
terminal that can already connect to the X server. The second is
that +1 says let computer 1 connect to the display. What you
probably wanted was to run "xhost +localhost". But is has to be
run in a term in the VNC client, and not from PuTTY.

For Ltsp, what you need to do is get X forwarding working in PuTTY.
This will set DISPLAY on the remote machine so that any program
you run on that machine can connect back to the local machine over
the PuTTY connection. (ssh connection)

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!




More information about the fedora-list mailing list