So it is currently possible to use simple library calls in glib-based code to run something as root, by taking advantage of the gksu policykit mechanism:
GksuProcess* gksu_process_new(const gchar
*working_directory, const gchar **arguments);
gboolean gksu_process_spawn_async(GksuProcess *process, GError **error);
The DBus service already works; it is able to setup the environment and X authorization correctly. There is still lots to do; startup notification is still not handled, and dealing with the application’s stdandard output and error messages, as well as providing a way for the caller to send stuff into the processe’s standard input. It is already possible to start an application and know that it has been finished, though.
As for the code:
$ git clone git://kov.eti.br/srv/git/gksu-polkit.git/
Criticism is welcome!
In other news… I’d like to ask our dear lazy web if anyone is using some nice way of providing only posts tagged in specific categories in a feed in wordpress. I’d like to use that to provide my posts to planet debian from my wordpress install.