Page 1 of 1

RunProgram

Posted: Fri Aug 02, 2024 12:17 pm
by rndrei
Why doesn't the following code work on Linux? It is necessary to open the term inal and execute the command

Code: Select all

Compiler = RunProgram("gnome-terminal", "", "", #PB_Program_Open | #PB_Program_Read|#PB_Program_Write|#PB_Program_Connect)
  Input$ = "./hello"
  If Compiler
    WriteProgramStringN(Compiler, Input$, #PB_UTF8)
    CloseProgram(Compiler)
  EndIf

Re: RunProgram

Posted: Sat Aug 03, 2024 9:04 pm
by infratec
:?: :?: :?:
Why not:

Code: Select all

RunProgram("hello", "", "", #PB_Program_Wait)
Maybe you need to add the full path of hello.
But the terminal closes when the programm is finished.
Maybe you can add a sleep in your hello code.

Re: RunProgram

Posted: Sat Aug 03, 2024 9:36 pm
by AZJIO
OpenConsole + PrintN?
In the compiler settings, enable "Console"

Re: RunProgram

Posted: Sun Oct 20, 2024 4:56 pm
by rndrei
1.I need a terminal window to open in the GUI application when I click on the button!?
2.And how to find out if the application is running from a terminal window or through a file browser