I was trying to make a VNC server in my Ubuntu 11.04, which can allow me to login even system reboots. Therefore, I have tried as following, but from vncviewer I can't connect.
Server listening
Install
$ sudo -s # apt-get install vnc4server xinetd
Security
# vncpasswd /root/.vncpasswd Password: Verify:
As a service
# vim /etc/xinetd.d/Xvnc service Xvnc { type = UNLISTED disable = no socket_type = stream protocol = tcp wait = yes user = root server = /usr/bin/Xvnc server_args = -inetd :1 -query localhost -geometry 1024x768 -depth 16 -once -fp /usr/share/X11/fonts/misc -DisconnectClients=0 -NeverShared passwordFile=/root/.vncpasswd port = 5901 }
Start the service
# service xinetd stop # service xinetd start
Client trying
$ vncviewer 192.168.1.125:1
TigerVNC Viewer for X version 1.0.90 - built May 10 2011 10:04:22
Copyright (C) 2002-2005 RealVNC Ltd.
Copyright (C) 2000-2006 TightVNC Group
Copyright (C) 2004-2009 Peter Astrand for Cendio AB
See http://www.tigervnc.org for information on TigerVNC.
Wed Sep 7 10:08:20 2011
CConn: connected to host 192.168.1.125 port 5901
main: read: Connection reset by peer (104)
apt-get remove vnc4server xinetd
, thensudo apt-get install x11vnc
. Certainly on my system here, xinetd is not installed, so it should be a simple reversal to undo what you've done and install x11vnc. But if they're working, perhaps you could just leave them working - x11vnc is incredibly powerful/versatile/easy to setup, but at the end of the day, delivers the same basic functionality as vnc4server! – Scaine Sep 14 '11 at 17:46