Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-22-2005, 03:56 AM   #1
LQ Newbie
Registered: Apr 2005
Location: Sahf Lundon UK
Distribution: Fedora3
Posts: 18

Rep: Reputation: 0
vi to edit files??

Just a quick one.

Can I use vi to edit a /xorg.conf file?

If I can do I; 'Xorg -configure' to get a '.new' file, edit this new file and then 'cp' -> /etc/X11/xorg.conf?

Because at the moment my monitor is (not) showing a freq range of 30-38.

I've found a web site with vi commands, but any help would be appreciated.
Old 04-22-2005, 04:09 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680
You will need to be to be root before being able to save the file in the /etc directory. In other words you need to use the 'su -' command.

You might want to make a backup copy of the xorg.conf file first.
Inside vi, you could save the edited file directly
:s /etc/X11/xorg.conf

This command will save the file as the xorg.conf file directly.
This command will quit vi.

Remember that you need to be in the command mode and not the edit mode to enter these commands. You could use another editor if you wished.
Old 04-22-2005, 04:18 AM   #3
LQ Newbie
Registered: Apr 2005
Location: Sahf Lundon UK
Distribution: Fedora3
Posts: 18

Original Poster
Rep: Reputation: 0

Many thanks for the quick reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cannot Write/Edit files on hd.. Mmc245 Linux - Hardware 3 07-03-2005 06:08 PM
edit executable files jonathanjumbo Linux - Software 2 05-22-2005 02:22 PM
how do i edit files???? zexter Mandriva 9 11-06-2004 10:02 AM
Edit files help flira Linux - Newbie 2 05-27-2004 09:31 PM
How to Edit .img files safrout Linux - Software 2 08-13-2003 07:54 AM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration