Efficient way to display domU output in dom0 panel?

Hi,

What would be an efficient and correct way to display info from a domU on dom0’s XFCE panel?

I have tried using a generic monitor widget polling a script in the domU but it seems too laggy (qvm-run introduces about 200-300ms delay). Additionally, synchronizing the reading of script output and its writing is somewhat challenging in such a setup.

I see that sys-net displays its own network manager applet in dom0’s panel. I wonder how this is done and if something similar is possible/suitalbe.

XY: I am trying to create a simple network monitor.

1 Like

Nice topic! I thought about this myself, but did not afford the time to dig through the sources.

In dom0, the zone where those icons appear is:
user 4218 4090 11:15 ? 00:00:00 /usr/lib64/xfce4/panel/wrapper-2.0 /usr/lib64/xfce4/panel/plugins/libsystray.so 6 14680074 systray Status Tray Plugin Provides status notifier items (application indicators) and legacy systray items

… where 4090 is the pid of the main xfce4-panel process.

So it is a wrapper that Qubes uses to pass icons to dom0…

So it is a wrapper that Qubes uses to pass icons to dom0…

How does this work? Where can I read?

sys-net only launches the nm-applet [1] (in sys-net) from network-manager (not from a qube package), and the applet is displayed in the dom0 tray bar.

So use an existing applet and launch it or write your own applet in your favorite qube (domu).

[1] In my debian-template based sys-net:

user@sys-net:~$ ps ax | grep nm-applet
...
   1139 ?        Sl     0:00 nm-applet
...
user@sys-net:~$ dpkg -S $(which nm-applet )
network-manager-gnome: /usr/bin/nm-applet

Example 1 :

  • launch a dispvm
  • inside a terminal of the dispvm, run nm-applet
  • you see a second network applet in the dom0 tray bar

Example 2 :

  • launch a debian dispvm
  • inside a terminal of the dispvm, run sudo apt install openpgp-applet
  • then run openpgp-applet in this terminal
  • you see a new openpgp applet in the dom0 tray bar

So you should find a network applet with stats and eventually change it to your needs.

So you should find a network applet with stats and eventually change it to your needs.

Does that mean that the domU would need XFCE packages installed?

No. For example, the nm-applet isn’t in an XFCE package.

1 Like

Thank you.