LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 04-22-2005, 04:56 AM   #1
Andknig
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, 05:09 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
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.
:q
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, 05:18 AM   #3
Andknig
LQ Newbie
 
Registered: Apr 2005
Location: Sahf Lundon UK
Distribution: Fedora3
Posts: 18

Original Poster
Rep: Reputation: 0
Excellent

Many thanks for the quick reply
 
  


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


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

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