Friday, 21 February 2014

Fatal server error: Cannot establish any listening sockets - Make sure an X server isn't already running

Issue
I have installed vncserver and when I tried to start it but I get the error below
"WARNING: The first attempt to start Xvnc failed, possibly because the font catalog is not properly configured. Attempting to determine an appropriate font path for this system and restart Xvnc using that font path ... Could not start Xvnc.
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed _XSERVTransMakeAllCOTSServerListeners: server already running Warning: Xalloc: requesting unpleasantly large amount of memory: 0 bytes.
Fatal server error: Cannot establish any listening sockets - Make sure an X server isn't already running _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed _XSERVTransMakeAllCOTSServerListeners: server already running Warning: Xalloc: requesting unpleasantly large amount of memory: 0 bytes.
Fatal server error: Cannot establish any listening sockets - Make sure an X server isn't already running"
Solution
Terminate all VNCs processes. You can find the process number by running the following command:
#ps -e | grep vnc
11028   ?        00:00:00 Xvnc
kill the process using
#skill -p <pid>
#skill -p 11028 

Reinstall vncserver