Showing live stdout from extension

I’m writing a GNOME panel indicator extension. Clicking on the indicator shows a menu where each item is a shell command (e.g. ping localhost), and clicking on an item runs the command.

The commands are run using Gio.Subprocess.new(), creating long-lived processes (i.e. the processes don’t exit immediately).

My question is as follows:

How can I show the process’ stdout/stderr in an updating fashion?
I Imagine a scrollable window popping up, showing the output as it is arrives (resembling a terminal window, except that you can’t input anything into it).

Is there a standard way of implementing this kind of window in GNOME extensions?
Is there an extension which does something similar (graphically speaking)?

I couldn’t find an answer to both of the last questions.

Thank you very much!

2 Likes

https://github.com/anybotics/gnome-shell-ping-monitor-applet might be close enough, but the extension has not been updated for past few years.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.