LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to run dolphin/konqueror as root (https://www.linuxquestions.org/questions/slackware-14/how-to-run-dolphin-konqueror-as-root-791565/)

bgeddy 02-25-2010 02:43 PM

How to run dolphin/konqueror as root
 
I have been using KDE4 for some time now as a test and have noticed what at first seems to be a major omission. There is no way to run dolphin or konqueror as root. Old style KDE3 in SLackware 12 had the "root konqueror" option, (or whatever it was named in the KDE menus), but KDE4 doesn't have this. I tried adding a new menu itme in KDE4 to run dolphin as root but it had odd errors about "could not start process" and "could not to talk to klauncher" - it would not display any files from my directory. Konqueror had similar odd problems - something about klauncher and Dbus server. This is a pain as there are sometimes files I wish to move/delete which I need to be root to do and it would be nice to have a gui to do this.

Anyone got any quick ways (from KDE) of achieving this or setting up a KDE menu item to run a file manager (dolphin/konqueror) as root ? I don't always want to have to run "su -c mc" in a terminal to do admin stuff in the filesystem and I don't want to run KDE as root.

rweaver 02-25-2010 02:45 PM

Have you tried kdesu? how about sudo from a terminal?

bgeddy 02-25-2010 02:49 PM

Quote:

Have you tried kdesu? how about sudo from a terminal?
Well I have installed a menu item for dolphin to run as root and this runs kdesu - I have also tried "su -c /usr/bin/dolphin" from a terminal and both give the errors mentioned.

brianL 02-25-2010 03:08 PM

I've run kdesu dolphin several times from the terminal with no problems. I haven't tried creating a menu item,though.

cwizardone 02-25-2010 03:19 PM

Quote:

Originally Posted by brianL (Post 3876790)
I've run kdesu dolphin several times from the terminal with no problems. I haven't tried creating a menu item,though.

Just setup Konqueror to run as root as a menu item.
On the comand line I simply put, kdesu konqueror
Works fine.

pixellany 02-25-2010 03:25 PM

I've done this in various ways, but I now prefer to do all admin stuff (anything requiring root privileges) in a terminal. To me, the terminal environment evokes a level of respect and caution that does not exist with drag and drop, trashcans, etc.

If I have to move a bunch of files around, I might go to a terminal, switch to root and set some permissions, then go back to the GUI to actually move things.

bgeddy 02-25-2010 03:34 PM

Quote:

I've run kdesu dolphin several times from the terminal with no problems. I haven't tried creating a menu item,though.
Well it won't work for me ! It's running but giving an error at the bottom of the window which says :
Code:

Could not start process. Cannot talk to klauncher: The name org.kde.klauncher was not provided by any .service files.
with a close button shown. No files are displayed in any directories.
Quote:

Just setup Konqueror to run as root as a menu item.
On the comand line I simply put, kdesu konqueror
Works fine.
Aha - this works ! I was trying to run "su -c konqueror" from a terminal and it was giving the odd errors. Trying "kdesu konqueror" from a terminal works as well where the "su -c" way doesn't. Weird behavior - some environment issue somewhere perhaps.
Anyway I now have a menu item to run konqueror as root (would have preferred dolphin as i've kinda got used to it but whatever) so thanks to you all for the replies.
Quote:

I've done this in various ways, but I now prefer to do all admin stuff (anything requiring root privileges) in a terminal. To me, the terminal environment evokes a level of respect and caution that does not exist with drag and drop, trashcans, etc.

If I have to move a bunch of files around, I might go to a terminal, switch to root and set some permissions, then go back to the GUI to actually move things.
I too have been dong this but lately it's been bugging me when I have been editing in and around my web directories (/var/www/htdocs in Slackware) and want to quickly move stuff around. I know your point though.

brianL 02-25-2010 03:35 PM

Yeah, I usually do anything I have to do as root from the terminal, but I've tried kdesu with various things to see if it works. And it does...so far.

TSquaredF 02-25-2010 04:37 PM

I, too, prefer to have a menu item to start dolphin with root privileges, but also got the "Cannot talk to klauncher" error. I then found a post somewhere (I wish I had noted where, but I didn't) that recommended changing the `Command' line to "kdesu dbus-launch dolphin". That did the job for me, but please note that it is not always necessary. I am using -current with Alien-Bob's KDE-4.4 packages on this laptop & plain "kdesu dolphin" is working fine here.
Regards,
Bill

bgeddy 02-25-2010 04:50 PM

Quote:

I then found a post somewhere (I wish I had noted where, but I didn't) that recommended changing the `Command' line to "kdesu dbus-launch dolphin".
Brilliant - I now have a menu item that is set to run "dbus-launch /usr/bin/dolphin" as root which launches kdesu and dolphin works ! Thanks a bunch Bill.

brianL 02-25-2010 04:54 PM

Why does kdesu dolphin work for me, but not for other people?

Chuck56 02-25-2010 06:16 PM

There is an alternate way to offer root access via Dolphin using KDE service menus. It provides additional right-click options.

http://www.linuxquestions.org/questi...7/#post3662507

bgeddy 02-26-2010 06:08 AM

@Chuck56: Wow - that's so useful. I have been looking for a way to add exactly this functionality for ages and your tip does precisely what I want. So cool - thanks loads.:)

oneforall 02-27-2010 01:12 PM

well I guess they never made a super user mode desktop file for dolphin( I only use konq-file mode) but for konq I have to always change NoDisplay=true to NoDisplay=false in Home.desktop and konquerorsu.desktop file
to get them back in the menu.

cwizardone 02-27-2010 11:23 PM

In earlier versions of Dolphin there was an option in the right panel to open or view as root, but it has been dropped for whatever reasons.

sayhello_to_the_world 04-14-2014 08:43 PM

Hello - i cannot do that - i get a crash

Quote:

Originally Posted by cwizardone (Post 3876811)
Just setup Konqueror to run as root as a menu item.
On the comand line I simply put, kdesu konqueror
Works fine.


see here
Code:

nux-c5sz:/home/martin/osmosis # kdesu konqueror
kdesu(5360)/kdeui (kdelibs): Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)
KCrash: Application 'kdesu' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/root/.kde4/socket-linux-c5sz.site/kdeinit4__0

[1]+  Angehalten              kdesu konqueror
linux-c5sz:/home/martin/osmosis #


why is this so °!?

enorbet 04-14-2014 10:44 PM

I don't know why a few are experiences crashes, but I do know that KDE is pretty emphatic that any graphical app to be launched as root should use "kdesu" as it loads extra support for KDE libraries.

Also, if you wish to launch the older konqueror file manager as root it should be done like this

Code:


kdesu kfmclient openProfile filemanagement

I think KDE removed the SuperUserHome icon because it's easy to mess up and create permissions problems. I wish they'd just explained and left it in. It is quite useful.

Edit: Thanks Chcuk.... nice addon

cwizardone 04-14-2014 11:00 PM

Quote:

Originally Posted by sayhello_to_the_world (Post 5152715)
Hello - i cannot do that - i get a crash... #[/CODE]

why is this so °!?

Haven't tried that in years, but just a few minutes ago I was able to open, as root, both Dolphin and Konqueror using kdesu, e.g., kdesu konqueror

If you like the Midnight Commander type of file manager there is, Krusader. It installs two icons, one to run as, root (red) and the other to run as, user (blue). To avoid the clutter I use the root icon and if I want to use Krusader as, user, I click on ignore when the box pops up asking for the root password.

TB0ne 04-16-2014 11:06 AM

Quote:

Originally Posted by sayhello_to_the_world (Post 5152715)
Hello - i cannot do that - i get a crash
Code:

Originally Posted by cwizardone View Post
Just setup Konqueror to run as root as a menu item.
On the comand line I simply put, kdesu konqueror
Works fine.

see here
Code:

nux-c5sz:/home/martin/osmosis # kdesu konqueror
kdesu(5360)/kdeui (kdelibs): Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)
KCrash: Application 'kdesu' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/root/.kde4/socket-linux-c5sz.site/kdeinit4__0

[1]+  Angehalten              kdesu konqueror
linux-c5sz:/home/martin/osmosis #

why is this so °!?

If this is the same 13.1 machine with the very badly botched 'upgrade' you mentioned in numerous other threads, that may have a lot to do with it. And re-opening a thread that's been close for FOUR YEARS to ask this isn't a good thing, since the original thread was marked as SOLVED. And since the system gave you advice to follow (did you read/understand the line about "To circumvent this problem...."), did you actually TRY IT?


All times are GMT -5. The time now is 04:56 AM.