[Sussex] Changing display of process

Steve Dobson steve at dobson.org
Wed Feb 11 12:48:06 UTC 2004


Stuart

On Wed, Feb 11, 2004 at 12:25:35PM -0000, Stuart Nixon wrote:
> on my home desktop i am running an x application.
> 
> on my laptop i have ssh'd (as same user who ran the x app) into the
> desktop machine and set up x forwarding which works.

Yes - ssh allows you to establish a network link and you can then use
the "-display <display-addr>" option that all X11 applications should
support to display the window elsewhere.  This can only be done when
the app is started and that display will be for the life of the app.

See the section "X11 and TCP forwarding" in the ssh man page.

> Is there any way  i can change the display the x app running on the
> desktop uses to use the window manager on my laptop via the ssh
> connection?

If the app is already running then use OpenVNC to "shadow" the remote
system screen.
 
> also via a termainal how can you move a running process from one terminal
> to another, eg from an SSH terminal to a console?

To do this would need kernel suppert as the "stream" the app is writing
to needs to take a completly different path.  AFAIK this is not possible
outside of clustered boxes (i.e. tightly coupled), and I'm not sure that
it is possible there - although there must be some re-routing of output
streams if the process is "swapped" to another host. - In other words 
I'm guessing :-)

However, if you know in advance that you want to view the output in
another terminal then I use something like this:
  $ app 2>&1 | tee /tmp/app.log
>From abother shell you can then type
  $ tail -f /tmp/app.log
to see the output as it is written

> please could anyone point me to some web resources on this.
man ssh
man openvnc
man tee

Steve
--
> Re-Boot or Be-Root

Be-Root - Re-Boot spoils your uptime :-)




More information about the Sussex mailing list