LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-21-2004, 01:52 PM   #1
JGJones
LQ Newbie
 
Registered: Apr 2004
Distribution: Mandrake 10.0
Posts: 10

Rep: Reputation: 0
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
 
Old 04-21-2004, 02:10 PM   #2
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
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.
 
Old 04-21-2004, 02:13 PM   #3
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
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 ?
 
Old 04-21-2004, 02:27 PM   #4
JGJones
LQ Newbie
 
Registered: Apr 2004
Distribution: Mandrake 10.0
Posts: 10

Original Poster
Rep: Reputation: 0
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
 
Old 04-21-2004, 02:49 PM   #5
JGJones
LQ Newbie
 
Registered: Apr 2004
Distribution: Mandrake 10.0
Posts: 10

Original Poster
Rep: Reputation: 0
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.

Last edited by JGJones; 04-21-2004 at 02:51 PM.
 
Old 04-22-2004, 10:03 AM   #6
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
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.
 
Old 04-22-2004, 10:37 AM   #7
JGJones
LQ Newbie
 
Registered: Apr 2004
Distribution: Mandrake 10.0
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 04-22-2004, 08:18 PM   #8
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
then scrap menudrake and use KDE's own menu editor
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Jumpdrive causes file manager freeze with Mandrake 10.1 KDE ? nchancock Linux - Hardware 0 12-04-2004 03:40 AM
File Manager - Super User Mode iNFERiON Linux - Newbie 1 12-23-2003 09:19 AM
Super Mode File Manager awtoc123 Red Hat 1 10-29-2003 10:36 AM
file manager in su mode hhegab Linux - Software 3 05-08-2003 01:53 PM
File Manager SU mode using expect Allen614 Programming 0 02-26-2003 02:29 AM


All times are GMT -5. The time now is 09:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration