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:

  1. copied /usr/share/locale-langpack/en_GB/LC_MESSAGES/polkit-1.mo
  2. unpacked it with msgunfmt polkit-1.mo -o polkit-1.po
  3. 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.

  1. packed it back with msgfmt polkit-1.po -o polkit-1.mo
  2. put it into /usr/share/locale/en_US/LC_MESSAGES/polkit-1.mo
  3. restarted polkit daemon systemctl restart polkit

And now I can get the full command

Answer from ov7a on askubuntu.com
🌐
ArchWiki
wiki.archlinux.org › title › Polkit
polkit - ArchWiki
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/software/polkit/policyconfig-1.dtd"> <policyconfig> <action id="org.gnome.gparted"> <message>Authentication is required to run the GParted Partition Editor</message> <icon_name>gparted</icon_name> <defaults> <allow_any>auth_admin</allow_any> <allow_inactive>auth_admin</allow_inactive> <allow_active>auth_admin</allow_active> </defaults> <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/gparted</annotate> <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> </action> </policyconfig> The attribute id is the actual command sent to D-Bus, the message tag is the explanation to the user when authentication is required and the icon_name is sort of obvious.
🌐
freedesktop.org
freedesktop.org › software › polkit › docs › latest › polkit.8.html
polkit: polkit Reference Manual
May 24 14:28:50 thinkpad polkitd[32217]: /etc/polkit-1/rules.d/10-test.rules:3: action=[Action id='org.freedesktop.policykit.exec' command_line='/usr/bin/bash -i' program='/usr/bin/bash' user='bateman' user.gecos='Patrick Bateman' user.display='Patrick Bateman (bateman)'] May 24 14:28:50 thinkpad polkitd[32217]: /etc/polkit-1/rules.d/10-test.rules:4: subject=[Subject pid=1352 user='davidz' groups=davidz,wheel, seat='seat0' session='1' local=true active=true]
🌐
SUSE
documentation.suse.com › sles › 12-SP5 › html › SLES-all › cha-security-policykit.html
Authorization with Polkit | Security and Hardening Guide | SLES 12 SP5
April 8, 2026 - Inside the file, the script checks for the specified action ID, which is defined in the .policy file. For example, if you want to allow the command gparted to be executed by any member of the admin group, check for the action ID org.opensuse.policykit.gparted:
🌐
Readthedocs
policykit.readthedocs.io › en › latest › gettingstarted.html
Installation and Getting Started — PolicyKit documentation
Optional, if following the file system architecture used in this guide: set the LOG_FILE field to /var/log/django/policykit/debug.log · Be sure to uncomment these fields by removing the # at the start of a line. You can leave the platform integration API keys/secrets empty for now. Follow the instructions below under Set up Integrations to set up each integration. Navigate up a directory and run the following command to create and set up the database:
🌐
Linux Man Pages
linux.die.net › man › 8 › polkit
polkit(8): Authorization Framework - Linux man page
For convenience, the libpolkit-gobject-1 library wraps the PolicyKit D-Bus API using GObject. However, a mechanism can also use the D-Bus API or the pkcheck(1) command to check authorizations.
🌐
ADMIN Magazine
admin-magazine.com › Articles › Assigning-Privileges-with-sudo-and-PolicyKit
Assigning Privileges with sudo and PolicyKit » ADMIN Magazine
The only problem is that apt-get requires administrative privileges, and you would not typically want to grant those to a regular user. Fortunately, admins can work with sudo or the PolicyKit authorization service to allow specific actions in a targeted way. ... The sudo tools runs commands with ...
🌐
openSUSE
doc.opensuse.org › documentation › leap › archive › 15.0 › security › html › book.security › cha.security.policykit.html
Authorization with PolKit | Security Guide | openSUSE Leap 15.0
PolKit comes with command line tools for changing privileges and executing commands as another user (see Section 9.1.3, “Available Commands” for a short overview). Each existing policy has a speaking, unique name with which it can be identified.
Find elsewhere
🌐
Wikipedia
en.wikipedia.org › wiki › Polkit
Polkit - Wikipedia
1 week ago - Fedora became the first distribution to include PolicyKit, and it has since been used in other distributions, including Ubuntu since version 8.04 and openSUSE since version 10.3. Some distributions, like Fedora, have already switched to the rewritten polkit. It is also possible to use polkit to execute commands ...
🌐
Ubuntu
manpages.ubuntu.com › focal › man(8)
Ubuntu Manpage: polkit - Authorization Framework
For convenience, the libpolkit-gobject-1 library wraps the PolicyKit D-Bus API using GObject. However, a mechanism can also use the D-Bus API or the pkcheck(1) command to check authorizations.
🌐
CommandLinux
commandlinux.com › man-page › man8 › polkit.8.html
polkit linux command man page
For convenience, the libpolkit-gobject-1 library wraps the PolicyKit D-Bus API using GObject. However, a mechanism can also use the D-Bus API or the pkcheck(1) command to check authorizations.
🌐
Readthedocs
policykit.readthedocs.io › en › latest › policy_examples.html
Policy Examples — PolicyKit documentation
This policy performs a 5-minute vote. It is triggered using a Slash command in a Discord channel. For example: ‘/policykit vote should we cancel todays meeting?’
🌐
openSUSE
doc.opensuse.org › documentation › leap › archive › 15.2 › security › html › book-security › cha-security-policykit.html
Authorization with PolKit | Security and Hardening Guide | openSUSE Leap 15.2
PolKit comes with command line tools for changing privileges and executing commands as another user (see Section 19.1.3, “Available Commands” for a short overview). Each existing policy has a speaking, unique name with which it can be identified. List all available policies with the command ...
🌐
Oracle
docs.oracle.com › cd › E88353_01 › html › E72487 › polkit-8.html
polkit - man pages section 8: System Administration Commands
July 27, 2022 - The Action and Subject types has suitable toString() methods defined for easy logging, for example, polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.policykit.exec") { polkit.log("action=" + action); polkit.log("subject=" + subject); } }); will produce the following when the user runs 'pkexec -u bateman bash -i' from a shell: May 24 14:28:50 thinkpad polkitd[32217]: /etc/polkit-1/rules.d/10-test.rules:3: action=[Action id='org.freedesktop.policykit.exec' command_line='/usr/bin/bash -i' program='/usr/bin/bash' user='bateman' user.gecos='Patrick Bateman' user.display=
🌐
GitHub
github.com › polkit-org › polkit
GitHub - polkit-org/polkit: polkit (formerly PolicyKit) is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes. · GitHub
List of available configuration options can be obtained with meson configure command.
Starred by 222 users
Forked by 82 users
Languages   C 93.5% | Meson 2.5% | Shell 2.5% | JavaScript 0.9% | Python 0.6% | Perl 0.0%
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_enterprise_linux › 7 › html › desktop_migration_and_administration_guide › policykit
Chapter 4. PolicyKit | Desktop Migration and Administration Guide | Red Hat Enterprise Linux | 7 | Red Hat Documentation
The PolicyKit utility is a framework that provides an authorization API used by privileged programs (also called mechanisms) offering services to unprivileged programs (also called subjects).
🌐
Readthedocs
policykit.readthedocs.io › en › latest › index.html
Welcome to the Docs for PolicyKit! — PolicyKit documentation
PolicyKit empowers online community members to concisely author a wide range of governance procedures and automatically carry out those procedures on their home platforms. Inspired by Nobel economist Elinor Ostrom, we’ve developed a framework that describes governance as a series of actions ...
🌐
Linux Command Library
linuxcommandlibrary.com › man › polkit
polkit man | Linux Command Library
It provides fine-grained control ... perform them. The framework consists of pkexec (execute privileged commands), pkaction (list/inspect actions), and pkcheck (check authorization)....
🌐
freedesktop.org
freedesktop.org › software › polkit › docs › latest › pkexec.1.html
pkexec: polkit Reference Manual
If the org.freedesktop.policykit.exec.argv1 annotation is present, the action will only be picked if the first argument to the program matches the value of the annotation. Note that authentication messages may reference variables (see the section called “VARIABLES”), for example $(user) will be expanded to the value of the user variable. To avoid modifying existing software to prefix their command-line invocations with pkexec, it's possible to use pkexec in a she-bang wrapper like this:
🌐
SUSE
documentation.suse.com › sles › 15-SP7 › html › SLES-all › cha-security-polkit.html
The Polkit authentication framework | Security and Hardening Guide | SLES 15 SP7
June 25, 2024 - Polkit comes with command-line tools for changing privileges and executing commands as another user (see Section 18.1.3, “Polkit Utilities” for a short overview). Each existing policy has a unique name with which it can be identified. List all available policies with the command pkaction.