LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   access to read only files (https://www.linuxquestions.org/questions/linux-newbie-8/access-to-read-only-files-336034/)

absalon 06-22-2005 05:27 AM

access to read only files
 
when trying to edit config files in gnome i keep running into permission issues. instead
of switching to kde and managing my files as a superuser how can i gain access
through gnome?

i usually use a simple text editor to edit such files. i tried using emacs but it got
so confusing that i gave up and opened up my file in kwrite.

is there a problem doing this?

what's the benefit of using the various text editors?

stefan_nicolau 06-22-2005 05:40 AM

To edit files as root, open a terminal and use su to get root access, then launch your favorite editor to edit the file.
eg.
Code:

me@linux# su
Password: <type the password, you won't see anything>
root@linux# nano /some/file

A few editors:
  • Kate
  • Kwrite
  • gedit
  • emacs
  • nano
  • vi
  • vim
  • pico
  • joe
  • more...

My favorite is emacs, many people like vi, the simplest are nano and pico.

ChrisTheGeek 06-22-2005 05:49 AM

Config files come in two shapes: the first are the global settings in /etc and the second are your personal preferences in /home/<username>.

You are free to edit your personal config files. To see them look in your home directory and show hidden files.

The global settings are owned by root so you need to run your text editor as root. This can be done in gnome with the Run As dialog. If you google a bit, I think there are scripts you can get added to the gnome right-click menu that give you an 'Edit as root' option.

As for text editors, it's entirely down to preference. When doing quick edits of config files I usually use the command line. I go for simplicity and use pico but plenty of people (with gnarled fingers) swear by or at vi.

Hope this helps

absalon 06-22-2005 06:05 AM

many thanks. all information has helped.

one quick question for chris:

how do i access the "run as" dialog?

ethics 06-22-2005 06:31 AM

From gnome?? Alt+F2 i think it is?

But typing it in the shell is exactly the same, and doing that with SU is the same as ticking the "run as user -" or whatever box


All times are GMT -5. The time now is 04:06 AM.