Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to start VNC server because :0 is taken

I have a Raspberry Pi with Raspbian OS. After install VNC I've tried to start the server and return this:

 ~ $ vncserver :0

Warning: raspberrypi:0 is taken because of /tmp/.X0-lock
Remove this file if there is no X server raspberrypi:0
A VNC server is already running as :0

If I remove that temp file, return this:

~ $ vncserver :0

Warning: raspberrypi:0 is taken because of /tmp/.X11-unix/X0
Remove this file if there is no X server raspberrypi:0
A VNC server is already running as :0

If I remove again, the server start, but a plain grey screen is shown trough VNC client. In short, after:

~ $ sudo rm /tmp/.X11-unix/X0
~ $ sudo rm /tmp/.X0-lock
~ $ vncserver :0

New 'X' desktop is raspberrypi:0

Starting applications specified in /home/pi/.vnc/xstartup
Log file is /home/pi/.vnc/raspberrypi:0.log

I can see this in the RealVNC client (screen capture):

https://dzwonsemrish7.cloudfront.net/items/40182G3E332b3f1j3846/Captura%20de%20pantalla%202013-11-11%20a%20las%2023.03.46.png?v=6719a796

I have no idea what happens.

like image 583
aitor Avatar asked Nov 13 '13 06:11

aitor


People also ask

What VNC 0?

The second option -display :0 means, that you want to connect to the session on the display :0, which is usually the active session. Now you can access your actual desktop with any vnc viewer application on the default vnc port 5900.

Why is VNC not accepting connections?

The remote computer's antivirus software or firewall is blocking your connection attempt. On the remote computer, ensure antivirus software lists VNC Server as an exception, and the firewall is configured to allow access on VNC Server's listening port (5900 by default).


1 Answers

Finally, I've dicovered that I can run VNC in port :1

vncserver :1

then, I must connect VNC viewer at

myIP:1

It works.

like image 137
aitor Avatar answered Sep 16 '22 17:09

aitor