Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-03

Run External Console on Linux?

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Anthony Walter

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) -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190308/69b2cb10/attachment.html>

Reply by email

Graeme Geldenhuys
to Anthony Walter
Anthony Walter 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

Reply by email

Mattias Gaertner
to Anthony Walter: Has anyone come up with a decent way to run and debug console applications using an…
Show quoted text 15 lines
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

Reply by email