The simple way is to execute:
$ pkexec --user webbrowser env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY abrowser

I was about to write that you can make a launcher with that command line as "Command", e.g., using the "New Item" button of "Main Menu", in MATE's "Control Center". But that does not work.

The complicated way works:

Create a file /usr/share/polkit-1/actions/org.trisquel.abrowser.policy (here using Pluma):
$ sudo pluma /usr/share/polkit-1/actions/org.trisquel.abrowser.policy
Copy/paste that (I modified the example in 'man pkexec'):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd";>
<policyconfig>
<action id="org.trisquel.abrowser">
  <description>Browse the World Wide Web</description>
<message>Authentication is required to run Abrowser (user=$(user), program=$(program), command_line=$(command_line))</message>
  <defaults>
    <allow_any>no</allow_any>
    <allow_inactive>no</allow_inactive>
    <allow_active>auth_self_keep</allow_active>
  </defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/abrowser</annotate>
  <annotate key="org.freedesktop.policykit.exec.allow_gui">TRUE</annotate>
</action>
</policyconfig>
Save;
Create a launcher (for instance as explained above) with the Command:
pkexec --user webbrowser abrowser


Please confirm whether that works.

Reply via email to