LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Starting File Manager in SU mode (Mandrake 10.0, KDE) (https://www.linuxquestions.org/questions/linux-newbie-8/starting-file-manager-in-su-mode-mandrake-10-0-kde-172933/)

JGJones 04-21-2004 01:52 PM

Starting File Manager in SU mode (Mandrake 10.0, KDE)
 
I have fresh installation of Mandrake 10.0 on a spare PC.

I would like to have a shortcut on my menu that can open Konqueror (or other file managers if any) in SU mode (run as root?) so that if I wanted to edit files such as resolv.conf in /etc directory then I can do that easily.

Of course I would expect that if I opened such window, it'll prompt me for the password which I am happy enough with.

How may I do this? I know to configure the menu I can use MenuDrake...but anything more, I'm clueless! (For example, I wanted to change the menu around a bit so I created a new folder but I couldn't move any applications from the default folders into the new folder, yet I am able to create new applications in it...but that's for another thread! :))

Many thanks :D

Peacedog 04-21-2004 02:10 PM

i could be wrong, but, if i remember correctly, you have a shortcut to filemanger in superuser mode, which does exactly that. have a look at you menus, particularly sytem. i'm pretty sure it's there. if and when you find it, just drag it to the desktop.
good luck.

qwijibow 04-21-2004 02:13 PM

write a script.....
Code:

#!/bin/bash
su root -c "konqueror"

save it as root_konq or whatever
and change the access rights
Code:

chown root root_konq
chmod 755 root_konq

and save it in a bin folder
mv root_konq /bin

and make a link to application.
with "root_konq" as the command, and set it to run in console / terminal.

okay ?

JGJones 04-21-2004 02:27 PM

Quote:

Originally posted by PEACEDOG
i could be wrong, but, if i remember correctly, you have a shortcut to filemanger in superuser mode, which does exactly that. have a look at you menus, particularly sytem. i'm pretty sure it's there. if and when you find it, just drag it to the desktop.
good luck.

I thought the same myself from one old Mandrake distro I saw, but with Mandrake 10.0 there's none :( Thanks anyway though :D

JGJones 04-21-2004 02:49 PM

Quote:

Originally posted by qwijibow
write a script.....
Code:

#!/bin/bash
su root -c "konqueror"

save it as root_konq or whatever
and change the access rights
Code:

chown root root_konq
chmod 755 root_konq

and save it in a bin folder
mv root_konq /bin

I completed all the above steps. I've not made a script before but figured it's like a .bat in DOS/Windows, so what I did was to open Kwrite and entered the first code section and saved it as root_konq in my home directory.

I then opened the terminal and typed su, entered password and then did the commands (chown etc) and moved it to the /bin using your command again.

All no error messages.

Quote:

and make a link to application.
with "root_konq" as the command, and set it to run in console / terminal.

okay ?

For this I then fired up MenuDrake, in System folder I created new application which ask for name and path and I put:

Name: File Manager as SU
Path: /bin/root_konq

I ticked the box to run it as console and saved the menu.

I then went to the menu to test it.

First time - it crashed with a error.
I then replied to the post, realised I wanted more information on the error, so I went back to the menu...bought up the console for password so put that in. Nothing happened.

3rd time...it worked...

After that it works, although once nothing happened, but it works so I'm happy enough so thanks for your help.

qwijibow 04-22-2004 10:03 AM

strange.....

anyway, i found a better way....

you are using KDE ?
right click the main menu.. and select menu editor.

click "new item"

fill in the fileds.. Name = "File Manager - Super User Mode"
Command = "konqueror"
with "Run as different user" Selected


and suername = "root"

all without the quote marks.

work great with Kde 3.1

and even pops up a graphical "please enter roots password" box.

JGJones 04-22-2004 10:37 AM

Yes I'm using KDE, it's version 3.2 and it's strange that it doesn't have the "run as different user" option for the menu editor despite it being a more updated GUI.

I've doubled checked and I cannot find a single option for running as different user at all! The menu editor used was MenuDrake.

qwijibow 04-22-2004 08:18 PM

then scrap menudrake and use KDE's own menu editor


All times are GMT -5. The time now is 07:34 AM.