kde gnome open folder on command line

kdesu dolphin foldername  >/dev/null 2>&1
gnome-open foldername >/dev/null 2>&1

For the current version of gnome and kde, I need to a open folder window with either gnome or kde. I need commands with no extra spaces.

Are these correct? Is there a KDE command to open a window with no spaces in the command?

Thanks.

Hi
Just use xdg-open foldername it should use the default desktop file manager…

Open Dolphin in Super User modus ( from the menu ), hit F4 and you have what you want. Well documented FWIW

# xdg-open bin
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
No DBUS session-bus found. Check if you have started the DBUS server.
kdeinit5: Communication error with launcher. Exiting!
# QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
"Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)"

#kdesu dolphin bin
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
No DBUS session-bus found. Check if you have started the DBUS server.
kdeinit5: Communication error with launcher. Exiting!
"KLauncher could not be reached via D-Bus. Error when calling kdeinit_exec_wait:
Not connected to D-Bus server
"
Don't need password!!

The first fails. The second works.

I can’t build a string with a space in it.

reading a cfg line like this:

OpenVirusVaultCommand= kdesu dolphin
gnome openfolder #gnome-open

Hi
That’s because your not switching to root user and the root user environment, you used su rather than su - on another note bin directory it that context is the “user” bin directory if that is what your wanting? Since your already root user there is no need for the likes of kdesu?

No, I was in superuser mode root. You can tell by the ‘#’ symbol.

This is for the users benefit for a shortcut to the virus folder with having to navigate through file manager superuser mode. I need to be able to launch into a KDE window from kde superuser mode. This is typical for they would do.

Hi
Sure, but users can create a prompt :wink: You were in the root users home folder, with root user powers, but environment was still set as your user, hence all the errors. You can see the difference by looking at the output of the printenv command with su and su -.

Use permissions, groups or ACL’s for access to a folder?

Scanvirus typical user (including myself) will use KDE and Gnome desktop after logging in. I don’t get any feedback from anyone using it, some info from the number of views on the posts I made. So, I don’t know if anyone who use it on a server. Users who login as root is also unknown. So, I have to base it on my own usage.

I used control-alt-f1 to get the terminal. I logged in as root. The terminal is different. T

his isn’t typical of my usage. I use a terminal mode window in kde.

The dolphin use works fine if I write it into the script. You have to edit the script to use gnome open folder.

So, as I understand it login as root in a kde terminal window?
How do I do that?

I got it. My internet is really slow now.

‘su -’

It opens a folder, but open it with two tabs and large amount of output.

home/username/"%u"

The second tab is on the correct folder.

The bug was fixed by a linux system update.

Thanks to everyone for the help.

The error has returned. This will need to saved for another topic.

Thanks to all.