Well, this has happened to me a few times now as I'm playing around with files, most recently after installing the packages needed to enable DVD playback in gxine. You restart your computer only to find a black screen and no X Server loading, or if you're lucky you get the lovely garbled message informing you "Way to go dummy, you killed X" (ok, so those aren't EXACT words, but that's how my computer talks to me in my mind). Well, I've tired of trying to remember how to fix my mistakes every time, so here it is.
I used the Xubuntu 7.04 (Feisty) Alternative CD for this procedure, but it should work the same for any Debian or Ubuntu derivatives with the Rescue feature.
Start your computer and immediately insert the CD. When the menu appears choose the Rescue a broken system feature (aptly named I must say). This will run you through a few options such as location, keyboard, DHCP config, etc. but when this is done it asks what partition to mount as root. Choose your root partition, for me on my PC it is /dev/hda1, but on the G4 it's /dev/hda3 (thanks to Apple partition table and Yaboot). Now choose the Execute a shell in /dev/hda1. This will give you the terminal to play with to your heart's content.
Now for the actual fix:
Type Xorg -configure. This will run some tests and configure X the same as it was initially. Now type X -config //xorg.conf.new. If this works it will give you a checkerboard background with the X mouse. Make sure the mouse moves and your monitor isn't screaming at you, this would mean the refresh rates are off. Now press CTRL+ALT+BACKSPACE to exit the test environment. That's a fun step X fails to mention. If it didn't work you can edit the file xorg.conf.new file yourself or you can follow any directions they give you on what the problem may be.
If it did work now type cp xorg.conf.new /etc/X11/xorg.conf and let it do its thing. Now do an exit and this will take you back to the menu. Select Reboot System and remove the CD. This should get you back to a working OS.
As long as you can always find a way to fix your mistakes and take precautions (backing up like you're paranoid) you can do as much as you want to a computer, I find that's the best way to find out how software works. Edit things, see how they work, and when they break learn how to fix it. Though I say again, NEVER EDIT FILES THAT MAY BREAK THE SYSTEM IF YOU DON'T BACK UP ANY FILES YOU WANT!!!