[Lazarus] Remote application
Michael Schnell
mschnell at lumino.de
Wed Oct 31 10:13:43 CET 2012
I understand that there are (at least) two ways to do the remote display.
A) Read the pixels from the graphics driver. This is what VNC does. The
problem here is, that you don't know when an update is necessary (and
thus you need to do polling) and that reading the pixels needs a lot of
performances (get a GDI-handle, read the complete screen memory via the
bus and then transfer only the pixels that have changed). (In fact some
time ago I stole this code from VNC, translated it from C to Pascal and
did a thingy that could transfer a rectangle of the screen via TCP to
another PC.)
or
B) Hook into the interface between the application and the Windows
manager. This is what Linux "Remote X" and Windows "Remote Desktop" do.
VirtualBox (and supposedly VMWare) seems to be able to do do this, too,
and here I did already see that it is possible to virtualize a single
program rather than a complete Desktop.
Seemingly NX can do both, depending on the situation.
It's understandable that doing (B) is at least "difficult", when you
want to attach to a running program, as supposedly a program transfers
some information when starting and the Window manager needs to know same
even when it requests a full repaint. But obviously Windows "Remote
Desktop" can handle this problem decently.
So attaching to an already running program (not the Desktop it runs on)
using (B) is not that easy :-( . Maybe it's possible to something like
starting another instance of the program with NX in the way you
originally described and do some magic within the program itself to meld
the running instance into the newly started one. (Just raving...)
-Michael
More information about the Lazarus
mailing list