3

When I need to edit a file (e.g. the httpd.conf file or the php.ini file) I start a terminal and open it with:

sudo vim /etc/apache2/httpd.conf

Most of the times, in order to be able to edit the files that I need without having to sudo all the time, I do a:

sudo bash

and stop worrying about sudo. However, in some cases, I prefer to edit files with gEdit or some other text editors. Most of the times though, the user that I'm logged in as, does not have the necessary permissions to edit the specific file. So my question is the following:

Besides opening gedit through Terminal with sudo, is there any easier way to edit a text file as Super User so that I don't get access denied errors? The same question applies to running applications as Super User (e.g. WireShark requires Super User permissions and I have to launch it from the terminal every time with sudo).

Maybe I'm missing something obvious here, but please enlighten me.

F1234k
  • 155

1 Answers1

3

You don't need to drop into root everytime you want to run a few applications. You can add new menu items to your system which will launch applications as the root user (via sudo and gksudo) Adding new menu items is outlined in How can I add and change items in my Applications Menu? Just look up the software's command in alacarte, copy it for the new entry and prior to it's command add gksudo IE: gksudo gedit

Typically I make a new folder called "System Tools" and place those under there.

Once you create the entry in alacarte you can then Right Click the file, Open With another Application, and choose the new entry you've create in alacarte as the software to open with.

Marco Ceppi
  • 48,827