Bugzilla – Bug 133942
gnome-desktop incorrectly launches gnomesu when Exec entry has params
Last modified: 2005-11-16 14:32:02 UTC
We currently patch gnome-desktop/libgnome-desktop/gnome-desktop-item.c to launch gnomesu with the Exec entry from the .desktop file if the .desktop file needs additional rights. However if the Exec entry has params we don't generate the command line to gnomesu correctly and it fails. Launch /usr/share/applications/YaST2/users.desktop for example.
Created attachment 57430 [details] Exec entry with params patch
Hi Stanislav Brabec, It appears from the gnome-desktop.changes file that you own the X-KDE-SubstituteUID.dif file that prepends the gnomesu onto the Exec entry. I am not very familiar with the internals of gnome-desktop and would like your opinion on which would be the better solution so I am temporarily assigning this to you for your input. 1. Prepend a -c before the quoted Exec entry 2. Don't enclose the command line in quotes. I have tried launching the mentioned users.desktop file both ways and they both seem to work. Attached is the modified patch using solution 1.
This is not my patch. I have only changed kdesu to gnomesu, but well: 3. Don't enclose the command line in quotes. and prepend a -- before the exec entry. It will prevent problems with quoted arguments and --arguments. Please compare: 1) broken: gnomesu -c "/sbin/yast2 "a b" --sw_single" 2) broken: gnomesu "/sbin/yast2 "a b" --sw_single" 3) works: gnomesu -- /sbin/yast2 "a b" --sw_single
Fixed patch submitted for STABLE. I did not yet tested it, but I hope that it works.
Tested with users.desktop and it seems to work.