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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-14-2003, 07:14 AM
|
#1
|
Member
Registered: Oct 2003
Location: Chicago
Distribution: RH 7.2, RH 8.0 and RH 9.0
Posts: 32
Rep:
|
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?
|
|
|
11-14-2003, 08:10 AM
|
#2
|
Member
Registered: Aug 2003
Location: Manchester, England, UK, The World....
Distribution: Gentoo/SuSE 9.0
Posts: 291
Rep:
|
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)
|
|
|
11-14-2003, 08:29 AM
|
#3
|
Senior Member
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571
Rep:
|
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.
|
|
|
11-14-2003, 08:51 AM
|
#4
|
Member
Registered: Oct 2003
Location: Chicago
Distribution: RH 7.2, RH 8.0 and RH 9.0
Posts: 32
Original Poster
Rep:
|
sorry. I'm using gnome.
|
|
|
11-14-2003, 08:53 AM
|
#5
|
Senior Member
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571
Rep:
|
Does gnome not have a similar right click on the desktop to add an icon and set the user?
|
|
|
11-14-2003, 08:56 AM
|
#6
|
Member
Registered: Oct 2003
Location: Chicago
Distribution: RH 7.2, RH 8.0 and RH 9.0
Posts: 32
Original Poster
Rep:
|
There's a right click to create a new "launcher", but no option to set the user.
|
|
|
11-14-2003, 09:31 AM
|
#7
|
Member
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336
Rep:
|
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...
|
|
|
11-14-2003, 09:39 AM
|
#8
|
Senior Member
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571
Rep:
|
Man, that's a little way past clicking on an icon as jkpalmer52 is asking about, eh?
|
|
|
11-14-2003, 09:58 AM
|
#9
|
Member
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336
Rep:
|
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...
|
|
|
11-14-2003, 10:14 AM
|
#10
|
Member
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336
Rep:
|
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
|
|
|
11-14-2003, 10:21 AM
|
#11
|
Member
Registered: Oct 2003
Location: Chicago
Distribution: RH 7.2, RH 8.0 and RH 9.0
Posts: 32
Original Poster
Rep:
|
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.
|
|
|
11-14-2003, 10:26 AM
|
#12
|
Member
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336
Rep:
|
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...
|
|
|
11-14-2003, 10:32 AM
|
#13
|
Member
Registered: Oct 2003
Location: Chicago
Distribution: RH 7.2, RH 8.0 and RH 9.0
Posts: 32
Original Poster
Rep:
|
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"? ;-)
|
|
|
11-14-2003, 11:28 AM
|
#14
|
Member
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 10:40 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|