Hi guys,
Ok, I found the solution to make dolphin as root work under Wayland. It is work very well.
For those who are interested, here is the tip:
-
Create the ~/.local/share/kservices5/ServiceMenus/ folder if it doesn’t exist (to use for only the user). If you want to use for everybody, then look at /usr/share/kservices5/ServiceMenus/ (the folder exists).
-
In it, create a DolphinAsRootWayland.desktop file (with Kate). Edit this file and add the following lines:
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
MimeType=inode/directory;
Actions=OpenDolphinAsRoot;
X-KDE-AuthorizeAction=shell_access
//
[Desktop Action OpenDolphinAsRoot]
Name=Open Dolphin as Root (Wayland)
TryExec=pkexec
Exec=sh -c “xhost +si:localuser:root && pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dbus-launch dolphin %U && xhost -si:localuser:root”
Icon=folder-red
Note: You can change the Name line as you want.
-
Save and then logout. Login again.
-
Right-click on a root folder → Actions → Open Dolphin as Root (Wayland).
-
Enjoy !!!
Note: Be careful !!! You’ve got root access in graphical, if you make an error you can’t go back.
Regards.