$ vncserver -geometry 800x600 :7
New 'X' desktop is sunny:7
Starting applications specified in /home/tong/.vnc/xstartup Log file is /home/tong/.vnc/sunny:7.log
vncviewer &
$ vncserver -kill :7 Killing Xvnc process ID 4219
http://www.uk.research.att.com/vnc/
ftp://ftp.uk.research.att.com/pub/vnc/dist/vnc-3.3.3r9_x86_win32.tgz http://www.uk.research.att.com/vnc/dist/vnc-3.3.3r9_winsrc.tgz http://www.uk.research.att.com/vnc/dist/vnc-latest_doc.tgz http://www.uk.research.att.com/vnc/dist/vnc-3.3.3r2_x86_linux_2.0.tgz http://www.uk.research.att.com/vnc/dist/vnc-3.3.3r2_javasrc.tgz http://www.uk.research.att.com/vnc/dist/vnc-3.3.3r2_unixsrc.tgz
http://www.zdnet.com/products/stories/reviews/0,4161,406544,00.html http://www.linux-mag.com/cgi-bin/printer.pl?issue=2000-11&article=desktop http://www.help2go.com/BestoftheNet/VNC.cfm http://www.utilitygeek.com/software/virtual/vnc.html http://security-archive.merton.ox.ac.uk/nt-security-199904/0011.html http://security-archive.merton.ox.ac.uk/nt-security-199904/0001.html http://www.tecmag.com/remote.htm
You should copy these programs to some directory which is in your PATH environment variable, such as /usr/local/bin:
% cp vncviewer vncserver vncpasswd vncconnect Xvnc /usr/local/bin
If you want to use the Java VNC viewer, you should copy the class files from the classes directory to some suitable installation directory such as /usr/local/vnc/classes:
% mkdir -p /usr/local/vnc/classes % cp classes/* /usr/local/vnc/classes
We recommend that you use the vncserver script to run Xvnc for you. You can edit the script as appropriate for your site. Things you may need to change include:
vncserver -h
root@sunny# vncserver
You will require a password to access your desktops.
Password: Verify:
New 'X' desktop is sunny:1
Creating default startup script /home/tong/.vnc/xstartup Starting applications specified in /home/tong/.vnc/xstartup Log file is /home/tong/.vnc/sunny:1.log
vncviewer -h
tong@sunny:~/$ vncviewer &
— connect to sunny:1, AOK
— connected as root!!!
root@sunny# vncserver -geometry 800x600 :7 New 'X' desktop is sunny:7
Starting applications specified in ...
When you make a connection to a VNC server, all other existing connections are normally closed. This is for security reasons, and because we normally think of VNC as a tool for mobility: your desktop follows you from place to place.
Command line options: -shared can fix it.
From "Making VNC more secure using SSH"
http://www.uk.research.att.com/vnc/sshvnc.html
VNC uses a random challenge-response system to provide the basic authentication that allows you to connect to a VNC server. This is reasonably secure; the password is not sent over the network. Once you are connected, however, traffic between the viewer and the server is unencrypted, and could be snooped by someone with access to the intervening network.
So, make it simple, run vncserver as myself and avoid any further login requests.
How to 'tunnel' the VNC protocol through SSH is discussed in the article.
H has another advantage. It can compress the data as well. This is particularly useful if the link between you and the server is a slow one. It might be a better way to connect form my home to office using cable modem. And it might be the only way for vnc to go through the univ. firewall.
08/06/01 18:42:00 Xvnc version 3.3.3r2 08/06/01 18:42:00 Copyright (C) AT&T Laboratories Cambridge. 08/06/01 18:42:00 All Rights Reserved. 08/06/01 18:42:00 See http://www.uk.research.att.com/vnc for information on VNC 08/06/01 18:42:00 Desktop name 'X' (sunny:7) 08/06/01 18:42:00 Protocol version supported 3.3 08/06/01 18:42:00 Listening for VNC connections on TCP port 5907 08/06/01 18:42:00 Listening for HTTP connections on TCP port 5807 08/06/01 18:42:00 URL http://sunny:5807 Font directory '/usr/X11R6/lib/X11/fonts/100dpi/' not found - ignoring AUDIT: Fri Jun 8 18:42:03 2001: 8084 Xvnc: client 1 rejected from local host Xlib: connection to ":7.0" refused by server Xlib: Client is not authorized to connect to Server xrdb: Can't open display ':7' AUDIT: Fri Jun 8 18:42:03 2001: 8084 Xvnc: client 1 rejected from local host Xlib: connection to ":7.0" refused by server Xlib: Client is not authorized to connect to Server xsetroot: unable to open display ':7' AUDIT: Fri Jun 8 18:42:03 2001: 8084 Xvnc: client 1 rejected from local host [...]
If you get a 'Client is not authorized to connect to Server' or similar message, there's something wrong with the X authority setup - perhaps xauth is not on your path? You could try using xhost to bypass this temporarily, but we wouldn't recomend this as a long-term solution. There should be some indication in the log file if xauth has failed.
From http://www.uk.research.att.com/vnc/archives/2000-06/0199.html
> add "xhost +" to your .vnc/xstartup file and hopefully that'll work.
No!
I found out that there is nothing wrong with my server environment. I can start my vnc server locally, within / without a X server.
The problem is that I can't remotely start it, either from xterm or remote tty connection.
Besides, locally I can specify the -display parameter to lanuch my xterm from my X-window into my vnc-client. But remotely I can't:
Xlib: connection to "sunny:7.0" refused by server Xlib: Client is not authorized to connect to Server xterm Xt error: Can't open display: sunny:7