Hello,
I need to run Vorta as root.
For that, I created a file in the folder: /home/pierluigi/.local/share/applications
called vorta.desktop
which contains:
Wait. pkexec (PolicyKit) is the way to go.
But you need a policy file.
I.e.
(Supposing you have installed Vorta as an RPM from the Fedora repository).
Create a file named /usr/share/polkit-1/actions/org.freedesktop.policykit.vorta.policy
containing this policy (example):
<?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.freedesktop.policykit.pkexec.vorta">
<description>Run Vorta as root</description>
<message>Authentication is required to run Vorta</message>
<icon_name>package-x-generic</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/vorta</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
Now, you can test from the command line. pkexec vorta
A GUI spoke should ask for your password.
Now let’s create the .desktop file in your home. Let’s call it “VortaRoot” in order to have a second icon. .local/share/applications/VortaRoot.desktop (Adapted from /usr/share/applications/com.borgbase.Vorta.desktop)