I am having a problem with RunProgram. I am running software but when I try to read the output, it is completely blank, but it is only blank when I'm running it on a stripped down version of Debian 12. If I'm using my full install of Debian 12 with LXQT it reads the program just fine.
The install I'm using is described in the readme of my software:
https://gitlab.com/trs-eric/picotron-laptop-bridge
Specifically, my small version of Debian is running LightDM and Openbox, and xterm is installed but I don't think PB cares about that.
Code: Select all
Define batstat.i = RunProgram("acpi", "","", #PB_Program_Open | #PB_Program_Read | #PB_Program_Error)
Define batterystat.s = ""
If IsProgram(batstat)
While ProgramRunning(batstat)
If AvailableProgramOutput(batstat)
Define text.s = ReadProgramString(batstat)
If ReadProgramString(batstat) <> ""
batterystat = batterystat + text + Chr(13)
EndIf
EndIf
Wend
batterystat = batterystat + ReadProgramError(batstat)
EndIf
logmsg(batterystat,#debug)
If Trim(Trim(StringField(batterystat, 2, ",")),"%") <> ""
batterylevel = Val(Trim(Trim(StringField(batterystat, 2, ",")),"%"))
EndIf
I've determined this because I log call outputs this (the second line is blank which should be the output):
2024/04/02 21:39:22|Console command: acpi
2024/04/02 21:39:22|
Expected output:
2024/04/02 21:46:14|Console command: acpi
2024/04/02 21:46:14|Battery 0: Full, 0%, rate information unavailable
Is there some linux library that needs to be installed to read from the console? I checked through the PB requirements and I don't really see anything that's relavent.