LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need help editing xorg.conf (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-editing-xorg-conf-356560/)

nyheat 08-24-2005 01:44 PM

[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?

dinolinux 08-24-2005 01:57 PM

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

aysiu 08-24-2005 02:12 PM

sudo gedit /etc/X11/xorg.conf works as well.

nyheat 08-24-2005 02:57 PM

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?

dinolinux 08-24-2005 02:59 PM

Try other editors like nano or vi

bosewicht 08-24-2005 03:01 PM

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.

nyheat 08-24-2005 03:09 PM

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

dinolinux 08-24-2005 03:14 PM

Control + C will save the file, control + X will exit

nyheat 08-24-2005 03:20 PM

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"

bosewicht 08-24-2005 03:25 PM

you save with ctrl+x with nano

nyheat 08-24-2005 03:50 PM

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

bosewicht 08-24-2005 04:23 PM

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

nyheat 08-24-2005 06:50 PM

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 :)

bosewicht 08-24-2005 06:55 PM

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

kencaz 08-24-2005 06:57 PM

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


All times are GMT -5. The time now is 10:09 PM.