Tuesday, August 12, 2014

XServer/Xterm Trouble shooting

keep getting the message: "Server is already active for display 0"

You get an error message like:
Fatal server error:
Server is already active for display 0
 If this server is no longer running, remove /tmp/.X0-lock
 and start again.
The number denotes the display number (in this case 0). This number needs to be unique on the system, so you cannot run two servers on one system with identical display numbers. This message indicates that there is already a server with this number running on the system. You can verify this by running
 ps aux | grep `cat /tmp/.X0-lock`
If you see an output like:
root  2283  0.5  5.1 27796 6536 ?    S  Apr21  59:03 [X]
it indicates that there is indeed an Xserver running under this PID. To start a second server on the same system you have to give it a different dislay number. If you start your servers using startx you can do
startx -- :1
to start a server with display number 1. If you are sure there is no other server running on your system and above ps command indicates that no server with this PID is running, you should remove the file /tmp/.X0-lock by doing (as 'root'):
rm -rf /tmp/.X0-lock

I keep getting the message: "Cannot establish any listening sockets..."

You get an error message like:
_XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running
This problem is very similar to the previous one. You will get this message possibly because the lock file was removed somehow or some other program which doesn't create a lock file is already listening on this port. You can check this by doing a netstat -ln. Xservers usually listen at tcp port 6000+, therefore if you have started your Xserver with the command line option :1 it will be listening on port 6001.
Please check the article above for further information.

No comments:

Post a Comment