Re: [Lazarus] Writing a Lazarus program with its own display, RFB?
-- Forwarded message -- From: Michael Schnell mschn...@lumino.de To: Lazarus mailing list lazarus@lists.lazarus.freepascal.org Cc: Date: Wed, 20 Nov 2013 14:52:27 +0100 Subject: Re: [Lazarus] Writing a Lazarus program with its own display, RFB? On 11/20/2013 01:29 PM, vfclists . wrote: My question was to see if the third option is possible with Lazarus, ie whether it is possible to get Lazarus screen output to be targetted at a VNC compatible system, ??? Handling the Lazarus screen output is just the contrary of the third option. but I think that is outside my knowledge and skill level. In fact the third option is the easiest to do (unless you find something already functional for another option). So the option I have settled for is the first. This _is_ in fact already functional, in multiple ways of desktop remoting, including native X11 via TCP/IP, NX, VNC, Windows Remote Desktop, ... (and has nothing to do with Lazarus itself or the program you are doing at all). -Michael I came across this really cool way to embed a vnc session on a web page using flash: http://flashlight-vnc.sourceforge.net/ So it is an easy way to get lazarus apps running on a web page if that helps. -- Regards Danny -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Writing a Lazarus program with its own display, RFB?
On 11/20/2013 02:32 AM, vfclists . wrote: Thanks for the suggestions. By editing out most of the lines in ~/.vnc/xstartup I have been able to make some progress What progress exactly ? Still I don't know what you are up to: - remoting your Lazarus program's GUI in _some_ way (VNC is just one convenient option) - remoting your Lazarus program's GUI (VNC is a must. Because of what reason ??? ) - have you program create a graphical object independent from it's Lazarus GUI, and have a remote PC view this object via VNC. ?? -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Writing a Lazarus program with its own display, RFB?
On 11/20/2013 01:29 PM, vfclists . wrote: My question was to see if the third option is possible with Lazarus, ie whether it is possible to get Lazarus screen output to be targetted at a VNC compatible system, ??? Handling the Lazarus screen output is just the contrary of the third option. but I think that is outside my knowledge and skill level. In fact the third option is the easiest to do (unless you find something already functional for another option). So the option I have settled for is the first. This _is_ in fact already functional, in multiple ways of desktop remoting, including native X11 via TCP/IP, NX, VNC, Windows Remote Desktop, ... (and has nothing to do with Lazarus itself or the program you are doing at all). -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Writing a Lazarus program with its own display, RFB?
On 19/11/13 00:30, vfclists . wrote: I want to write a program to provide its own remote display without an X Window server, ie the program has its own display which can be connected to via VNC server. There is a libvncserver/libvnclient project at http://libvncserver.sourceforge.net/ which enables one to do that, but I don't know where to start or even know who all the parts come together. My main questions are: [...] 2. If I am willing go with X Windows is it possible to dedicate a single X Window to a program alone, without using an Desktop Manager or Window Manager and link it with VNC, as though it is the program alone that displays on that X Window? Check out x11vnc - it can open an existing X screen and provide it for vnc connection - and xinit - lets you open new X screen, with or without a Window Manager. -L. -- Frank Church -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Writing a Lazarus program with its own display, RFB?
On 11/19/2013 01:30 AM, vfclists . wrote: I want to write a program to provide its own remote display without an X Window server, ie the program has its own display which can be connected to via VNC server. VNC server (in Linux) does provide an X server. So this should not be a problem of Lazarus, but of setting up the runtime environment appropriately. -Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Writing a Lazarus program with its own display, RFB?
Lukasz Sokol wrote: Check out x11vnc - it can open an existing X screen and provide it for vnc connection - and xinit - lets you open new X screen, with or without a Window Manager. Noting that on unix VNC provides an X server, so if you could tell that to disregard the normal startup and run without a display manager etc. you could then draw onto it directly. Another alternative would be some variant of FPGUI, wasn't somebody looking at that on top of the svga library? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Writing a Lazarus program with its own display, RFB?
On 11/19/2013 10:41 AM, Michael Schnell wrote: On 11/19/2013 01:30 AM, vfclists . wrote: I want to write a program to provide its own remote display without an X Window server, ie the program has its own display which can be connected to via VNC server. VNC server (in Linux) does provide an X server. So this should not be a problem of Lazarus, but of setting up the runtime environment appropriately. Second thought: You of course can do a program that opens a TCP/IP server socket and uses the (supposedly decently documented) VNC protocol on same. I understand this is rather easy if you just want to provide a rectangle of pixels (independent from the program's GUI) and have it displayed by the VNC client on a PC. If you want to remote the GUI of the Program without a trace of an X-Server (thus without using the VNC-Server product, but via a TCP/IP socket of your program itself), this might be possible by enhancing the CustomDrawn Widget Type appropriate. But supposedly this is a lot of work to do. -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Writing a Lazarus program with its own display, RFB?
On 19/11/13 09:48, Mark Morgan Lloyd wrote: Lukasz Sokol wrote: Check out x11vnc - it can open an existing X screen and provide it for vnc connection - and xinit - lets you open new X screen, with or without a Window Manager. Noting that on unix VNC provides an X server, so if you could tell that to disregard the normal startup and run without a display manager etc. you could then draw onto it directly. AFAIK it requires special X invocation to start it, or additional vnc server program (or for the matter, a special build of X server, in Debian a separate package...) started if the session exists already - x11vnc does it for you (why would a program like Vino have to exist if this is achievable with just X ?) Additionally x11vnc / vnc X server deals with encryption so if you work it over the Internet it's useful (and in a local network it's not like it isn't useful either - otherwise e.g. all the keystrokes are sent in open text) Another alternative would be some variant of FPGUI, wasn't somebody looking at that on top of the svga library? -L. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Writing a Lazarus program with its own display, RFB?
Lukasz Sokol wrote: On 19/11/13 09:48, Mark Morgan Lloyd wrote: Lukasz Sokol wrote: Check out x11vnc - it can open an existing X screen and provide it for vnc connection - and xinit - lets you open new X screen, with or without a Window Manager. Noting that on unix VNC provides an X server, so if you could tell that to disregard the normal startup and run without a display manager etc. you could then draw onto it directly. AFAIK it requires special X invocation to start it, or additional vnc server program (or for the matter, a special build of X server, in Debian a separate package...) started if the session exists already - x11vnc does it for you (why would a program like Vino have to exist if this is achievable with just X ?) Standard VNC is /completely/ separate from the standard X server on any given system, except that some variant has the capability of scraping a pre-existing window for support purposes. I normally start up multiple copies in /etc/inittab, specifying what socket each is listening on; at that point any activity on the console X server (or even the absence of a console X server) is completely irrelevant. So the issue isn't starting VNC and keeping it separate from the console's X session, but is one of making sure that VNC doesn't fire up the default display/window managers. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Writing a Lazarus program with its own display, RFB?
On 11/19/2013 11:23 AM, Felipe Monteiro de Carvalho wrote: You could implement it as a new backend for LCL-CustomDrawn: http://wiki.freepascal.org/Custom_Drawn_Interface Looking at this page triggers long-wanted stuff: - a HTML backend that is able to be attached via HTTP (directly or via e.g. fastGCI or Microsoft IIS/ISAPI) - a remote backend that implements a propriety bi-directional byte-stream protocol that on the other site of the pipe can be attached by a Lazarus program serving as a Custom-Drawn-Viewer Is something like this planned in the foreseeable future ? Maybe one of these in effect is what the OP wants and VNC was just a variant that could be considered. -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Writing a Lazarus program with its own display, RFB?
On 19 November 2013 00:30, vfclists . vfcli...@gmail.com wrote: I want to write a program to provide its own remote display without an X Window server, ie the program has its own display which can be connected to via VNC server. There is a libvncserver/libvnclient project at http://libvncserver.sourceforge.net/ which enables one to do that, but I don't know where to start or even know who all the parts come together. My main questions are: 1. Is it possible to direct the output of a Lazarus LCL program into such a display system, or perhaps replace the parts where it interacts with X Windows to such a system. 2. If I am willing go with X Windows is it possible to dedicate a single X Window to a program alone, without using an Desktop Manager or Window Manager and link it with VNC, as though it is the program alone that displays on that X Window? 3. Is there some place I can get some more information about this RFB system of display programs if that is the right term? -- Frank Church=== Thanks for the suggestions. By editing out most of the lines in ~/.vnc/xstartup I have been able to make some progress #!/bin/sh # xrdb $HOME/.Xresources # xsetroot -solid grey # x-terminal-emulator -geometry 80x24+10+10 -ls -title $VNCDESKTOP Desktop ~/program/program #x-window-manager # Fix to make GNOME work #export XKL_XMODMAP_DISABLE=1 # /etc/X11/Xsession I commented out everything except the command to run the program and I get a shaded gray screen with my program, but without the headers and menu which I suspect are placed there by the window manager. I have also noticed XTightvnc and its parameters in the process list and it looks to me that they are key to getting the results I need. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Writing a Lazarus program with its own display, RFB?
I want to write a program to provide its own remote display without an X Window server, ie the program has its own display which can be connected to via VNC server. There is a libvncserver/libvnclient project at http://libvncserver.sourceforge.net/ which enables one to do that, but I don't know where to start or even know who all the parts come together. My main questions are: 1. Is it possible to direct the output of a Lazarus LCL program into such a display system, or perhaps replace the parts where it interacts with X Windows to such a system. 2. If I am willing go with X Windows is it possible to dedicate a single X Window to a program alone, without using an Desktop Manager or Window Manager and link it with VNC, as though it is the program alone that displays on that X Window? 3. Is there some place I can get some more information about this RFB system of display programs if that is the right term? -- Frank Church === http://devblog.brahmancreations.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus