RunProgram

Linux specific forum
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 153
Joined: Thu Dec 28, 2023 9:04 pm

RunProgram

Post 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
infratec
Always Here
Always Here
Posts: 7618
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: RunProgram

Post 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.
AZJIO
Addict
Addict
Posts: 2191
Joined: Sun May 14, 2017 1:48 am

Re: RunProgram

Post by AZJIO »

OpenConsole + PrintN?
In the compiler settings, enable "Console"
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 153
Joined: Thu Dec 28, 2023 9:04 pm

Re: RunProgram

Post 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
Post Reply