[Lazarus] Run External Console on Linux?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Run External Console on Linux?

Free Pascal - Lazarus mailing list
Has anyone come up with a decent way to run and debug console applications using an external terminal program on Linux? 

That is, you are writing a ReadLn and WriteLn console application in Lazarus, and when you run the program you can get an external program like gnome-terminal to popup. Then gnome-terminal hosts your console application until either your console application terminates or you close gnome-terminal.

I really don't like using the built in Lazarus terminal window. ReadLn doesn't work very well with it. It doesn't popup when you run or terminal the console application when closed. I'd really like to simulate an external terminal program like Lazarus does on Windows. (Please don't respond with why they are different. I understand the reasons)

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Run External Console on Linux?

Free Pascal - Lazarus mailing list
On 08/03/2019 14:05, Anthony Walter via lazarus wrote:
> external terminal program like Lazarus does on Windows. (Please don't
> respond with why they are different. I understand the reasons)

Not an immediate solution for you, but maybe useful to someone... The
MSEide+MSEgui has a cross-platform console component which its IDE uses.
It supports input and output from that popup console widget. No external
console/terminal application is required.

Maybe if somebody is interested in finally implementing a x-platform
solution for Lazarus, they could look at Martin's code and port it to
Lazarus.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Run External Console on Linux?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Fri, 8 Mar 2019 09:05:14 -0500
Anthony Walter via lazarus <[hidden email]> wrote:

> Has anyone come up with a decent way to run and debug console
> applications using an external terminal program on Linux?
>
> That is, you are writing a ReadLn and WriteLn console application in
> Lazarus, and when you run the program you can get an external program
> like gnome-terminal to popup. Then gnome-terminal hosts your console
> application until either your console application terminates or you
> close gnome-terminal.
>
> I really don't like using the built in Lazarus terminal window. ReadLn
> doesn't work very well with it. It doesn't popup when you run or
> terminal the console application when closed. I'd really like to
> simulate an external terminal program like Lazarus does on Windows.
> (Please don't respond with why they are different. I understand the
> reasons)

This works on many Linux distros:

Run / Run Parameters / Use Launching application

/usr/bin/xterm -T 'Lazarus Run Output' -e
$(LazarusDir)/tools/runwait.sh $(TargetCmdLine)

Probably there are similar flags for gnome-terminal.

Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Run External Console on Linux?

Free Pascal - Lazarus mailing list
Mattias,

Thanks that works great and is exactly what I was looking for!

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus