gksudo grab to many options

Bug #570202 reported by soundpartner on 2010-04-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gksu (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: gksu

when using gksudo in a script (to get a popup asking password) or at comandline, gksudo graps to many options.

eksample.
running "sudo -K aptitude safe-upgrade -y" results in the following:
sudo uses the -K option (forget password after the command has been executed) and starts aptitude safe-upgrade. aptitude gets the -y option (assume yes ) this is all fine and as it should be. it is also possible to use gksudo.
using same (or almost same command with gksudo)
"gksudo aptitude update" this works, and you are prompted for your password in a graphical popup however if i want aptitude to receive the -y option "gksudo aptitude safe-upgrade -y" then it is gksudo that grab the -y option and not aptitude.

you can try it your selves all commands using gksudo and options gksudo grab all the options and not just the options that are mindet at gksudo

therefore
"sudo dpkg -i pakket.deb" works but "gksudo dpkg -i pakket.deb" does not as it is executed as "gksudo -i dpkg pakket.deb" gksudo doesn't recognise the -i option and dpkg is missing the option

"sudo aptitude safe-upgrade -y" works but "gksudo aptitude safe-upgrade -y" is executed as "gksudo -y aptitude safe-upgrade" and gksudo is complaining that it doesn't recognise the -y option.

therefore this must be an bug in gksudo

btw this affects both 9.04 and 9.10
i haven't tried on 10.04 but think it would be same problems here

Marc Tardif (cr3) wrote :

This bug seems to be a rite of passage for people using gksudo for the first and potentially last time. For other people passing by this bug report, just separate the gksudo options from the command with two dashes:

gksudo -- safe-upgrade -y

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers