Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

someone has edited wrongly my xorg.conf file in /etc/x11/xorg.conf and so my computer wont show anything,just a blank screen.I want to be able to edit the xorg.conf file and delete all the changes made.

I have put in my livecd and i can see my documents from the broken installation and also the xorg.conf file and the changes that were made but the file is read only.

How can i edit this xorg.conf and delete the changes that were made?.

share|improve this question
up vote 3 down vote accepted

There is one workaround: start your system and wait until it boots up. Press ctrl+alt+F1 to switch to a text console. Log in with your user, and after using sudo, use your favorite editor to edit the xorg.conf. For example:

sudo nano /etc/x11/xorg.conf

About the other question regarding why you can't edit the file from the live cd: there can be more reasons you cannot edit your installed system's files.

Some of these reasons can be:

  1. When you boot from the live cd the user that the installer uses when launching a terminal is not root. Therfore you have to execute "sudo -s" at the terminal window to become root so you can edit the file on the already mounted FS.
  2. The FS (filesystem) that contains your installed OS is mounted as read-only. In this case you have to remount it as rw.

To detect if a FS is mounted as read-only:

sudo mount /mnt/mount_point | grep ro

If this command returns a line then the mounted FS is mounted as read-only.

To remount a read-only mounted FS as writable:

sudo mount /dev/block_device_id /mnt/ -o remount,rw
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.