Add icon to "Applications" drop-down menu (with password)

Hello! I have just installed GParted and added manually the icon to the “Applications>System Tools” drop-down menu.

However, since it requires the command “sudo gparted” instead of “gparted”, when I click on the icon I get this error: “Root privileges are required for running GParted”.

Can anyone help me fix this?

Thanks for the help.

I have GParted in System | Administration (UM16.04) and upon clicking, it pops an auth window. Looking at the menu entry, it calls gparted-pkexec This screenshot may help ...

1 Like

Thank you! I added “-pkexec” and now it works :grinning:

You can also add one of these commands to start of any application’s command. This will show the password prompt for running as root:

pkexec

or

gksudo

For example:

pkexec gparted
gksudo caja
pkexec pluma
1 Like

That’s what gparted-pkexec command mentioned in post #2 does, actually. /usr/bin/gparted-pkexec is a bash script that contains:

#!/bin/sh
pkexec "/usr/sbin/gparted" "$@"

So it just slaps “pkexec” in front of “gparted”.

1 Like