I'm looking for a way to reset the display counter for VNC to :1.

What has happened is that my server has been restarted without killing the VNC processes first and upon reboot and then starting vncserver once more with a new process it has started at :2, completely ignoring :1.

On trying to kill :1 it says: "You'll have to kill the Xtightvnc process manually".

I cannot kill this process, there is no pid files for this display to delete and the process has long gone as the server has restarted. Please can someone advise me on how to restart this count back to :1. Can anyone please help me reset these settings.

Using tightvncserver on Ubuntu 14.01

  • The server has restarted, but the process is still there? Sounds like there's a lock file of sorts left around.
    – Huey
    May 4, 2015 at 5:28
  • I've looked through all the running processes by running 'ps aux | less' but the old processes are definitely no longer there. I do think that is the case but I don't have much idea as to where the lock files are
    – Jono_2007
    May 4, 2015 at 12:36
  • Have you tried vncserver -kill :2? May 5, 2015 at 9:44
  • 2 will kill fine but I cannot to kill 1
    – Jono_2007
    May 5, 2015 at 14:34

4 Answers 4


Try running

ps -ef | grep vnc

to see which VNC services are running.

  • This was the answer that led me to the answer thank you sir! I didn't realise that everytime I rebooted my server that Virtual Machine Manager would assign monitors for VNC as it saw fit to my Virtual Machines.
    – Jono_2007
    Jun 6, 2015 at 18:12
  • 3
    Can you please elaborate so that this answers the question? Dec 31, 2019 at 23:29

As @bob has mentioned use the command -

ps -ef | grep vnc

It will list all the vnc related process that are in running state.

So note down the PID of the process having the name


And execute the command kill -9 <PID of Xvnc Process(es)>

I will kill the VNC server.

Then restart the VNC server and think are back.


I solved typing on TightVNC IPSERVER:2 instead of IPSERVER:1. On Vultr cloud, for example, there is another access to ubuntu desktop that is 'View Console'.


The following terminal command;

$ sudo tightvncserver -kill :1

Kills the first server session and leaves the second session untouched.

  • this just repeats the OPs error "You'll have to kill the ..."
    – Erik
    May 13, 2020 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.