LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   X Windows Trouble (https://www.linuxquestions.org/questions/linux-newbie-8/x-windows-trouble-875607/)

sublime188 04-18-2011 06:06 AM

X Windows Trouble
 
I am trying to run X windows on CentOS with GNOME.
When I first enter startx i get the message:

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

Then I removed the .X0-lock file
ran startx again and I got this message:

_XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running

Finally, I ran startx -- :1 and then it flashed a black screen with the X mouse cursor but a second later it just went right back to the desktop. I'm all out of ideas can someone please help me?

stoggy 04-18-2011 06:46 AM

try ctrl+alt+F1 or ctrl+alt+F6 maybe your just on the wrong tty


what runlevel are you in? try `runlevel`


is X already running? try `ps aux | grep -i x` that will find some extra stuff too


check your X log file start with `tail /var/log/Xorg.0.log` but may need to grep or cat | less it.

nicolasjengler 04-18-2011 06:52 AM

Maybe you're in the wrong tty. For what I'm reading I can tell you to try swtiching to the tty1 (Ctrl + Alt + F1), if it doesn't work, try everything that stoggy told you.

sublime188 04-18-2011 07:17 AM

I tried running from tty 3 and 4
I am running at runlevel 5 so that's not the problem.
I had one instance of X running, I killed that process then I tried running startx again, the screen flashed to with the X cursor again and just went back to the desktop.
I even tried running startx -- :1 vt10
My log file just states the previous error messages from previous post.
Nothing seems to be working. Thanks for the help so far though.

MTK358 04-18-2011 04:02 PM

Maybe X is already running in a TTY.

Try Ctrl+Alt+F7.

Also, post the output of "ps aux | grep X". It should tell if X is running.

sublime188 04-19-2011 01:05 AM

[user@localhost ~]$ ps aux | grep 'X'
root 4193 1.4 1.0 93456 14008 tty7 Ss+ 22:41 0:12 /usr/bin/Xorg :0 -br -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
user 4261 0.0 0.0 53892 760 ? Ss 22:41 0:00 /usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c "/usr/bin/dbus-launch --exit-with-session /etc/X11/xinit/Xclients"
user 4282 0.0 0.0 15200 524 ? S 22:41 0:00 /usr/bin/dbus-launch --exit-with-session /etc/X11/xinit/Xclients
user 5481 0.0 0.0 61232 744 pts/1 R+ 22:56 0:00 grep X


I realized I had to set xhost to allow me access, so I ran xhost + I ran startx again I received this message:

Errors from xkbcomp are not fatal to the X server
sh: -c: line 0: unexpected EOF while looking for matching `"'
sh: -c: line 1: syntax error: unexpected end of file
localuser:myname being added to access control list
No profile for user 'myname' found
gnome-session: you're already running a session manager

MTK358 04-19-2011 08:02 AM

Did you try Ctrl+Alt+F7?

I'd actually try all of the F keys, not just 1-6.

stoggy 04-19-2011 06:41 PM

try changing runlevels to a console mode and then back to gui mode.

to get to console runlevel:
telinit 3


then go back to X runlevel
telinit 5


All times are GMT -5. The time now is 09:47 PM.