Walker News

How To Restart VNC Server After VNC Service Hangs or Stops Unexpectedly?

How difficult is to restart the VNC server or service? Well, there is certainly no difficulty at all, if you’re in front of the server.

Now, imagine that server is at few hundred miles away and nobody is there to restart that bloody machine.

Worst still, simply reboot the machine might not able restart the VNC server.

So, what could you do in order to get the VNC server back to work? Precisely, if you can’t VNC to the remote server, how could you attempt to restart the VNC service?

OK, here are the tips and tricks for VNC server running in Windows or Linux machine.

To apply this method, however, there must be network connection between you and the remote server.

Restart VNC service of a remote computer running Windows 2000 or above

You must do the following steps on a computer running Windows 2000 or above as well. Let say this is a Windows Vista Ultimate machine.

1) Click the Vista Orb (Start button), right-click on Computer and select Manage option from the pop-up menu. This will open Computer Management window.

2) Right-click the Computer Management (Local), the top node on left pane, and select Connect to another computer….

Alternatively, click the Action menu to find the same option.

3) In the Select Computer dialog box, opt for Another Computer and type the computer name in the text box.

If you can’t remember the computer name, click Browse button follow by Advanced button and click Find Now to list all computers detected.

Now, hopefully this step will be succeed. Otherwise, it ends here :-(

Once you’ve connected the remote computer, click Services and applications node on the left pane of Computer Management window. From there, locate the VNC service on the right pane and restart it.

Restart VNC service of a remote computer running Red Hat Enterprise Linux

With Linux, this job is easier :-)

Other than network connection, you must able to remotely login the Linux server, be it the vulnerable telnet or secure SSH protocol.

After login to Linux command prompt (via telnet or SSH), just execute service vncserver restart, if the VNC server is configured to auto-start when Linux boots up / reboot.

If there is no auto-start setup, then do the manual ways as you’ve done:

1) If the VNC server process stills exists, and it was started with DISPLAY:1, then kill it will command vncserver -kill :1

2) Start it again by executing vncserver :1

Now, you can confirm the VNC server is up again by executing netstat command:
netstat -tulpan | grep vnc

If the VNC server is started for DISPLAY:1, the netstat result should shows Xvnc listening to three different ports: 5801, 5901, and 6001.

Custom Search

  1. Faizal 21-12-09@17:36

    Hi

    your document is very help for configuring new vnc..thanks for that..

    i am not able to connect vnc sessions.. please help

    this is how i created vnc session for me

    [root@localhost ~]# vncserver

    New ‘localhost.localdomain:7 (root)’ desktop is localhost.localdomain:7

    Starting applications specified in /root/.vnc/xstartup
    Log file is /root/.vnc/localhost.localdomain:7.log

    this machine is not in NIS. when i try to connect the session from windows by using vnc software. it is not connecting, i have to configure anything additionally..

    error: unable to connect to host: A socket operation was attempted to an unreachable host.(10065)

    thanks in advance..
    faizal

  2. Walker 21-12-09@22:27

    I guess there is no network connection between VNC client and server.

  3. Jon 16-01-10@19:18

    thanks. A ton, windows remote service reset worked!!

  4. Jason 05-02-10@23:06

    Hello….I was hoping we could go further with the instructions on how to “Restart VNC service of a remote computer running Windows 2000 or above”. Reason being, the instructions will not work if VNC has bombed on the server. In other words, if VNC Server bombs out and an error message is up on the screen, the the steps above will not work. When you try to restart VNC server, it won’t work – the service is unable to stop. So, any thoughts on what to do then? One thing I wanted to try was to RDP into the server and end task the VNC server error message….however, I don’t know what that process is named, and if I am running something on that box, I don’t want to end task things without knowing exactly what they are. Any thoughts?

  5. Walker 06-02-10@16:10

    Maybe you can try the pskill to terminate the VNC processes in remote server.

    1) Download the pskill of Sysinternals Utilities.

    2) Take note of the VNC processes running in your server (so that you can pskill them remotely if so unlucky the case happen again).

    I hope that will help. Please let me know your testing. Appreciated that.

  6. Phil Dines 16-03-10@19:24

    Thanks for this very clear to follow information. Saved me a 30 mile round trip!

  7. Anja 21-09-10@01:03

    I want to add that for me only ‘vncserver -kill :1′ with space between kill and : works. I know maybe everyone knows that but I am a newby and understanding syntax is difficult for me :)

  8. Walker 21-09-10@11:48

    @Anja, my bad. There should be a space between “kill” and “:1″.
    Thank for highlighting and it has just been corrected.

  9. bahauddin 01-12-10@13:39

    Hai,

    Can someone help us to run existing service vnc on linux SUSE LINUX Enterprise Server 9 ?

  10. Nandu 10-03-11@21:25

    Hi everyone,

    I am facing difficult in clipboard copying from linux to windows and viceversa. I have xstartup file like

    unset SESSION_MANAGER
    exec /etc/X11/xinit/xinitrc

    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic &
    xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
    twm &

    For sometime I am able to copy from terminal but i am not at all able to copy any content whenever i open a file through vim.

    Thanks
    nandu.

  11. Thomas 15-07-11@22:10

    Hi all,

    If the VNC is running as an extension module, loading from xorg.conf, there is no any vnc service process.

    You can see the TCP listener 5900 port was open by the X.

    How to resolve the VNC server hanged problem? I don’t want to restart X window!

    Any idea?

    Thanks,
    Thomas

  12. kumar 28-11-11@18:32

    Windows vncviewer to fedora 8 works great if a user is logged in.
    How can I get fedora 8 to allow Windows vncviewer to work when no user is logged in on fedora linux?

2014  •  Privacy Policy