Virtual Network Computing

/usr/bin/vncserver is a Perl script which simplifies the process of starting an Xvnc server.

The default port is 5900 + screen no.

Packages:
sudo aptitude install vnc4server xvnc4viewer

Help:
man 1 xvnc
man 1 vncconfig
man 1 vncpasswd
man 1 vncserver
man 1 vncviewer
man 1 Xserver

Starting the server on remote box:
vncserver -geometry 1280x1024

You will require a password to access your desktops.

Password:
Verify:

New 'em3:1 (ken)' desktop is em3:1

Creating default startup script /home/ken/.vnc/xstartup
Starting applications specified in /home/ken/.vnc/xstartup
Log file is /home/ken/.vnc/em3:1.log

Stopping the server on remote box:
vncserver -kill :1
Killing Xvnc4 process ID 14113

Changing the password
vncpasswd

Starting the viewer on local box:
vncviewer 10.0.4.1:1

VNC Viewer Free Edition 4.1.1 for X - built Jan 30 2009 23:06:33
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.

Sun Nov 29 14:53:15 2009
CConn: connected to host 10.0.4.1 port 5901
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
Password:

Press F8 for the VNC menu

ssh -L 5900:localhost:5900 exem4

x11vnc -find

vncviewer localhost :0

Can combine ssh -L 5900:localhost:5900 exem4 x11vnc -find

If NO ONE is logged into an X session yet, but there is a greeter login program like "gdm", "kdm", "xdm", or "dtlogin" running, you will need to find and use the raw display manager MIT-MAGIC-COOKIE file. Some examples for various display managers:

Only root will have read permission for the file, and so x11vnc must be run as root. The random characters in the filenames will of course change, and the directory the cookie file resides in may also be system dependent. Sometimes the command "ps wwwaux | grep auth" can reveal the file location.\

sudo x11vnc -display :0 -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk


Send mail to the Webmaster

logo This site best viewed with a browser
Warning: This is a Debian centric site and MAY contain peanuts.
Many thanks to Debra Lynn and Ian Murdock for making Debian possible
First created Apr 22, 2008 ~ Last revised February 19, 2010

Valid XHTML 1.0 Strict Valid CSS!