Editing xorg.conf without being in Ubuntu

Asked by Jacob on 2009-03-12

I am trying to do a tri boot between windows 7, xp, and linux, and having a #$%^&%#@#$ing hell of a time getting it to work :)

So here's my latest problem. After installing linux for the second time, I then attempted to install a driver for my graphics card (ATI Radeon 4670). The first time I did this it worked find. The second time, however,( after resinstalling linux) it said I needed super user permission to install the driver. Then I went into Administration>Hardware Drivers> and hit activate for the driver. Somehow it worked then, and it said I needed a restart. I did, and when it restarted the screen went black after the loading bar and said "Horizontal Sync too high" or something like that.

Now, since I can't even get into Ubuntu to edit the xorg.conf file to fix the resolution, I tried hitting CTRL+ALT+F2, which brought up the terminal from the outside. I then used "nano /etc/X11/xorg.conf" to try to edit the file. But when I exit and try to save, it says I don't have permissions to save the file.

This is really pissing me off because I can't even get into ubuntu to fix it. I am about to reinstal linux again, and this time add the resolution stuff in BEFORE I do anything else, but if there's an easier solution, I would greatly appreciate the help!!

Help! :)
Jacob

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu xorg Edit question
Assignee:
No assignee Edit question
Solved by:
Jacob
Solved:
2009-03-12
Last query:
2009-03-12
Last reply:
2009-03-12
Torsten Franz (torsten.franz) said : #1

Hi Jacob,

please edit with

sudo nano /etc/X11/xorg.conf

Dann you must enter your password and you have the permission you needed.

Bye

Torsten

copetti (copetti-rs) said : #2

Hello! As I understand it you want to get into root mode in the xorg.conf file to change it and save it, is it?
Type in terminal:
$ sudo vim / etc/X11/xorg.conf
Request your password.
Open a text editor, now press "i" to change it after you change press "ESC" and then "WQ! and an ENTER. Restart the pc.

Tom (tom6) said : #3

Ok, one guide you probably really don't need right now is
https://help.ubuntu.com/community/WindowsDualBoot

If you are trying to edit Ubuntu files then maybe do so from a LiveCd session (ie bootup off the Ubuntu Cd but go for the "don't install or mess my computer up by installing something better" option). Hopefully the xorg.conf from the Live session might help you reconfigure the one that's on your hard-drive ;)

Errr, you might need to do some very strange navigating in a terminal console and then use commands like
"sudo cp xorg.conf xorg.conf.120309" &
"sudo nano xorg.conf"

Good luck and regards from
Tom :)

Jacob (jacob-st) said : #4

How do I edit my current ubuntu files through the cd? wouldn't that just edit the cd?

Tom (tom6) said : #5

If you're using the Grub-boot-loader then you'll probably get to a menu with quite a few Ubuntu options - try the one that ends with "Recovery Mode" this should allow you to fix the xserver and drop to a command line and all sorts ;)

Good luck :)

Sam_ (and-sam) said : #6

quote:
>it said I needed super user permission
>it says I don't have permissions to save the file

Hi,
Ubuntu is very user friendly, it usually tells you what to do or what is missing.
In this case it's about 'super_user_do'.
In simple terms, it allows the user to get temporary privilege to administrate the system via the command 'sudo'.
##Reasons are security issues and avoiding trouble while working on system files, e.g. xorg.conf, which usually shouldn't be necessary for the common user with a standard desktop environment.

https://help.ubuntu.com/community/RootSudo

e.g.
sudo nano /etc/X11/xorg.conf
password for Jacob: ##you wont see anything when you type ##it's the password you login with

##it is recommended to backup system files before editing
sudo nano /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

Options:
Before the splash the boot menu appears, where it is possible to choose the kernel image, e.g. recovery mode, and drop to a so called 'root shell'.
http://wiki.ubuntuusers.de/_image?target=Recovery_Modus%2Frecoverymodus.png

http://wiki.ubuntuusers.de/_image?target=Recovery_Modus%2Frecoverymodus_auswahl.png

LiveCD Recovery
https://help.ubuntu.com/community/LiveCdRecovery

Information for resolution issues offers:
xrandr
for help on applications are manuals, so called manpages, available:
man xrandr

https://wiki.ubuntu.com/X/Config/Resolution

Tom (tom6) said : #7

Ooops, the partitions are all in "/media" so open a terminal console
Applications - Accessories - Terminal

and into the terminal/command window/console type

cd /media
ls
cd disk
ls

note the "ls" is a small "LS" and gives a list of whats in the folder. "dir" works too but isn't colour coded. When you've found the one that isn't Windows then type in

cd etc/X11

making sure you don't use a / at the front or yes you will end up back at the cd's file-structure. Anyway then typing

ls
sudo cp xorg.conf xorg.conf.120309
ls
sudo nano xorg.conf

or even use gedit instead of nano to get a nice gui text-editor, if you're working from a desktop then why not use a gui? :) Hopefully you'll notice whether you've accidentally ended up inside the Live session's xorg.conf which might be useful to have open at the same time anyway.

Jacob (jacob-st) said : #8

I fixed it! Kinda. I used that recovery mode>root shell to access the xorg.conf file, which gave me the permissions to edit it through nano. Then I rebooted, and it came up with some weird "linux is running on low graphics mode", and so I said continue running low graphics, and it logged me in. I don't see anythig that seems "low graphicsy", so I don't know what it was talking about.

Thank you all for the help!

Tom (tom6) said : #9

Brilliant, nicely done. Welcome to linux-land especially to the Ubuntu corner ;)

Good luck and regards from
Tom :)