Skip to content

Instantly share code, notes, and snippets.

@shamun
Created September 7, 2011 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shamun/1200009 to your computer and use it in GitHub Desktop.
Save shamun/1200009 to your computer and use it in GitHub Desktop.
===============================================
Server listening
===============================================
1. install
# apt-get install vnc4server xinetd
2. Security
# vncpasswd /root/.vncpasswd
Password:
Verify:
3. 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
}
4. 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment