Find the answer to your Linux question:
Results 1 to 10 of 10
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2005
    Location
    Dallas, Texas
    Posts
    95

    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.


    Can anyone point me in the right direction here? Thanks!

  2. #2
    Linux Guru budman7's Avatar
    Join Date
    Oct 2004
    Location
    Knee deep in Grand Rapids, Michigan
    Posts
    3,242
    I am not familiar with ed, but I can give you info on vi and nano.

    For nano, do

    nano -w /etc/X11/XF86Config-4
    Make any changes you need to make.

    Use Ctrl + x to quit and save your work.

    For vi, do

    vi /etc/X11/XF86Config-4
    hit " i " to bring you to INSERT mode,
    make your changes. Hit ESC to bring you to COMMAND mode, hit ZZ to quit and save your work.

    Hope this helps.
    How to know if you are a geek.
    when you respond to "get a life!" with "what's the URL?"
    - Birger

    New users read The FAQ

  3. #3
    Linux Engineer
    Join Date
    Oct 2004
    Location
    Vancouver
    Posts
    1,366
    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:

    Code:
    cd /
    /etc/init.d/gdm stop
    mkdir /mandrake
    mount /dev/hda4 /mandrake
    rm /etc/X11/XF86Config-4
    cp /mandrake/etc/X11/xorg.conf /etc/X11/XF86Config-4
    ls /etc/X11/ (to make surethe new file is there)
    /etc/init.d/gdm start
    the last line should restart your gdm session, p.s. you may have to ctl-alt-f7 to see the graphics after this command, not sure though.
    Operating System: GNU Emacs

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    May 2005
    Location
    Dallas, Texas
    Posts
    95
    Thanks budman7 and genesus!

    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.

  6. #5
    Linux Engineer
    Join Date
    Oct 2004
    Location
    Vancouver
    Posts
    1,366
    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.
    Operating System: GNU Emacs

  7. #6
    Just Joined!
    Join Date
    May 2005
    Location
    Dallas, Texas
    Posts
    95
    Quote Originally Posted by genesus
    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.

  8. #7
    Just Joined!
    Join Date
    May 2005
    Location
    Dallas, Texas
    Posts
    95
    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.

    Here is the mouse section from my Debian XF86Config-4 file:
    Code:
     Section "InputDevice"
        Identifier "Mouse1"
    	Driver		"mouse"
    	Option		"CorePointer"
    	Option		"Device"		"/dev/input/mice"
    	Option		"Protocol"		"ImPS/2"
    	Option		"Emulate3Buttons"	"true"
    	Option		"ZAxisMapping"		"4 5"    
    EndSection
    And here is the same section (same mouse works) from Mandrake's xorg.conf:
    Code:
    Section "InputDevice"
        Identifier "Mouse1"
        Driver "mouse"
        Option "Protocol" "ExplorerPS/2"
        Option "Device" "/dev/mouse"
        Option "ZAxisMapping" "6 7"
    EndSection
    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.

  9. #8
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    A ps2-mouse usually reside in /dev/psaux, and /dev/mouse is simply a symlink to your mouse... If you want the symlibk anyway, type this:
    Code:
    ln -s /dev/psaux /dev/mouse
    That should create /dev/mouse properly. You could also configure XF with typing either:
    dpkg-reconfigure xserver-xfree86
    _OR_
    XF86Config

    Good luck on

  10. #9
    Just Joined!
    Join Date
    May 2005
    Location
    Dallas, Texas
    Posts
    95
    Thanks jaboua!

    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?

  11. #10
    Just Joined!
    Join Date
    May 2005
    Location
    Dallas, Texas
    Posts
    95
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •