Why does this program not work in Linux?
Result = RunProgram("/usr/bin/xterm","-help","~")
Debug(Result)
Result shows 1 however terminal window does not appear
However, this program without parameters does work.
Result = RunProgram("/usr/bin/xterm")
Debug(Result)
Testing with Linux Mint LMDE 6
runprogram() question
Re: runprogram() question
I'm not a linux user... so this is just a guess.dmontaine wrote: Sat Sep 30, 2023 6:19 pm Why does this program not work in Linux?
Result = RunProgram("/usr/bin/xterm","-help","~")
Debug(Result)
Result shows 1 however terminal window does not appear
However, this program without parameters does work.
Result = RunProgram("/usr/bin/xterm")
Debug(Result)
Testing with Linux Mint LMDE 6
for the "-help" version, xterm runs and exits. so the program has run and exited.
You need to use the constants for reading stdout.
For the "xterm" only (no -help) it launches the program and waits for it to finish.
Re: runprogram() question
Yes,
if you want to capture text output you need the additional Flags for RunProgram() and read the values.
if you want to capture text output you need the additional Flags for RunProgram() and read the values.
Re: runprogram() question
It probably appears but closes so quickly that you don't have time to see it.dmontaine wrote: Sat Sep 30, 2023 6:19 pm Why does this program not work in Linux?
Result = RunProgram("/usr/bin/xterm","-help","~")
Debug(Result)
Result shows 1 however terminal window does not appear
However, this program without parameters does work.
Result = RunProgram("/usr/bin/xterm")
Debug(Result)
Testing with Linux Mint LMDE 6
If the help displayed is less than one screen page long, then the default pager ("more" or "less") (if set) is not called and the program is terminated, so the shell window (xterm) closes.
Try use #PB_Program_Wait : Wait until the launched program quits
-
- Enthusiast
- Posts: 581
- Joined: Wed Sep 25, 2019 10:18 am
Re: runprogram() question
Compiler Executable
Terminal or xterm:
Code: Select all
RunProgram("/usr/bin/xterm","-help","~")
Code: Select all
kulow@kulow-G73Jw:/tmp$ ./xhelp.out
kulow@kulow-G73Jw:/tmp$ XTerm(372) usage:
xterm [-options ...] [-e command args]
where options include:
-/+132 turn on/off 80/132 column switching
-C intercept console messages
-Sccn slave mode on "ttycc", file descriptor "n"
-T string title name for window
...