LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Is there a way to run Dolphin as Root? (https://www.linuxquestions.org/questions/linux-software-2/is-there-a-way-to-run-dolphin-as-root-4175619213/)

davcefai 12-08-2017 01:50 PM

Is there a way to run Dolphin as Root?
 
The KDE team seems to have had a brainstorm and have disabled Dolphin from being run as root. It also seems that they intend to extend this to editors.

In other words they have removed a vital freedom from users.

I would like to stay with Plasma but this restriction is a crippling one. Does anybody know a way to circumvent this restriction?

I am running Plasma on Debian unstable.

yancek 12-08-2017 05:24 PM

Which distribution are you using? You should be able to open a terminal and do: kdesu dolphin
OR: export $(dbus-launch) (hit the enter key) type: dolphin to open it
Which distribution are you using? Don't know that it will work on all so you just need to test as both work for me with kde5.

ferrari 12-08-2017 09:52 PM

Quote:

The KDE team seems to have had a brainstorm and have disabled Dolphin from being run as root. It also seems that they intend to extend this to editors.

In other words they have removed a vital freedom from users.
The controversial thinking behind it is discussed here...
https://blog.martin-graesslin.com/bl...files-as-root/

FWIW, I'm still using openSUSE Leap (KDE 5.32.0) where it is still possible to invoke
Code:

xdg-su -c dolphin

ferrari 12-08-2017 10:09 PM

For those using a new version of Plasma 5/ Dolphin there has been a move away from running Dolpinh as root, but allowance has been made to configure Dolphin to allow various actions on root-owned files instead....

https://forums.mauilinux.org/showthread.php?tid=24251

Quote:

Rather than seeking to launch Dolphin as root, which i presume you wish to do so as to perform root actions on files & directories owned by root not you, why not actually use Dolphin's native Root Actions capability? Mint 17.x KDE has this, & i loved it, but stupidly they omitted it from Mint 18 KDE [as did also Kubuntu 16.04, KFedora 24, & even KDE Neon itself, but it's present by default & working beautifully in Maui]. This is one of the major reasons [though there's many others too] that last year i abandoned Mint KDE & came over to Maui.

You can configure Root Actions via Dolphin's Configure Dolphin menu selection:
Dolphin Settings > Configure Dolphin... > Services

Drakeo 12-08-2017 10:15 PM

Quote:

Originally Posted by davcefai (Post 5790652)
The KDE team seems to have had a brainstorm and have disabled Dolphin from being run as root. It also seems that they intend to extend this to editors.

In other words they have removed a vital freedom from users.

I would like to stay with Plasma but this restriction is a crippling one. Does anybody know a way to circumvent this restriction?

I am running Plasma on Debian unstable.

Yes your right it is in the code when user ID 0 starts it it will stop. You can patch it or set the user ID to 999999999 like I did rebuild it you get a out of range warning but it is fixed.
Alien Bob developer for Slackware has been patching it. Slackware uses root. Top user should be able to use the computer.

davcefai 12-09-2017 12:50 PM

I have just upgraded Firefox from 57.0 to 57.0.2.

I could not do it using Dolphin, like I have been doing since dinosaurs walked the earth.
I always do:
1. Delete firefox.bak
2. Rename Firefox to Firefox.bak
3. Open the new archive.
4. Extract to /usr/local.

Since /usr/local is owned by root I had to jump through hoops and then use krusader. One can commend Martin Floser's enthusiasm but his autocratic behaviour is unacceptable. I am surprised that this change was allowed to go through. Where has our Freedom gone? Or should we drop the "F" from "FOSS"?

davcefai 12-09-2017 12:51 PM

Quote:

Originally Posted by Drakeo (Post 5790785)
Yes your right it is in the code when user ID 0 starts it it will stop. You can patch it or set the user ID to 999999999 like I did rebuild it you get a out of range warning but it is fixed.
Alien Bob developer for Slackware has been patching it. Slackware uses root. Top user should be able to use the computer.

Can you point me towards some more detailed instructions please? I get what you are saying but don't know how to set about doing it.

frankbell 12-09-2017 08:10 PM

I can run [URL="https://en.wikipedia.org/wiki/Midnight_Commander"]Midnight Commander (mc)[/URL. It's a dual-pane ncurses file manager similar to the old Norton Commander from the DOS days.

I can run mc as root in Debian Sid. If I try to run Dophin, I get an "it is forbidden" warning. The "export dbus" error message does not appear. When I try to "export dbus," I get a"forbidden to user ID less than 1000" message.

I agree that this is an unnecessary and annoying decision that addresses an issue that I doubt actually exists.

ferrari 12-09-2017 08:56 PM

Quote:

I agree that this is an unnecessary and annoying decision that addresses an issue that I doubt actually exists.
@frankbell: Are you able to configure Doplhin (services) to permit root actions as described in post #4?

frankbell 12-09-2017 10:30 PM

Quote:

@frankbell: Are you able to configure Doplhin (services) to permit root actions as described in post #4?
I have not tried that yet. Anything I do as root I generally do from the command line, not because I'm expert, because making mistakes is how I learn.:)

I used to run Konqueror from time to time as root so as to configure directory permissions for Samba shares. which was about the only reason I ever ran a file manager as root, because it was easy.

I may play around with the suggestion in post #4, but I probably won't get to it for a few days; tomorrow is already booked, for we are going to a Christmas concert, hoping it will lift our spirits! If I do try that suggestion, I shall certainly report back.

Also, I am not a Dolphin fan. As you can conclude from the above, I prefer to use Konqueror as a file manager and never have figured out why KDE came up with Dolphin when Konqueror worked so very nicely, thank you very much.

Also, he added facetiously, why is it called "Dolphin"? This is KDE we're talking about here. Shouldn't it be called "Karp"?

ferrari 12-09-2017 11:52 PM

Quote:

I have not tried that yet. Anything I do as root I generally do from the command line, not because I'm expert, because making mistakes is how I learn.
Yes, I generally prefer the CLI too, but I think most experienced users would be in this category. (The need to run Dolphin as root goes away if root actions can be enabled though.)

Quote:

I may play around with the suggestion in post #4, but I probably won't get to it for a few days; tomorrow is already booked, for we are going to a Christmas concert, hoping it will lift our spirits! If I do try that suggestion, I shall certainly report back.
Seasons greetings! I look forward to reading about your findings here.

Quote:

Also, he added facetiously, why is it called "Dolphin"? This is KDE we're talking about here. Shouldn't it be called "Karp"?
LOL!

Drakeo 12-10-2017 12:47 AM

Quote:

Originally Posted by davcefai (Post 5791052)
Can you point me towards some more detailed instructions please? I get what you are saying but don't know how to set about doing it.

here

https://alien.slackbook.org/ktown/so...t_noroot.patch

Code:

#ifndef Q_OS_WIN
    // Check whether we are running as root
    if (getuid() == 0) {
        std::cout << "Executing Dolphin as root is not possible." << std::endl;
        return EXIT_FAILURE;
    }
#endif


frankbell 12-12-2017 08:15 PM

I tried the suggestions in post #4 on Debian Sid with the Plasma desktop.

The "Root Actions" was not present in my version of Dolphin in Plasma on Debian Sid. It may be available via a plugin, but I haven't been able to explore that fully.

Drakeo 12-12-2017 08:32 PM

Quote:

Originally Posted by frankbell (Post 5792491)
I tried the suggestions in post #4 on Debian Sid with the Plasma desktop.

The "Root Actions" was not present in my version of Dolphin in Plasma on Debian Sid. It may be available via a plugin, but I haven't been able to explore that fully.

frank it would be imposible like you said. do to the fact they use sudo and have no reason to let a user become "0".
I looked at the deb source and it is right from kde. why would they patch it. they have no reason to be root
Mewwwy qwissmass fwank :)

frankbell 12-12-2017 08:53 PM

This is not security.

This is security theatre.

sundialsvcs 12-13-2017 09:39 AM

Like Frank, I do not do anything from a GUI which requires root-privileges.

RadicalDreamer 12-13-2017 10:33 AM

I use this:
Code:

kdesu dolphin

frankbell 12-13-2017 08:29 PM

As I mentioned earlier, the one thing I used Konqueror for as root was setting directory permissions for Samba shares.

The functionality of setting directory permissions seems to have been removed in the Plasma desktop file managers. Now I'm going to have to learn how to do it the old-fashioned way.:(

davcefai 12-14-2017 02:11 AM

@Radical Dreamer
 
Code:

david@davcefai:~$ kdesudo dolphin
Executing Dolphin as root is not possible.
david@davcefai:~$ kdesu dolphin
Executing Dolphin as root is not possible.
david@davcefai:~$


davcefai 12-14-2017 02:22 AM

The question I asked was "Is it possible to run Dolphin as root?"

Thanks to those who tried to help.

Whether some people think that one should not use GUI programs as root is not relevant to this discussion. We brag about FOSS being about freedom. The responsible person could just as easily created a settable flag "Do not run as root" instead of inconveniencing thousands of other users.

Steve Gibson created the slogan "It's MY computer" albeit in a different context. If others want to use the command line, more power to them. There are those of us who don't.

I am now setting up a PC to run Devuan (no systemd) and XFCE. I shall miss the power of KDE but, hopefully will regain my freedom. (Doesn't that sound dramatic? :-) )

John VV 12-14-2017 08:14 AM

Quote:

Is it possible to run Dolphin as root?"
yes it is

but not normally recommended most of the time

"kdesu" is installed ? yes no ?
AND SET UP AND CONFIGURED ?
i use a desktop file in /usr/share/applications to prompt for the root user name and password pop up
"org.kde.dolphinsu"
Code:

[Desktop Entry]
X-SuSE-translate=true
Name=File Manager - Super User Mode
Exec=dbus-launch dolphin -qwindowtitle "%c" "%u"
Icon=system-file-manager
Type=Application
X-DocPath=dolphin/index.html
Categories=Qt;KDE;System;FileManager;
Terminal=false
MimeType=inode/directory;
X-KDE-SubstituteUID=true


ferrari 12-14-2017 01:38 PM

@John VV: The ability to use kdesu depends on the KDE/Plasma version in use. There has been a deliberate developer move to disable it...

Quote:

A significant change that affects not only Dolphin, but also Kate and KWrite, is that launching these applications as root on Linux systems has been disabled by default. The reason for this is that it is a safety risk to run GUI apps with root privileges in the X Window System (X11).
https://dot.kde.org/2017/05/02/have-...-now-available

Drakeo 12-14-2017 10:34 PM

Quote:

Originally Posted by ferrari (Post 5793244)
@John VV: The ability to use kdesu depends on the KDE/Plasma version in use. There has been a deliberate developer move to disable it...



https://dot.kde.org/2017/05/02/have-...-now-available

been dealing with it over year. the 'main.cpp'
talk about it very short here. back in July. https://www.youtube.com/watch?v=iN5JKj_3Iys

davcefai 01-09-2018 11:15 AM

I watched the video linked to in the previous post. One statement really stands out. "Root should own everything and be able to do anything"

Have these people forgotten this basic principle?

Anyway, thanks to all who tried to help constructively. It's time to think of moving away from the repressive regimes: KDE and SystemD.

removed030 01-09-2018 11:52 AM

Quote:

Originally Posted by davcefai (Post 5790652)
The KDE team seems to have had a brainstorm and have disabled Dolphin from being run as root. It also seems that they intend to extend this to editors.

In other words they have removed a vital freedom from users.

I would like to stay with Plasma but this restriction is a crippling one. Does anybody know a way to circumvent this restriction?

I am running Plasma on Debian unstable.

dnf install nautilus

Run it as root
Nautilus will allow you to edit root only files that are normally not accessible.

to run, simply type in nautilus

davcefai 01-10-2018 02:04 AM

Thanks, I've ben using Krusader but it does not feel as "comfortable" as Dolphin.

There is still however the "philosophical" principle that users should not be arbitrarily deprived of features. Freedom is an element of FOSS.

ghp 01-14-2018 02:26 PM

Quote:

Originally Posted by davcefai (Post 5792979)
I am now setting up a PC to run Devuan (no systemd) and XFCE. I shall miss the power of KDE but, hopefully will regain my freedom. (Doesn't that sound dramatic? :-) )

I've never missed "the power of KDE", even after using it for 17 years. Devuan will suit you just fine.

davcefai 04-15-2018 02:48 AM

Winding Up
 
Just to wind up this thread, thanks for the interesting discussion. However there does not seem to be any solution to this particular problem.

It seems that KDE has lost its way and forgotten that there are real users out here. Reporting bugs is a waste of time, there is hardly ever a response.

The best way for me out of this particular problem has been to run 2 copies of Thunar, side by side, as root.

petelq 04-15-2018 03:18 AM

I use opensuse and the suse guys have patched it so the ability to use dolphin and kwrite as root has been back for a while now.

davcefai 12-14-2018 12:56 PM

Since my previous post I have switched 3 PCs from debian to Devuan and from KDE to XFCE4.


It looks like Debian has been "taken over" by people who have forgotten that free software is supposed to give you the freedom to choose. Their latest move has been to forcibly impose systemd. The package systemd-shim has been withdrawn from circulation and a lot of packages have a dependency on systemd.


KDE have also autocratically prevented some programs from running under root.


I have found Devuan and XFCE quite adequate and gradually improving. The forcible conversion to systemd on debian is the last straw. I now find my server, which is still Debian, more difficult to manage than a Windows machine. So next week that will change.


Leaves only a Raspberry pi and my wife's PC running Debian. The pi is dedicated to being part of my music system so I'll leave it alone. The wife isn't bothered so unless something happens her PC will stay on Debian Stable.


The question I asked originally was "Is there a way to run Dolphin as root". The answer is now "No, somebody is actively working to prevent it."


The solution is ditch KDE and Debian as they have moved away from the spirit of software libre.

hydrurga 12-14-2018 01:22 PM

Quote:

Originally Posted by davcefai (Post 5937159)
Since my previous post I have switched 3 PCs from debian to Devuan and from KDE to XFCE4.

It looks like Debian has been "taken over" by people who have forgotten that free software is supposed to give you the freedom to choose. Their latest move has been to forcibly impose systemd. The package systemd-shim has been withdrawn from circulation and a lot of packages have a dependency on systemd.

KDE have also autocratically prevented some programs from running under root.

I have found Devuan and XFCE quite adequate and gradually improving. The forcible conversion to systemd on debian is the last straw. I now find my server, which is still Debian, more difficult to manage than a Windows machine. So next week that will change.

Leaves only a Raspberry pi and my wife's PC running Debian. The pi is dedicated to being part of my music system so I'll leave it alone. The wife isn't bothered so unless something happens her PC will stay on Debian Stable.

The question I asked originally was "Is there a way to run Dolphin as root". The answer is now "No, somebody is actively working to prevent it."

The solution is ditch KDE and Debian as they have moved away from the spirit of software libre.

The ability to run Dolphin as root was re-enabled by KDE earlier this year.

https://phabricator.kde.org/D12732

Brains 12-14-2018 10:11 PM

With my current Debian testing and Dolphin 18.08, I su to root in command prompt and paste the command below and hit enter, you can switch out the word "dolphin" for kate or kwrite if you want to open an editor as root.
Code:

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin

davcefai 12-15-2018 02:50 AM

Thanks for the replies. However having made the change I am reluctant to go back and anyway it seems that I will still have to jump through hoops to work how I want to.

Moreover I feel that there will always be a cloud over Debian and KDE because what's to stop other disruptive changes being made?

When one needs to take "creative" measures to circumvent other measures then it is time to consider making a change. KDE has become so big and inefficient that I find XFCE to be a breath of fresh air. Systemd still has the potential to greatly damage Linux. It is a major change which has been badly implemented and breaks the spirit of "The Unix Way"

My transition started with the Dolphin-as-root problem, which I could have simply solved by switching to another graphical environment. However the forcible introduction of systemd pushed me to Devuan. The maintainers have a right to do what they want to. However users have the right to use what suits them. If anybody hasn't noticed it now seems impossible to use Sysvinit in Debian. Systemd updates have removed systemd-shim and overwrite /sbin/init with a link to systemd.


All times are GMT -5. The time now is 01:17 PM.