[mdlug] X server

Robert Meier eaglecoach at wwnet.com
Tue Feb 27 22:24:53 EST 2007


[multiple copies stripped]

> Having problems with my x-server starting correctly.
> I get an error that tells me,
> "There already appears to be an x server running on display :0.
> should I try another display number?
> if you answer no, i will attempt to start the server on :0 again"

> It askes me this every time i boot up,
> if i hit yes it goes to a different screen and i can log in,
> if i hit no it loops going between the log in [screen] and the error message.
> how do i stop this?

Thank you for the clear succinct problem description.

<GUESS>
I suspect that your X-server is being started on screen 0 during boot
to level 5.
This would be a conventional setup, but I further suspect that your
display is not being switched to the correct pseudo terminal,
usually /dev/ptys7.
When you then try to start X again, possibly with startx,
it asks for confirmation, before starting a second X server,
probably feeding /dev/ptys8.
</GUESS>

<HINT>
If the above is correct, you need to fix your boot configuration.

You can try to find the running X server by shifting display
assignments, normally with Ctl-Alt-F<n>, where Ctl-Alt-F1 usually
selects /dev/ptys1 - the boot terminal, Ctl-Alt-F10 selects /dev/ptysa
- the system messages terminal, and Ctl-Alt-F7 selects /dev/ptys7
- the X server terminal.  Try F2, F3, ... and note what you see
on each pseudo terminal.

If you find a text window (normally terminals 2, 3, .. 6) you should
be able login at the prompt, and find yourself executing a shell.
You can learn if and where X is running with
    bash> ps -ef | grep X
    ...
    ... /usr/X11R6/bin/X :0 vt07 -auth ...
    ...
which informs you that display :0 is attached to virtual terminal 7,
a.k.a. /dev/ptys7 .

If no X is running, you can learn what happened by examining the
log, usually /var/log/XFree86.<n>.log, /var/log/xdm.errors, or
/var/log/Xorg.<n>.log

To play more easily with X settings in /etc/X11/XF86Cofig or
/etc/X11/xorg.conf, you can boot to level 3 (usually multi-user
non-graphical) which should leave at the boot terminal login prompt.
Depending on your boot manager (e.g. grub) you can boot to level
3 by appending " 3" to the boot options.  It is likely that your
boot menu offers you a non-graphical choice possibly named,
... text-only ..., or ... fail-safe ... 

>From the text console you can start the X server and your default
window manater with
       bash> startx
and see the effects of your changes to the X settings by examining
the logs.
</HINT>

Hopefully helpful,
-- 
Dr. Robert J. Meier



More information about the mdlug mailing list