Monday, 3 August 2009

Against the wind (part 2)

Man, these things are temperamental.

I thought that su-to-root would be a straight-forward, reliable way to deal with Skinny root access issues, but … no. What I want is a nice GUI interface to allow users to access root functions. In theory,

su-to-root -X -c <command>

does that, except it doesn’t work with all X apps. For example, when I try it with rox, I get the gksu-based password prompt, then … nothing. No rox, no warnings, no errors. It works fine with iceweasel and a whole bunch of other apps though. Is it something that rox is doing strange, something that su-to-root is doing strange, something that gksu is doing strange …?

Getting rid of the -X option so that you are prompted for the password via the command line

su-to-root -c <command>

works fine with everything I’ve thrown at it. But there’s no way to script the password to the command, so there’s no way to e.g. write a GUI zenity wrapper for it. Grrr…

On the other hand, my stupid zenity sudo wrapper seems to work fine, but it introduces a (very small IMHO) security issue.

I was leaning toward a changeover to su-to-root, but now I’m leaning toward using my stupid zenity sudo wrapper—for now. It will require the least amount of change to the existing SkinnyDebbie code and make life for the user easier and more predictable, at the cost of a small reduction in security. I will also try to figure out better what’s going on with gksudo and su-to-root (why they don’t behave as expected) and if necessary release an update to Skinny stuff that solves all the problems.