Recent

Author Topic: Creating a terminal window  (Read 353 times)

chucky

  • New Member
  • *
  • Posts: 42
Creating a terminal window
« on: October 01, 2025, 09:45:40 pm »

Res := fpSystem('/usr/bin/xfce4-terminal')

will open a new tty .

To send logging information to this terminal you could use

Assign(tf,/dev/pts/XX where XX = actual tty number
ReWrite(tf);
WriteLn(tf,'This is a log entry'
Close(tf);

How can your program determine which XX was used for the new tty?


marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12536
  • FPC developer.
Re: Creating a terminal window
« Reply #1 on: October 01, 2025, 09:54:36 pm »
termios.ttyname?

Thaddy

  • Hero Member
  • *****
  • Posts: 18363
  • Here stood a man who saw the Elbe and jumped it.
Re: Creating a terminal window
« Reply #2 on: October 02, 2025, 09:33:58 am »
termios.ttyname?
The bots did not scape that, Marco
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

 

TinyPortal © 2005-2018