[Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why?

Michael Van Canneyt michael at freepascal.org
Thu Oct 31 11:26:26 CET 2019



On Thu, 31 Oct 2019, Bo Berglund via lazarus wrote:

> On Thu, 31 Oct 2019 11:06:17 +0100, Bo Berglund via lazarus
> <lazarus at lists.lazarus-ide.org> wrote:
>
>> I am working on a program intended to be run by cron in unattended
>> mode on a Raspberry Pi without GUI installed.
>>
>> I started it in Windows but have now moved the sources over to
>> Raspbian for building on that platform and it does not work as
>> expected...
>>
>
> After posting here I went into project options and looked for
> something that could relate to the GUI being present and then I found
> this:
>
> Project/ProjectOptions/CompilerOptions/AdditionsAndOverrides/SetLCLWidgetType/
>
> Here was a selection "nogui", which I set and now the error
> disappeared!!!
>
> Hard to find but seems like I am OK for now...

You can't run a Linux LCL graphical program through putty, unless you have an X
session running on your windows machine, and you set up the necessary port forwarding.

What you did in the options is simply completely disable the GUI. 
As a result, the linux program does not try to connect to the X server.

If the program works 100%, you should ask yourself why you needed the GUI
routines in the first place ?

Michael.


More information about the lazarus mailing list