Skip to main content
1 of 4
  • pkexec can be obtained by the following:

     sudo apt install policykit-1 
  • Edit the bottom of this file to where it looks likes this: sudo nano /usr/share/polkit-1/actions/org.freedesktop.policykit.policy

  • yours should look like this:

     <action id="org.freedesktop.policykit.lockdown"> <description>Configure lock down for an action</description> <message>Authentication is required to configure lock down policy</message> <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/pklalockdown</annotate> </action> 
  • After that try:

     pkexec gedit 
  • you then can try and add an alias to ~/.bash_aliases:

     echo 'alias gedit="pkexec gedit"' >> ~/.bash_aliases