Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Error with VNC: Session is already running

Tags:

solaris-10

While starting VNC session in Solaris 10 I am getting below error:

vncserver :0

A VNC server is already running as :0

ps -ef | grep -i vnc

root 19790 15407 0 05:55:22 pts/3 0:00 grep -i vnc #

however there is no sessions running at :0. I am not very sure if somewhere we have to define :0 port or not.

like image 920
Awinash Goswami Avatar asked Feb 27 '15 00:02

Awinash Goswami


2 Answers

For me, as suggested in the comments, the solution was to delete some temporary files from a previous run:

rm -f /tmp/.X0-lock
rm -f /tmp/.X11-unix/X0
like image 87
Brad Parks Avatar answered Oct 17 '22 21:10

Brad Parks


After a lot of efforts I found removing .vnc folder(inside $Home) resolves the issue. .VNC folder is created every time you run the vncserver. This folder has a file that has a process Id of vnc to kill. In case the vncserver process hangs and doesn't even shows in ps -ef command, remove the .vnc folder, after that vncserver will be able to create new .vnc folder and kill the existing process.

like image 3
user2056463 Avatar answered Oct 17 '22 20:10

user2056463