If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below. ** If you are logged in, most ads will not be displayed. **

How to edit X configuration file from command prompt

For some reason Debian has stopped booting into X. Now instead of a login manager I get an error message for X and eventually kicked to the command prompt. I'm pretty sure the problem is how the video is set up, so I want to edit the config file and use the settings Mandrake is using for the same system on a separate partition (runs x fine).

My problem is, every way I've tried so far to do this has failed:

1) Base-config runs but there isn't an option to reset the configuration for X.
2) Mandrake can't see the Debian partition.
3) Knoppix see's both partitions but won't let me make changes.
4) XF86cfg will run but it doesn't give me a mouse and while I can use the number keys to move the curser and open a menu, it won't let me move the mouse curser down while holding the menu open (I can open a menu, but can't select an option).
5) My last attempt was to print a hard copy from Mandrake and then use the bash command "ed" to edit the file, but I don't know how this line editor works.

and if you mount your mandrake partition, you can just copy the xorg.conf file over and it should work fine. THis example assumes that mandrake is /dev/hda4 change it based upon where you mandrake is: make sure you are root:

nano ended up being exactly what I was looking for. I was able to type in the settings for what I think were the right sections, but it still did the same thing.

This really has me baffled. Debian was running fine until I cracked open the case to install the DVD burner I got for Fathers Day. First boot up after that was when this started happening. I don't think I hosed any HW because I didn't even have to touch the Motherboard (didn't bother with sound cable) and I wore a wrist strap anyway. Plus, I would think if I hosed the video or something else Mandrake wouldn't have installed like it did (typing this from it now). I even deleted the Debian partition and reinstalled, but it still did the same thing.

Fortunately, I was able to get GRUB to make Mandrake the default boot option so the machine will boot the way my wife expects during the week (she uses the PC all the time now that we don't use Windows any more). I'll try again with Debian next weekend. If I can't get it working on this (AMD) box, I'll try it on my older P4 system.

before you go to the trouble of reinstalling, you may just want to copy your /etc/X11/xorg.conf from mandrake to /etc/X11/XF86Config-4 in debian, they should work the same way. The debian installer does have decent hw detection; however, I think its still not as good as some of the other more user friendly distro...I had to crack open my XF86Config-4 file quite a few times , not to the extent as with gentoo, but much more than with fedora or mandrake. Debian made mistakes in both my monitor and my video card, which pretty much caused the same boot-up problem you expereinced.

before you go to the trouble of reinstalling, you may just want to copy your /etc/X11/xorg.conf from mandrake to /etc/X11/XF86Config-4 in debian, they should work the same way.

Thanks for the advice! I just tried that, and got the same error. However, looking at the different files one thing that I noticed is that there are drivers the Mandrake file points to which don't exist (or exist in a different dir structure) on the Debian side so that may explain why this didn't work as hoped.

I'm going to spend some time reading the XF86Config man page and comparing the two files and see what I can come up with. I think I'll make several versions to try while I'm in Mandrake, and then just copy them over one at a time when I'm booted to the Debian partition to see if one works. Even if I don't fix the problem I'm likely to learn more about how X works, so it should be productive either way (by this standard it already is). I'll post back my results in case you or anyone else is cuious how I make out here.

Eureka! Well, sort of. I can now boot into X on the Debian partition! My only problem is the mouse won't work. In fact, I think this was my problem all along. After I installed the DVD burner I thought the PS2 mouse cord was for an extra one I had on my desk and didn't plug it back in at first. When I reloaded Debian, I must have then gotten the settings wrong (had it plugged in by then). Because Debian doesn't have the "AllowMouseOpenFail" line under "ServerFlags", X wouldn't load without the mouse.

I tried what seemed obvious, using the Mandrake settings in Debian, but it didn't work. I even tried changing everything but the "/dev/input/mice" part since there isn't a file "/dev/mouse" on the debian partition (0 byte file, and won't copy).

Any tips? If anyone has a working PS2 wheel mouse in Debian, would you post the section from your x config file? Barring that, I have a USB and even a serial mouse I can swap if need be.

I found the psaux file in Debian and made that the device option (the link through /dev/mouse is optional, right?). As soon as I did this and rebooted, I could use the mouse!

I only have one remaining question, and it's really more of an annoyance than anything else. The wheel on the mouse works in Mandrake but not in Debian. Does anyone have a working PS2 wheel mouse in Debian, who could post the mouse section of their XF86Config-4 file?

Just reinstalled Debian using the DVD install instead of the net one. There are some differences including the kernel it installed (it chose the K7 version for my Athlon processor instead of the generic 386 one) and it was able to configure my mouse automatically. Now the scroll works along with everything else.