Tooony
Tooony

Reputation: 3899

X window forwarding?

How could I forward the X window output from a program under Linux (Debian Lenny)? Any suggestions and / or experience?

The easiest way would be to restart the process with a new DISPLAY enviroment variable, but I don't want to take down the process at all. What I'd like is to change the X output to another machine "on the fly"...

Apparently there are some "X proxies" out there that can do this for me, but I haven't got any experience in this nor can Google give me a quick solution.

[edit]Clarification: I do not want to forward the full desktop (with VNC or similar) neither do I want to just forward one window. I want to forward all the output from a certain process, without restarting the process.[/edit]

Upvotes: 1

Views: 1744

Answers (5)

timday
timday

Reputation: 24892

Sounds like a job for xmove. It's in Debian (although unfortunately Lenny seems to be missing it; maybe the sid version will work ?) and Ubuntu.

Upvotes: 2

Tooony
Tooony

Reputation: 3899

Since there's no answers given so far, only suggestions to do something else, I thought I'd answer my own question. :-)

The closest I can get to doing what I want is to use x11vnc on Linux (as an X server) and Ultra VNC as a client on Windows. There might be other VNC clients that also support connectiong to a single window, but I found Ultra VNC and stopped looking.

Both x11vnc and Ultra VNC got protocol support for forwarding a single window only. There's a bit of configuration to do, and it will only forward the one window, not any new window created from the same process. Pop-ups and dialouge windows might cause a problem, since they might show up on the non forwarded part of the desktop or just show a part on top of the original window...

That is the least bad solution I have found out so far.

Upvotes: 1

Slartibartfast
Slartibartfast

Reputation: 8805

ssh -Y user@server

-Y part tels ssh to tunnel X, so when I start some program from client, it will be shown on my screen. Down sides are that client must have X installed (doable but not practical on Windows) and it works only for programs you start from client, you can't hook up on existing video output.

Considering your edit, that you need to see video output of already started process, this approach obviously fails for you.

Upvotes: 2

Paul Tomblin
Paul Tomblin

Reputation: 182880

Your program has made a socket connection (possibly a unix domain socket, possibly a tcp/ip socket) to an X server. There is no way to redirect that socket connection elsewhere once it is open.

Maybe there is some proxy you can put in the middle between the client and the server (right from the start) which will redirect to a different server, but how will it create whatever X objects that were on the one server on the new server? It would have to be pretty damn smart about what had gone before, and replay every X command that came over the socket to the new server.

Upvotes: 2

Chris
Chris

Reputation: 9529

I don't think that on the fly is possible... But you could use VNC to see wats going on on the machine.

Not on the fly, but this tutorial might help: http://www.vanemery.com/Linux/XoverSSH/X-over-SSH2.html

Upvotes: 2

Related Questions