0

I am trying to make pkexec show my program's user-friendly name rather than its path. For example, Synaptic Package Manager says "Synaptic Package Manager," rather than "/usr/sbin/synaptic" in its dialogs. How could I do this?

  • My guess is that you can't, as it would be a security problem. You could make it show /usr/bin/gedit, when you're in reality running rootshell.bin – vidarlo Jun 6 '19 at 14:28
  • 1
    When I start, say, Synaptic, it says "Synaptic Package Manager" instead of a path. That is what I was referring to. – user963196 Jun 6 '19 at 15:21
  • 1
    Can you please edit your question and elaborate a bit on what you currently see and what you're trying to achieve as now it's unclear what you're asking... – Fabby Jul 12 '19 at 9:12
  • Suggestion: Take a screenshot of the pkexec dialog (of Synaptic, for example), then indicate which part you want the "user-friendly name" to appear: Title bar? Main window area (the body text)? Collapsible window area (where the full path is found)? An annotated screenshot would be useful to show what you are trying to achieve. – clearkimura Jul 16 '19 at 19:01
0

As regards Synaptic I think the 'secret' lies in this file:

/usr/share/polkit-1/actions/com.ubuntu.pkexec.synaptic.policy
| improve this answer | |
  • How could I do that in my own dialogs? – user963196 Jul 18 '19 at 2:31
  • @Someone: I would have looked at the source code for Synaptic or some other program which does it the same way. – Gunnar Hjalmarsson Jul 18 '19 at 3:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy