UDisks2 Python Automounting

Yet another full evening spent reading forums and mailing lists trying to hack together a few lines of code. Thanks, DBus. The following Python snippet auto mounts USB drives (I needed on an appliance with no any running evoluted desktop environment doing it). import dbus from dbus.mainloop.glib import…

ReloadOrRestartUnit

Given that I just spent two hours to write three lines of code, I share here my initial problem and the final solution for those looking for the same thing in the future (including myself). The problem is: in a graphical Python application running as a normal user, obtain authorization…