How to force policy-kit agent to show full information about command line arguments
Solution 1:
The variable responsible for full command line with arguments is command_line
. To change it, one can create a custom policy as man pkexec
page suggests.
However, I've ended up editing LC_MESSAGES. My locale is en_US, so I've done these steps:
- copied
/usr/share/locale-langpack/en_GB/LC_MESSAGES/polkit-1.mo
- unpacked it with
msgunfmt polkit-1.mo -o polkit-1.po
- edited
polkit-1.po
msgid "Authentication is needed to run `$(program)' as the super user"
msgstr "Authentication is needed to run '$(program)' as the super user"
to
msgid "Authentication is needed to run `$(program)' as the super user"
msgstr "Authentication is needed to run '$(program)' ('$(command_line)') as the super user"
and several similar lines too.
- packed it back with
msgfmt polkit-1.po -o polkit-1.mo
- put it into
/usr/share/locale/en_US/LC_MESSAGES/polkit-1.mo
- restarted polkit daemon
systemctl restart polkit
And now I can get the full command