KDE4 root problems

I’d noticed some of this before on 11.1 with KD4 versions but until now, I’ve had KDE3 options so it hasn’t bothered me:

If (I know some may not approve but it’s there and the way I like to work) If I open Dolphin in SuperUser mode, I can not open a file using KWrite or Kate. , eg. Open with KWrite will give “KDEInit could not launch /usr/bin/kwrite”

If I su in a terminal and try to use KWrite or Kate, I get the error messages: “Communication error with launcher. Exiting!”. The programs do open though but I can’t open files using the menu. If I try, I get a popup window saying “Could not start process. Cannot talk to klauncher. Not connected to D-Bus server.”

Any ideas how to resolve this?

Use kdesu to launch kwrite instead of su.

Thanks. That has solved the second part.

How do I open a file using KWrite from Dolphin

I’ve tried changing dbus-launch dolphin %i -caption “%c” “%u” to kdesu dolphin in the KDE Menu but that doesn’t help.

Done some more searching. Seems xhost + will make Dolphin work as I want in Super User mode.

And allow everyone to connect to your X sesssion.

How was it before on KDE3 and Konqueror in SuperUser mode? Did the default settings allow that then?

Anyway, for the length of a likely root Dolphin session, I prefer the convenience to what be a very slight risk if someone hacked the PC, I’m suppose. Can’t say I’m bothered about parents on the LAN doing it.

Actually this is a “feature” of KDE, locking out root access to practically all apps that can alter root files such as kwrite.
This is why I often install Gedit or another text edtor on the side

How do we bypass that? It is really stupid, since you have to enter root password to edit files! Remember, we start File Manager in SU mode!

I sort of agree with tpe, but also understand the need/desire for integrity of the security architecture.

Is there a way to get Dolphin(in root mode) to open files in “Read-Only” mode, such as the “Preview in embedded text editor” that was in Konquerer-KDE3?
I find I use file manager-super user a lot when tracking down problems. Frequently need to be able to look everywhere (root privileges) but really only want to read-only.

Switching out to a console for a true edit session, when needed, would be a necessary but workable solution.

You can use konqueror in super user mode to open a file with kwrite as a substitute for dolphin.

tpe wrote:
> File Manager

i sure wouldn’t want to open a file manager in root mode and then have
every executable i might click on (accidentally or on purpose) inherit
root powers…

anyway, a file manager is not a file editor…why should a root
powered file manager be able to edit a file as root?

if you want to edit a file, open a file editor in root mode…


Yes, thanks, konqueror in super user mode is my current mode of operation.
I am simply trying to “de-clutter” the (too) many options that exist as I get more familiar with the newer KDE4 tools.

I think I may have answered my own question as well.

While in Dolphin, selecting:
Settings-Configure Dolphin-General-Previews(tab) provides a list of file types that can be “previewed”. Text was not checked.
I selected it, now works as I would want.

Might be good to refer this thread to this:File manager - super user mode do not open files. - openSUSE Forums

How about merge the 2 thread?
Any way, in order to answer “palladium”:
If you don’t need root power, then do not have it.
Look, in console you can

rm -rf . /

Nobody stops you from that kind of mistakes. So, if I make a mistake, its all my fault!

When I open a file manager in SU mode, I choose to do so and I do know the risks. The reason I use a DE is because it’s simple. Otherwise, I would stay in console mode!
For example (I have to test it, because I had no chance so far). I have a bounch of server (>20) that run in my inside network (=secure). Shall I be able to edit a configuration file via fish, like I did with Konq3? I will try that and report back.