Possible to run shell command in a root window

Is it possible to run a shell command in a root gui window?

I have a root gui and would like to run a shell command in a root canvas so the user can watch the shell output in real time.

This would be for both linux and windows.

The shell command would have to be async (it’s own process), so as to not hang up the root gui.

I see V5.24 has GetFromPipe(), but I don’t think this will let the command run async, or allow me to monitor the output as it occurs. Plus we’re not on 5.24 .

thanks.

Hi,

I’d create a separate thread for the shell interaction, and then e.g. send messages to ROOT (i.e. its GUI thread) so it gets updated. You should use OpenPipe() to have a live update.

Cheers, Axel.

[quote=“mrsoft99”]. . . I . . . would like to run a shell command in a root canvas so the user can watch the shell output in real time. . . .
[/quote]Can you elaborate a little bit more about your task :confused: What did you mean speaking “shell in a root canvas” :unamused: ?