------------------------------------------------------------------------------- Hiding VNC icon in system tray This one works for tight vnc, should be same / similar for others: [HKEY_LOCAL_MACHINE\SOFTWARE\ORL\WinVNC3] "DisableTrayIcon"=dword:00000001 ------------------------------------------------------------------------------- VNC the console display... The following has been obsoleted by the X frame buffer server http://www.hexonet.de/software/x0rfbserver/ x11vnc http://www.karlrunge.com/x11vnc/ VNC for the real X server, rather than a virtual X server Replacement for x0rfbserver Multi-machine desktops... x2vnc http://fredrik.hubbe.net/x2vnc.html Let you use two screens of two different computers from the same mouse and keyboard! It creates a one pixel wide window on the edge of the screen which when entered transfers control to the other computers VNC server, and visa-versa. For X windows, use x11vnc for the display, or better still just use the single package x2x x2x http://ftp.digital.com/pub/Digital/SRC/x2x/ ------------------------------------------------------------------------------- VNC networking improvments The consensus of suggestions on resolving performance issues when using VNC over SSH seems to be : 1) Turn SSH compressions off if CPU of the server may be a limiting factor 2) Investigate using TightVNC (www.tightvnc.com) which works better over slow links with high latency. 3) Try changing the cryptography from 3DES to Blowfish which is far more efficient. 4) http://www.uk.research.att.com/vnc/sshvnc.html provides pointers for using VNC with SSH 5) try removing bitmaps from your desktop and apps being displayed through VNC From 4.. NC 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. We therefore recommend that if security is important to you, you 'tunnel' the VNC protocol through some more secure channel such as SSH. Basic SSH use... The ssh command... ssh -L X:localhost:y snoopy VNC command will connect port X on local machine to port Y on snoopy If you make port X 5902 then loal VNC port :2 to go to port Y on snoopy if your display on snoopy :1 the Y will also be 5901 EG: this will do the job. ssh -L 5902:snoopy:5901 snoopy vncviewer localhost:2 If you add -C (+C for ssh2) to the ssh then it will also compress the data link connection. NOTE: the "localhost:5901" is the port to forward the data recieved by the remote machine (the last "snoopy" argument) to. The port to forward to does not actually have to be on the same machine. (see same doc). =============================================================================== VNC to a Remote X windows Console This requires you to setup a link to the remote console (via SSH) on which you have an existing X window login, so that you can view that console and any existing running applications. First make sure both machines has vnc-server package installed and both has the same ".vnc/passwd" file (using "vncpasswd") Access the remote machine running the x server, and create the secure connection... ssh -L 5900:localhost:5900 `find_host l` \ env DISPLAY=:0 x0vncserver PasswordFile=.vnc/passwd Note new FC8 machines also need an appropriate XAUTHORTY=/tmp/.??file??? environment variable. Wait for the VNC connection to be initialized then connect to it though the ssh link... vncviewer :0 -PasswordFile=.vnc/passwd =============================================================================== Automatic VNC console display (Solaris and Linux or other UNIX) Well not exactly like this but basically like this. My X window login process has become very complex over the years, but the basic steps below are the same. Use and test at own risk. The result of this is a X login which automatically starts a vncserver and a vncviewer, so that your console display will actually be a vnc exported display (:1) being viewer of the primary console (:0) of the machine which you can then view from anywhere. As hinted at by Q22 of the VNC FAQ. With this method I can also either quit the server to logout completely killing all VNC clients, -OR- kill just the viewer to logout form the console, but leaving the VNC server running on display :1. The later will allow you to return to that server when you next login on the console again, at a later time. The first part of this method involves CDE internals, a very complex mess. For normal XDM/KDM usage, just ignore that part and create your .xsession as below, which these systems call by default. More information on CDE configuration can be found in my "Tower of Computational sorcery"... http://www.cit.gu.edu.au/~anthony/info/lift.html Specifically http://www.cit.gu.edu.au/~anthony/info/X/CDE.hints and http://www.cit.gu.edu.au/~anthony/info/X/CDE_Solaris_notes.txt The setup.... First if you are using CDE, side track its login process with the following ".dtprofile" to run your own ".xsession" script. If you don't do this but select the "olwm" session type then it will run a ".xinitrc" script in your home and not the ".xsession" script. so adjust accordingly. ASIDE the main difference between a ".xsession" and a ".xinitrc" is that ".xsession" has your set you your environment, while ".xinitrc" should already have your enviorment set up. I prefer to do my own enviroment setup, so I usally side track the CDE login process. .dtprofile -- override CDE to call a ".xsession" script =======8<--------CUT HERE----------axes/crowbars permitted--------------- # XDM Session startup # # The following will tell DT to start up as if it is an XDM Session. SESSIONTYPE=xdm # XDM style of session please ( ~/.xsession ) # Set the scripts to look for... # NOTE: scripts must be executable programs! xdmstart_session[0]="$HOME/.xsession" xdmstart_session[1]="xterm -geometry 80x24+10+10 -ls" xdmstart_hello="/usr/openwin/bin/xconsole -daemon -notify -verbose -fn fixed -exitOn Fail &" # Cycle any old log currently present rm -f .xsession-errors-prev [ -f .xsession-errors ] && mv .xsession-errors .xsession-errors-prev # Specify the log file location dtstart_sessionlogfile="$HOME/.xsession-errors" =======8<--------CUT HERE----------axes/crowbars permitted--------------- NOTE: DO NOT launch dthello, no window manager will be started to kill that application on the login screen (:0) we will only run a full screen viewer and nothing else. The xterm is a fail safe. Second in your .xsession set up your environment, then launch the vncserver and vncviwer -- and have it wait on the viewers exit The vncserver also runs your normal X session (see below) .xsession -- launch vnc server and vncviewer =======8<--------CUT HERE----------axes/crowbars permitted--------------- #!/bin/sh - cd # Go Home # Set up your environment, PATH, LD_LIBRARY_PATH etc as required. # a good way is source a .bashrc initialisation script, if you have it. # retrieve X display info, specifically its width, height and depth __HOST="$HOST" VENDOR="" # clear this to avoid confusion if display fails eval `xrdb -symbols | sed -n '/=/{s/-D\([^= ]*\)=*/\1=/gp;}'` HOST="$__HOST" # correct this xrdb setting (rdb sets to display server!) unset __HOST vncserver -depth $PLANES -geometry ${WIDTH}x${HEIGHT} \ -alwaysshared -xstartup .xinitrc :1 vncviewer -shared -fullscreen -passwd .vnc/passwd :1 # Wait for viewer to exit... =======8<--------CUT HERE----------axes/crowbars permitted--------------- Notes from the above... 1/ The vnc server password should have already bee set with "vncpasswd" 2/ You can select any display number you like, except :0 3/ The vncserver script has a -xstartup option was added by the following patch. Without it you have to modify .vnc/xstartup appropriately to exec to the script you want to use. 4/ The ".xinitrc" script can be any normal X start up script, If you like the normal CDE session, run it: "/usr/dt/bin/dtsession" (See CDE script /usr/dt/bin/Xsession for defaults EG: variable settings dtstart_session[0] or xdmstart_session[0] ) OR for openwin use /usr/dt/config/Xinitrc.ow Patch to vncserver to provide -xstartup option =======8<--------CUT HERE----------axes/crowbars permitted--------------- *** vncserver.orig Sat Jan 5 10:13:59 2002 --- vncserver Sat Jan 5 11:21:41 2002 *************** *** 31,43 **** # # Global variables. You may want to configure some of these for your site. # ! $geometry = "1024x768"; $depth = 8; ! $desktopName = "X"; $vncUserDir = "$ENV{HOME}/.vnc"; $vncClasses = "/usr/local/vnc/classes"; $xauthorityFile = "$ENV{HOME}/.Xauthority"; $defaultXStartup = ("#!/bin/sh\n\n". --- 31,45 ---- # # Global variables. You may want to configure some of these for your site. # ! chop($host = `uname -n`); $geometry = "1024x768"; $depth = 8; ! $desktopName = "Xvnc $host"; $vncClasses = "/usr/local/vnc/classes"; $vncUserDir = "$ENV{HOME}/.vnc"; $xauthorityFile = "$ENV{HOME}/.Xauthority"; + $xstartup_def = "$vncUserDir/xstartup"; + $xstartup = $xstartup_def; $defaultXStartup = ("#!/bin/sh\n\n". *************** *** 46,58 **** "xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n". "twm &\n"); - chop($host = `uname -n`); - - # Check command line options &ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1, ! "-help",0,"-h",0,"--help",0); &Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'}); --- 48,57 ---- "xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n". "twm &\n"); # Check command line options &ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1, ! "-xstartup",1,"-help",0,"-h",0,"--help",0); &Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'}); *************** *** 75,80 **** --- 74,86 ---- &CheckGeometryAndDepth(); + if ($opt{'-xstartup'}) { + if ( ! -x $opt{'-xstartup'} ) { + warn("VNC -xstartup file option does not exist! -- using default.\n"); + } else { + $xstartup = $opt{'-xstartup'}; + } + } if ($opt{'-name'}) { $desktopName = $opt{'-name'}; } *************** *** 168,174 **** # Create the user's xstartup script if necessary. ! if (!(-e "$vncUserDir/xstartup")) { warn "Creating default startup script $vncUserDir/xstartup\n"; open(XSTARTUP, ">$vncUserDir/xstartup"); print XSTARTUP $defaultXStartup; --- 174,180 ---- # Create the user's xstartup script if necessary. ! if ( $xstartup eq $xstartup_def && ! -e $xstartup_def ) { warn "Creating default startup script $vncUserDir/xstartup\n"; open(XSTARTUP, ">$vncUserDir/xstartup"); print XSTARTUP $defaultXStartup; *************** *** 191,197 **** } $ENV{VNCDESKTOP}= $desktopName; ! system("$vncUserDir/xstartup >> " . "edString($desktopLog) . " 2>&1 &"); exit; --- 197,203 ---- } $ENV{VNCDESKTOP}= $desktopName; ! system("$xstartup >> " . "edString($desktopLog) . " 2>&1 &"); exit; =======8<--------CUT HERE----------axes/crowbars permitted--------------- Final Notes... Two methods of logout. I have a window manager menu option to kill all the clients AND the the vncserver using vncserver -kill $DISPLAY DO NOT use a window or session provided logout, or the server will be left running with no clients, and a empty viewer. OR I use the F8 popup to just kill the viewer and thus return the machine to the login screen. In which case the vncserver is still running. Then when I login again the current vncserver will re-show itself where I left off! The vncserver launch command will silently fail as a server is already running. Enjoy, comments welcome. ===============================================================================