openSUSE Forums > Archives > SLS Archives > ARCHIVES - Linux Tweaks > ARCHIVES - Tips, Tricks & Tweaks » Making A Desktop Icon To Bring Up A Editor In Super User

Go Back   openSUSE Forums > Archives > SLS Archives > ARCHIVES - Linux Tweaks > ARCHIVES - Tips, Tricks & Tweaks
Forums FAQ Members List Search Today's Posts Mark Forums Read


ARCHIVES - Tips, Tricks & Tweaks Post your tips, tricks and tweaks about SuSE Linux in here. Please do not ask questions here - this is for factual information

 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-Mar-2008, 11:31
MattB
Guest
 
Posts: n/a
Default

While answering a question on the Forums I tried this out. It can be a handy way to bring up an editor in Super User mode without having to go through console. First right click on Desktop, select Create New>Link to application. Name your Link something appropriate.
[attachmentid=2204]
Pick an Icon by clicking on the icon button

Now under Application Tab enter the command for the editor program. Using Kdesu to set it as Super User.
[attachmentid=2205]

Now when you click the Icon you will be asked for root password and the Editor opens.
  #2 (permalink)  
Old 08-Mar-2008, 17:17
Scott
Guest
 
Posts: n/a
Default

I don't edit a large number of files as root. However the occasion does arise such as needing to edit xorg.conf when I install a new video driver. When I do that I usually do it by opening up the superuser Konqueror, navigating to the file and opening it from there just because I'm used to navigating to files in the non root konqeror that way on an everyday basis.

I would like the ability to right click an item such as xorg.conf in a standard non root file browser and have the option to open it with whatever editor I chose as root.
  #3 (permalink)  
Old 08-Mar-2008, 17:22
geoffro
Guest
 
Posts: n/a
Default

You can do this with a service menu have a look here

/Geoff
  #4 (permalink)  
Old 08-Mar-2008, 21:58
MattB
Guest
 
Posts: n/a
Default

Quote:
I don't edit a large number of files as root. However the occasion does arise such as needing to edit xorg.conf when I install a new video driver. When I do that I usually do it by opening up the superuser Konqueror, navigating to the file and opening it from there just because I'm used to navigating to files in the non root konqeror that way on an everyday basis.

I would like the ability to right click an item such as xorg.conf in a standard non root file browser and have the option to open it with whatever editor I chose as root.
[/b]
If you are happy to specify one Editor for one file just add the file path to the command thus kdesu kate /etc/X11/xorg.conf. Than a click and root password followed by Open session will bring you straight to the file. Thus:
[attachmentid=2208]
[attachmentid=2209]


If you prefer Kwrite use Kdesu kwrite.
  #5 (permalink)  
Old 09-Mar-2008, 05:19
Jon Freeman
Guest
 
Posts: n/a
Default

Quote:
I would like the ability to right click an item such as xorg.conf in a standard non root file browser and have the option to open it with whatever editor I chose as root.
[/b]
I couldn't get it to work adding another file association through konqueror as I guessed I could but I have found this worked for me.

Right click on a text file/Open With/Other...
Enter kdesu kate in "Open With" and check the "remember" box, then OK.

At this point, the association worked but it appeared in the "Open with" menu as kdesu.

In konqueror, I then went back to Settings/Configure konqueror/File Assosciations.
In known types/text/plain, I found the new entry, kdesu. I edited the application name to read "Edit as root".

I then noticed "Edit as root" appeared as an entry for a number of the text types. I opted to change order of preference for some of these as "Edit as root" came first on the lists.
  #6 (permalink)  
Old 09-Mar-2008, 07:27
eberhard
Guest
 
Posts: n/a
Default

Hm, I see you crated the icon for 'Super User Kate'? What if you are a super user, but your name is not Kate, but, say Kurt, does your method still work then?? :unsure:
  #7 (permalink)  
Old 09-Mar-2008, 08:26
MattB
Guest
 
Posts: n/a
Default

Quote:
Hm, I see you crated the icon for 'Super User Kate'? What if you are a super user, but your name is not Kate, but, say Kurt, does your method still work then?? :unsure:
[/b]
Super User JimBob works as well, Eberhard.
Come on people this was not meant to be earth shaking its just a tip if somebody had not thought of it. I had always used a console with kdesu kate in the past but by creating a link it saves a few steps.

Thanks Jon Freeman for the hints towards using konqueror to accomplish what Scott was asking.
  #8 (permalink)  
Old 09-Mar-2008, 10:33
eberhard
Guest
 
Posts: n/a
Default

Quote:
Super User JimBob works as well, Eberhard.
[/b]
I thought, for JimBob, the command would be 'Good Night'.
  #9 (permalink)  
Old 09-Mar-2008, 10:49
MattB
Guest
 
Posts: n/a
Default

Quote:
I thought, for JimBob, the command would be 'Good Night'.
[/b]
Oh no a Waltons reference. However being in the tips and tweaks section lets keep the humor to Off Topic before Deltaflyer sends out the hit squad.
 

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2