LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 11-14-2003, 07:14 AM   #1
jkpalmer52
Member
 
Registered: Oct 2003
Location: Chicago
Distribution: RH 7.2, RH 8.0 and RH 9.0
Posts: 32

Rep: Reputation: 15
Launch an editor from desktop in su mode?


Is there a way to launch gedit (or any other good editor for that matter) from an icon in su mode?
 
Old 11-14-2003, 08:10 AM   #2
randomblast
Member
 
Registered: Aug 2003
Location: Manchester, England, UK, The World....
Distribution: Gentoo/SuSE 9.0
Posts: 291

Rep: Reputation: 30
with what?
kde, gnome, windowmaker...
i think in kde you can choose "run as different user" in the icon properties.
oh, and gedit sux, use emacs (no offense whoever made gedit)
 
Old 11-14-2003, 08:29 AM   #3
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 47
I just tested this on Red Hat 8.

Right click on the desktop.
Choose Create New
Choose Link to Application
General Tab: gedit (just the name)
Execute: gedit (the command)
--------: check Run as a different user, Username : root

Then when you click on the new icon, it will ask you for root password.
And you're off...

Edit: This is with KDE.

Last edited by itsjustme; 11-14-2003 at 08:31 AM.
 
Old 11-14-2003, 08:51 AM   #4
jkpalmer52
Member
 
Registered: Oct 2003
Location: Chicago
Distribution: RH 7.2, RH 8.0 and RH 9.0
Posts: 32

Original Poster
Rep: Reputation: 15
sorry. I'm using gnome.
 
Old 11-14-2003, 08:53 AM   #5
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 47
Does gnome not have a similar right click on the desktop to add an icon and set the user?
 
Old 11-14-2003, 08:56 AM   #6
jkpalmer52
Member
 
Registered: Oct 2003
Location: Chicago
Distribution: RH 7.2, RH 8.0 and RH 9.0
Posts: 32

Original Poster
Rep: Reputation: 15
There's a right click to create a new "launcher", but no option to set the user.
 
Old 11-14-2003, 09:31 AM   #7
Nimoy
Member
 
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336

Rep: Reputation: 30
If you're using Red Hat - Try this

1) Right Click on your desktop

2) Select open new terminal

3) DON'T PANIC !

4) Type: su <Enter>

5) Input your password and press <Enter>

6) Type mc <Enter>

If the midnight commander is installed you'll be able to scroll through files like in the old Norton Commander

When you find the file you need to edit press F3 to edit - F4 to view

When you're done - Save the file (the key's needed are shown on screen)

Back at the prompt type: Exit <Enter>

You are now out of root mode

Type Exit once more and you're back in your Desktop environment...
 
Old 11-14-2003, 09:39 AM   #8
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 47
Man, that's a little way past clicking on an icon as jkpalmer52 is asking about, eh?
 
Old 11-14-2003, 09:58 AM   #9
Nimoy
Member
 
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336

Rep: Reputation: 30
Prolly is - but if jk... needs to fix something in a hurry... well then he/she might as well be informed on how to potentially fix it...

However if anyone has an easy solution.... join in!

Another way would be writing a script thet was executed by clicking on a launcher placed on the desktop.

The script would begin by issuing the su command - You would then be compelled to enter your pwd - the script would then launch gedit or whichever editor you wanted...
 
Old 11-14-2003, 10:14 AM   #10
Nimoy
Member
 
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336

Rep: Reputation: 30
Next method

Open a terminal window

Type su

Type your pwd

Type gedit

Boom! - You can now edit and save the protected file in the GUI editor
 
Old 11-14-2003, 10:21 AM   #11
jkpalmer52
Member
 
Registered: Oct 2003
Location: Chicago
Distribution: RH 7.2, RH 8.0 and RH 9.0
Posts: 32

Original Poster
Rep: Reputation: 15
That was the obvious choice. I was looking for something real quick. The kdesu konqueror works very well for my needs.

Thanks to all who jumped in.
 
Old 11-14-2003, 10:26 AM   #12
Nimoy
Member
 
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336

Rep: Reputation: 30
Good - but please try to keep your question in separate thread don't double post the same questions! That way people will also better be able to search for answers if the threads are clean and specific so to speak...
 
Old 11-14-2003, 10:32 AM   #13
jkpalmer52
Member
 
Registered: Oct 2003
Location: Chicago
Distribution: RH 7.2, RH 8.0 and RH 9.0
Posts: 32

Original Poster
Rep: Reputation: 15
Sorry. It started out as a global question. I'll be more careful next time about double posting. Would that also apply for "double chastising"? ;-)
 
Old 11-14-2003, 11:28 AM   #14
Nimoy
Member
 
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336

Rep: Reputation: 30
Lol - Knew I was going to hear about that - Don't know about the double chastising...

I can fully understand the frustration when there is a lack of info though.... which is why I didn't report the double post... I just wanted to make the point as searching specifics is always better than.... well you understand - Heck I suspect I did something similar in my early days

Glad that things were resolved
 
  


Reply



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
text editor at rescue mode? abtimoteo Ubuntu 3 09-18-2005 08:58 AM
Want Nautilus *desktop* to launch Konqueror FM elempoimen Linux - Software 1 05-31-2005 08:05 AM
can only launch KDE after first booting in failsafe mode kshaffer SUSE / openSUSE 4 11-16-2004 10:35 AM
how to use vnc to launch gnome desktop asadhussain Linux - Networking 1 10-15-2003 01:24 PM
Boot in console mode or Launch X at start, how to config.? nutshell Linux - General 4 06-01-2002 10:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:40 AM.

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
Open Source Consulting | Domain Registration