[Portland] xdg-su syntax

Kevin Krammer kevin.krammer at gmx.at
Tue Jul 11 04:23:01 PDT 2006

On Monday 10 July 2006 22:57, Bastian, Waldo wrote:
> Hi,
> It was suggested to me that it would be better for xdg-su to follow the
> "sudo"-syntax rather than the "su -c" syntax because it has less
> potential for getting the shell escaping wrong.
> For illustration, to run "rpm -i '/tmp/some file'" as root the current
> syntax is:
> 	xdg-su -c "rpm -i '/tmp/some file'"
> The new proposed syntax would be:
> 	xdg-su rpm -i "/tmp/some file"
> The drawback seems to be that if you want to do a shell command like
> "cd /tmp; rpm -i 'some file'" you will still end up with
> 	xdg-su sh -c "cd /tmp; rpm -i 'some file'"
> Opinions?

I guess the question is which of the two calls is more likely.

Unless there is a real frequently used call with multiple commands, I'd prefer 
having the sudo syntax, since any kind of additional escaping makes the 
invocation more complex, especially when passing filenames/paths as 


Kevin Krammer <kevin.krammer at gmx.at>
Qt/KDE Developer, Debian User
Moderator: www.mrunix.de (German), www.qtcentre.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/portland/attachments/20060711/4efd73c2/attachment.pgp

More information about the Portland mailing list