Package: gksu Severity: normal Version: 2.0.0-5 The "preserve-env" option does not work as advertised:
"""
--preserve-env, -k
Preserve the current environments, does not set $HOME nor
$PATH, for example.
"""
As a testcase:
% export FOO="bar"
% gksu -- /bin/sh -c "echo FOO=\$FOO"
FOO=
% gksu -k -- /bin/sh -c "echo FOO=\$FOO"
FOO=
I would have expected that, when specifying "-k", gksu would preserve the FOO
environment variable for the target program.
At least in gksudo mode, specifying "--preserve-env" seems to just toggle
passing "-H" to sudo, which toggles whether HOME is preserved:
% gksu -- /bin/sh -c "echo HOME=\$HOME"
HOME=/root
% gksu -k -- /bin/sh -c "echo HOME=\$HOME"
HOME=/home/lamby
To really have "Preserve the current environments" semantics, shouldn't -H
be replaced with -E?
Regards,
--
Chris Lamb, UK [EMAIL PROTECTED]
GPG: 0x634F9A20
signature.asc
Description: PGP signature

