PDA

View Full Version : VNC through broadband(ADSL/Cable) feasible ?



garyng
11-21-2003, 12:20 AM
Hi,

Just want to know if one can get acceptable performance doing this through ADSL/Cable(say accessing home machine from another side of the globe), assuming both side provides reasonable bandwidth ?

rickenbacherus
11-21-2003, 04:33 AM
Indeed you can. Your results will be similar to an internet 'speed test' which is not only dependant on the bandwidth available to the respective machines but is also largely dependant on the route the data must actualy take to get through the network to the other machine. There are settings for compression and options such as not sending the desktop backgrounnd that enable a much faster connection. I have found that VNC is one of the best teaching/support tools available andyes I do use it globally. Personally I like tightvnc (http://www.tightvnc.com). Curently the dev's are working support for file transfers but it is not quite yet implemented.

Real VNC (http://www.realvnc.com/faq.html#internet) is also an option and they have a good FAQ..

Dave_Bechtel
11-22-2003, 05:05 AM
--Best performance I've found ssh with compression and port forwarding:

--VNC listens on port 5900 + whatever screen the server was started with; if you ' vncserver :3 ' then you would ' vncviewer SERVER:5903 '

' vncpasswd ' == Reset the VNC password to whatever you want to use; only need to run once on the server side

--For this example, my vncserver is p233; on (server side) issue:
' vncserver :5 -geometry 1024x768 ' == You can use arbitrary geometry like 900x700 if you want

--Connect remotely from Linux using ' vncviewer p233:5905 ' or http://p233:5805 if you have the Java viewer installed

--To kill vnc on the server side:
' vncserver -kill :5 ' to bring it down and also terminate any client connections

# IF you ' ssh -2 -C -c blowfish -L 5995:p233:5905 p233 ' from a client box, this will compress the VNC data
# THEN ' vncviewer localhost:5995 ' on the client box to connect to the compressed SSH port
# 5995 (localhost) ----=> 5905 (server)

--The above directs SSH to allocate port 5995 on the *client* and listen to port 5905 on p233. You can still connect directly to p233:5905, but if you connect to localhost:5995 on the client you
will get the compressed connection.

--When ' vncserver ' is started, it checks ~/.vncrc, which sets some default values like geometry and color depth (NOT a typical shell script - see man vnc for details. Also note that you can override these default settings by passing args to vncserver on startup) and then points to ~/.vnc/Xsession. Xsession sets a few more regular shell vars and you can put stuff in there to run the rxvt terminal and use ' icewm ' or something as the window manager. If I didn't do this, then KDE would be running instead. ;-)

--Contents of .vncrc


$vncStartup = "~/.vnc/XSession";


--Contents of .vnc/XSession


# initialize variables for use by all session scripts

OPTIONFILE=/etc/X11/Xsession.options

SYSMODMAP=/etc/X11/Xmodmap
USRMODMAP=$HOME/.Xmodmap
SYSRESOURCES=/etc/X11/Xresources
USRRESOURCES=$HOME/.Xresources

SYSSESSIONDIR=/etc/X11/Xsession.d
STARTUP=$HOME/.xsession
ALTSTARTUP=$HOME/.Xsession
ERRFILE=$HOME/.xsession-errors

#xinit /usr/bin/sawfish
##source ~/.vnc/xstartup

xrdb $HOME/.Xresources
xsetroot -solid grey

#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
#icewm &
#/opt/gnome/bin/sawfish &
##/usr/bin/sawfish &
xset s off

# This is from the FAQ - start vncserver with -name

rxvt -geometry 80x34+10+10 -ls -title "$VNCDESKTOP Desktop" &

/usr/bin/sawfish &
# Note: See ~/.xsession for which window manager to load!

exit 0


--Sometimes you will get faster response in the VNC window by limiting the viewer to 256 colors (8bit.) You can do this from Windows as well in the "Options" clicky before initiating the VNC
connection.

--If you are connecting from Windows, also play with the VNC options on the viewer - sometimes you get faster response with Hextile or one of the other options. Experiment.


Indeed you can. Your results will be similar to an internet 'speed test' which is not only dependant on the bandwidth available to the respective machines but is also largely dependant on the route the data must actualy take to get through the network to the other machine. There are settings for compression and options such as not sending the desktop backgrounnd that enable a much faster connection. I have found that VNC is one of the best teaching/support tools available andyes I do use it globally. Personally I like tightvnc (http://www.tightvnc.com). Curently the dev's are working support for file transfers but it is not quite yet implemented.

Real VNC (http://www.realvnc.com/faq.html#internet) is also an option and they have a good FAQ..

garyng
11-22-2003, 08:44 AM
thanks for the reply.

Something I don't quite quite understand about the vnc server part is, can I start it after I logon through ssh or it must be started as a daemon ?

I don't want to open up a computer to the world and only ssh.

What I want to do is only have ssh visible to the rest of the world. When I am on the road, ssh back(either linux or putty on windows) to get a terminal session(as well as port forwarding). From there I start vnc server on my port of choice then connect the vnc client through ssh port forwarding.

Dave_Bechtel
11-22-2003, 10:52 PM
--You can start vncserver from ssh, but if you want ONLY the ssh port visible you will have to firewall the box (iptables, firestarter, etc) -- otherwise nmap will also reveal the vncserver port.


thanks for the reply.

Something I don't quite quite understand about the vnc server part is, can I start it after I logon through ssh or it must be started as a daemon ?

I don't want to open up a computer to the world and only ssh.

What I want to do is only have ssh visible to the rest of the world. When I am on the road, ssh back(either linux or putty on windows) to get a terminal session(as well as port forwarding). From there I start vnc server on my port of choice then connect the vnc client through ssh port forwarding.