Bug 57921 - Clarify the xdg-su man page
Summary: Clarify the xdg-su man page
Status: NEW
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: beta2
Hardware: Other All
: medium normal
Assignee: Portland Bugs
QA Contact:
Depends on:
Reported: 2012-12-05 19:19 UTC by Francois Gouget
Modified: 2015-12-07 10:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Better check the -u and -c options and document -c (925 bytes, text/plain)
2012-12-05 19:19 UTC, Francois Gouget

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Gouget 2012-12-05 19:19:33 UTC
Created attachment 71040 [details]
Better check the -u and -c options and document -c

The xdg-su man page says:

>  xdg-su [-u user] -c command
>  xdg-su provides a graphical dialog that prompts the user for a
>  password to run command as user or as root if no user was specified.

The '-c' option is not documented and this does not clearly say if one should use 'xdg-su -c echo HelloWorld' or 'xdg-su -c "echo HelloWorld"'.

The example at the end of the page seems to imply the latter but then it's only one example and one may think that a second example could show that the other option is valid too.

>  xdg-su -u root -c "/opt/shinythings/bin/install-GUI --install fast"

I'll further note that the situation is muddied by the fact that

  xdg-su -c sh -c 'echo HelloWorld'

is equivalent to

  xdg-su -c foo -c 'echo HelloWorld'

and to

  xdg-su -c 'echo HelloWorld'

due to the limited parameter checking.

I'm attaching a patch as a starting point for a fix.
Comment 1 Francois Gouget 2012-12-05 19:22:17 UTC
One more note, I ran into with:

xdg-utils-1.0.2-93.1.noarch on SUSE 11.4 (xdg-su 1.0beta2)
Comment 2 Francois Gouget 2012-12-05 19:27:32 UTC
I have now checked that the issue is still present in the current Git tip (050333e3).
Comment 3 Francois Gouget 2015-12-07 10:17:57 UTC
This bug is still present in b110b355 (2015/11/12).
So any news on this?
It has been three years and it looks like no progress was made...

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.