How does one create a GUI app on dom0?

Then you are very ahead of required time. Python is extremely easy to learn for an experienced C++ programmer. It is a little bit ugly at the beginning as it is not strongly typed (you do not need to define variables and their type prior to using them)

Here is a very simple demo program that does something Qubes related (although it is meaningless). It creates a window with the name of qubes:

#!/usr/bin/python3

import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
from qubesadmin import Qubes

myapp = Qubes()

mywin = Gtk.Window()
mywin.connect("destroy", Gtk.main_quit)
mybox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=2)
mywin.add(mybox)

for qube in myapp.domains:
    label = Gtk.Label()
    label.set_text(qube.name)
    mybox.pack_start(label, True, True, 0)

mywin.show_all()
Gtk.main()
3 Likes