LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Xorg -config "fatal server error" (https://www.linuxquestions.org/questions/linux-newbie-8/xorg-config-fatal-server-error-544543/)

RevenantSeraph 04-09-2007 10:31 AM

Xorg -config "fatal server error"
 
Forgive my extreme newbishness... I'm just trying to change the Xorg configuration, as I've done many times, but all of a sudden it said:

> Xorg -configure

> Fatal server error:
Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.


In a previous session I'd been using ssh, so I figured that it must still be connected or something, so I connected again and logged out, but it didn't help. Thus I went into /tmp and removed .X0-lock. Now when I try it,

> Xorg -configure

> Fatal server error:
Cannot move old log file ("/var/log/Xorg.0.log" to "/var/log/Xorg.0.log.old"


... Did I just do something very stupid?

GrapefruiTgirl 04-09-2007 04:10 PM

Based on that stuff you posted, just copy the .old file to the same directory it is already in, but rename it without the .old extension.

As far as killing X on ubuntu, running Gnome, you have to run /etc/X11/gdm kill ( I **think** that's the command--- I have the /etc and /gdm right, but I'm not sure it's in /X11 )..
I'll come back in a moment with the right command.
And no, it isn't serious or very stupid ;)

UPDATE: /etc/init.d/gdm stop is how to stop X when running Gnome.. type this in a root console.

RevenantSeraph 04-09-2007 07:17 PM

Quote:

Originally Posted by GrapefruiTgirl
Based on that stuff you posted, just copy the .old file to the same directory it is already in, but rename it without the .old extension...
UPDATE: /etc/init.d/gdm stop is how to stop X when running Gnome.. type this in a root console.

So, I killed X like you mentioned, then tried it again. It listed the first error I had, then I deleted the new tmp file, it gave me the second error. It had already come up with a new .old log and still had the regular log. So I tried deleting the not-old log as well as the old log, and then putting in its place the old log renamed as the not-old log. It then gave me error number two again.

What does it want from me? Is there any way to restore it to default so I can get Xorg -configure to actually run?

... And it's reassuring to know I'm not totally messing things up!

GrapefruiTgirl 04-09-2007 07:20 PM

Are you running the -configure command as root, or as user? If using your user account, try using root..

Post if that works; if not I'll look into it further :)

Also, in a console, type 'top' and see if there is any X process running, which would be using the file. If there is, then it maybe won't be able to delete or move the file(s). If so, try killing the process (and the ssh process too, if it's still running.
I don't know the *exact* command to kill a process, but type 'man kill' in a console and it should tell you how to use it.... Something like:

kill 123
or
ps 123 -kill

RevenantSeraph 04-09-2007 07:27 PM

I tried sudo Xorg -configure, but it gave me error number one again. I'm going to try to rm that tmp file again, be back in a sec...

RevenantSeraph 04-09-2007 07:30 PM

It gives me error #2 again.

RevenantSeraph 04-09-2007 07:35 PM

Top tells me there's an Xorg running under root, even after I stopped GNOME (again) as mentioned earlier. I tried kill Xorg, but the syntax seems to be wrong.

Edit: so, I rebooted and typed top into Terminal as fast as possible, and watched. At first there was no Xorg, then it started again as I watched. I stopped the /etc process, but the top Xorg process didn't even blink.

GrapefruiTgirl 04-09-2007 07:57 PM

Hmmm..
in the console, as root, type 'telinit 1'
This "should" kill *everything*, and drop you at single-user mode, with nothing running.
You will need to log in again. From there, try your xorg-configure stuff..
Let us know how it goes :)
Good luck, *fingers crossed*
:)

RevenantSeraph 04-09-2007 07:59 PM

Before I do that, how do I un-telinit, so that I can come back once it's done?

GrapefruiTgirl 04-09-2007 08:03 PM

Well, with ubuntu, if you telinit to any level other than 1, it will restart X again... I don't think you want that.
But, if you get done what you are trying to do, then use 'telinit 3' or 4 or 5.. Just not 0 or 6, or it will reboot.

RevenantSeraph 04-09-2007 08:07 PM

Okay, so it theoretically starts up Xorg -config, but now it says that it doesn't recognize my mouse, and just stops there. I imagine that's because that process was killed. :) What now?

And I am ***so*** extremely grateful for your time.

GrapefruiTgirl 04-09-2007 08:11 PM

do you need the mouse right now, absolutely ??

The mouse driver is generally installed by X (lol, catch 22) , so I'm not totally sure if you...
Well, try running the mouse server by typing 'gpm start' or '/etc/init.d/gpm start' .. I am not sure where the gpm file is located. I'll check my system for clues and get back to you..

And, you're welcome, I hope this works for you in the end :)

GrapefruiTgirl 04-09-2007 08:13 PM

Mine is located at /usr/sbin/gpm so if yours is in the same place, try:
./usr/sbin/gpm
or
./usr/sbin/gpm start
or
/usr/sbin/gpm start
or just
gpm
..or if you have to, navigate to the directory and type 'gpm'

RevenantSeraph 04-09-2007 08:19 PM

It won't seem to let me get any further without a mouse.

I have tried gpm, gpm start, /usr/sbin gpm start, /usr/sbin/gpm start (there is no gpm in that directory), /etc/init.d/gpm start...

Can I look somewhere or have it tell me where mine is, in terminal or a gui?

Also, have you found a way just to kill the Xorg process? My reading of man kill has not amounted in much.

Edit: I have gone into xorg.conf, but it didn't tell me anything I found helpful. Maybe it will help you, but I think it won't tell you much.

xorg.conf:
...
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
...

GrapefruiTgirl 04-09-2007 08:31 PM

OK, in the manual, the mouse server says to just type gpm, and when I did, it said I didn't specify a device.
So I am guessing that 'gpm /dev/mouse' or whatever your mouse device is called, should work..
If you don't use gpm on ubuntu, I have no idea what to do next for the mouse..

For killing a process, use 'top' to get the process number and then:

kill -123

where 123 was the process number.
You might also try 'kill x' or 'kill X' or 'kill -X' as it claims you can use the process name too.

try 'man gpm' and see if you get the manual page for gpm, to see if it is even on your system.

EDIT: It really looks like GPM depends on X anyways.. It is asking me for a mouse#1, and my existing mouse is mouse#0, so... I guess it needs to be specified in X first.. :(

EDIT: Here is the command my system uses to restart gpm:
/usr/sbin/gpm -m /dev/mouse -t imps2


All times are GMT -5. The time now is 01:31 AM.