[Lazarus] Remote application

Bernd prof7bit at gmail.com
Mon Oct 29 18:43:47 CET 2012


2012/10/29 Antonio Fortuny <a.fortuny at sitasoftware.lu>:

>>> Using a remote Xwindows server (Are there good Xwindows server for
>>> win32?)
>>
>> I once used XMing. It did work, but I think NX Free seems more advanced.
>>
>> -Michael
>
> Right. I'm using it with OpenSuse 11.2 as server and a Windows client on
> Vista 32. Looks perfect until now.

NX also has the advantage you can just forward one application only,
not the entire desktop. A possible setup would be:

* write the application in Lazarus as usual, compile and install it on
a Linux box (so that it would operate normally if a local user sitting
in front of this linux pc started it it locally)

* install ssh server and freenx on this linux machine

* create a user account for every remote user with normal linux
administration tools.

* install nx client on the windows machine, configure it so that on
login it will start your application (not the desktop session, only
your application.

It will behave similar to old school X11 tunneling a single
application through an SSH tunnel, only 1000 times faster and workable
even on 56k modem connections. It will *not* start a full desktop
session for every user, it will essentially only start your
application as the only process for that user and will seamlessly
integrate all its windows into the client desktop.

Its easy to use for your users, essentially the user just clicks an
icon, enters his password, clicks ok and a few seconds later your
application will pop up on his desktop.

you don't need to design the application in any special way, you just
need to make it work on Linux/GTk2 (or Qt). Setup of nx on the server
is a childs play, at least on ubuntu, the last time i installed it
from scratch I did not need to configure anything, it just worked,
just make sure you can reach your ssh-server from the outside).

Technically it works like this:
* client logs in via ordinary ssh, gets a remote shell on the server
* client executes (through that remote shell) a script that starts nx
display proxy (yes, there is no permanent nx server process running
and waiting, only a thin wrapper gets started through the ssh shell
for each user after login, thats why the only thing that needs to be
configured is the ssh server) and then it starts your application.
* display and user interaction for this application (and all its child
processes and windows) will then be tunneled through the same ssh
connection.




More information about the Lazarus mailing list