01-22-2020, 11:36 PM
I created root access in my KDE LL build. Took a few hours of research to get a reliable, working fix.
This is the way it would be implemented for Dolphin & Kwrite:
.desktops: (may have to create folders)
~/.local/share/kservicess5/ServiceMenus/
polkits:
/usr/share/polkit-1/actions
Create a polkit file for Dolphin:
com.ubuntu.pkexec.dolphin.policy
.desktop for Dolphin:
dolphin-root.desktop
For Kwrite, rinse and repeat, just change where obvious.
This is the way it would be implemented for Dolphin & Kwrite:
.desktops: (may have to create folders)
~/.local/share/kservicess5/ServiceMenus/
polkits:
/usr/share/polkit-1/actions
Create a polkit file for Dolphin:
com.ubuntu.pkexec.dolphin.policy
Code:
<?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>
<vendor>Linux Lite</vendor>
<vendor_url>https://linuxliteos.com/</vendor_url>
<action id="com.ubuntu.pkexec.dolphin">
<message>Authentication is required to run Dolphin</message>
<icon_name>window-close</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/dolphin</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
.desktop for Dolphin:
dolphin-root.desktop
Code:
[Desktop Action root]
Exec=pkexec dolphin
Icon=window-close
Name=Open as Admin
[Desktop Entry]
Actions=root
Icon=window-close
MimeType=inode/directory
ServiceTypes=KonqPopupMenu/Plugin
Type=Service
X-KDE-Priority=TopLevel
X-KDE-StartupNotify=false
For Kwrite, rinse and repeat, just change where obvious.