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 08-24-2005, 02:44 PM   #1
nyheat
Member
 
Registered: Aug 2005
Distribution: Debian
Posts: 75

Rep: Reputation: 15
[DONE] Need help editing xorg.conf


I installed Ubuntu last night and spent about 8 hours playing around with it
I'm just starting to get a hang of it, i.e. how the file structure works and stuff like that..
my problem at the moment is with the resolution. I cant edit xorg.conf, I just dont know how. I managed to find it and open it through some text editor but it only opens as "read only"
..sorry for making you read all that, but my question is this: How do I edit xorg.conf? .. do I need to log out of X to do that?

Last edited by nyheat; 08-24-2005 at 07:52 PM.
 
Old 08-24-2005, 02:57 PM   #2
dinolinux
Member
 
Registered: Jun 2005
Location: Oslo, Norway
Distribution: Slackware 11, Solaris 10, Solaris 9, Sourcemage 0.9.6
Posts: 322

Rep: Reputation: 31
You haven't got root permissions. Try this:
Code:
sudo emacs /etc/X11/xorg.conf
But I wouldn't recommend a newbie to edit xorg.conf. There are some nice interfaces to do it. Try this:
Code:
sudo xorgconfig
or
Code:
sudo xorgcfg
 
Old 08-24-2005, 03:12 PM   #3
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,776

Rep: Reputation: 86
sudo gedit /etc/X11/xorg.conf works as well.
 
Old 08-24-2005, 03:57 PM   #4
nyheat
Member
 
Registered: Aug 2005
Distribution: Debian
Posts: 75

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by aysiu
sudo gedit /etc/X11/xorg.conf works as well.
it opened a blank file

Quote:
sudo xorgconfig
I dont want to create a new one, I'd like to work with the one I already have, I'm only editing 2 lines

Quote:
sudo emacs /etc/X11/xorg.conf
got the error: emacs: command not found
as far as I remember emacs is an editor, and judging by that error I guess I dont have it installed?
 
Old 08-24-2005, 03:59 PM   #5
dinolinux
Member
 
Registered: Jun 2005
Location: Oslo, Norway
Distribution: Slackware 11, Solaris 10, Solaris 9, Sourcemage 0.9.6
Posts: 322

Rep: Reputation: 31
Try other editors like nano or vi
 
Old 08-24-2005, 04:01 PM   #6
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
There should be a way in Ubuntu to change the screen resolution without editing xorg.conf. If I recall correctly there is an admin option of some type in the gnome system menu. Look around in there for the settings. Ubuntu does pretty good hardware support, so you should have some options. I would be very careful if you do decide to edit xorg.conf, since you are a newbie, you could get urself into some problems.
 
Old 08-24-2005, 04:09 PM   #7
nyheat
Member
 
Registered: Aug 2005
Distribution: Debian
Posts: 75

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by dinolinux
Try other editors like nano or vi
Nano is the only one that opened it successfully.
..I made the edit I need to do, but I'm a bit confused on how to save the file. - will WriteOut save the file?



Quote:
There should be a way in Ubuntu to change the screen resolution without editing xorg.conf. If I recall correctly there is an admin option of some type in the gnome system menu. Look around in there for the settings. Ubuntu does pretty good hardware support, so you should have some options. I would be very careful if you do decide to edit xorg.conf, since you are a newbie, you could get urself into some problems.
there is an option to change the resolution, but out of the possible resolutions only 1 is listed, and it's not the correct one
the odd thing is that my xorg.conf file lists the correct device driver and even the correct resolution, so I have no idea why it doesnt work
 
Old 08-24-2005, 04:14 PM   #8
dinolinux
Member
 
Registered: Jun 2005
Location: Oslo, Norway
Distribution: Slackware 11, Solaris 10, Solaris 9, Sourcemage 0.9.6
Posts: 322

Rep: Reputation: 31
Control + C will save the file, control + X will exit
 
Old 08-24-2005, 04:20 PM   #9
nyheat
Member
 
Registered: Aug 2005
Distribution: Debian
Posts: 75

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by dinolinux
Control + C will save the file, control + X will exit
actually all CTRL+C does is tell what line the cursor is one...... but according to http://mintaka.sdsu.edu/reu/nano.html CTRL+O will save the file.. but when I tried to do that I got "Could not open file for writing: No such file or directory"
 
Old 08-24-2005, 04:25 PM   #10
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
you save with ctrl+x with nano
 
Old 08-24-2005, 04:50 PM   #11
nyheat
Member
 
Registered: Aug 2005
Distribution: Debian
Posts: 75

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by bosewicht
you save with ctrl+x with nano
gives me the "Could not open file for writing: No such file or directory" error


thanks for the help btw I really appreciate it
 
Old 08-24-2005, 05:23 PM   #12
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
But it opens? and you can read it? if you can read it and edit it. typing ctrl+x will ask if you want to save. type Y and it will warn you about overwriting files. did it ask you for a password after the sudo?

try
sudo nano /etc/X11/xorg.conf
 
Old 08-24-2005, 07:50 PM   #13
nyheat
Member
 
Registered: Aug 2005
Distribution: Debian
Posts: 75

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by bosewicht
But it opens? and you can read it? if you can read it and edit it. typing ctrl+x will ask if you want to save. type Y and it will warn you about overwriting files. did it ask you for a password after the sudo?

try
sudo nano /etc/X11/xorg.conf
Okay, I figured out what was happening.

- when I typed sudo nano /etc/X11/xorg.conf I would spell x11 instead of X11
- mispelling it would open Nano, but it wouldnt open the appropriate file
- I would then manually open the file, but evidently I wasnt getting the sudo privileges


what I learned
- Linux is case sensitive when it comes to file locations
- nano is a text-based editor and Gedit is an X editor
- 'sudo' gives power to edit system files


thanks for all your help, I still have tons of questions but this problem is solved

Last edited by nyheat; 08-24-2005 at 07:52 PM.
 
Old 08-24-2005, 07:55 PM   #14
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
The easiest way to aviod things like that is to use the <tab> key. if you type /et then tab it will put /etc/ if you were to type /etc/x then the tab key it would beep if you have sound or not complete. This is true with files as well and yes *nix is case sensitive
 
Old 08-24-2005, 07:57 PM   #15
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Glad you got your first problem solved, however, I believe that if your maintaining your Linux system then you may as well just login as (su) superuser, rather then using sudo...

$ su <enter>
PW <enter>
#

KC
 
  


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
editing conf files Digitalsoldier Linux - Newbie 2 08-05-2005 07:59 AM
Editing xorg.conf on Suse 9.2 w/ ATI Mob. 9700 Dell Inspiron 9200 elliotfuller Linux - Hardware 5 04-28-2005 10:24 AM
editing refresh rate in xorg.conf does nothing Riallin Slackware 22 02-28-2005 04:31 AM
lilo.conf editing Daunted Linux - Newbie 6 10-16-2004 11:13 PM
Xorg Hard Crashes and corrupts xorg.conf Advocator Linux - General 0 07-15-2004 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:27 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