I am trying to extract information from Rhythmbox via dbus , but I only want to do this if Rhythmbox is running. Is there a way to check if Rhythmbox works through Python without starting it if it doesn't work?
Whenever I call the dbus code as follows:
bus = dbus.Bus() obj = bus.get_object("org.gnome.Rhythmbox", "/org/gnome/Rhythmbox/Shell") iface = dbus.Interface(obj, "org.gnome.Rhythmbox.Shell)
and Rhythmbox is not running, it starts it.
Is it possible to check via dbus if the Rhythmbox works without actually starting it? Or is there any other way, besides parsing the list of running processes, to do this?
source share