2 Sep 2008 kov   » (Journeyer)

gksu-polkit gets pipe support

One of the features I really wanted to get into gksu-policykit early was working correctly with pipes. With the current gksu you cannot do something such as echo blah | gksu tr a-z A-Z. It is actually very hard to work correctly with input/output with su and sudo bellow. I do think it also has something to do with me not being too clever in UNIX file descriptors at the time I originally planned how gksu works. I did get an email from someone at Sun offering to write support for that who never mailed me again, but anyway…

gksu-policykit is currently able to get all the input and output forwarded to/from the process by using an interface similar to glib’s g_spawn_async_with_pipes. Here’s what we are able to do already:

$ echo test string | ./gksu/gksu-polkit /usr/bin/tr a-z A-Z

It’s impressive to me that all the input and output goes over DBus quite nicely.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!