© David Morgan 2003,2004
Cross
Cross
-
-
platform UI access
platform UI access
VNC and rdesktop
David Morgan
© David Morgan 2003,2004
Running the other guy
Running the other guy
’
’
s software
s software
Do it on your machine
© David Morgan 2003,2004
Doing it on your machine
Doing it on your machine
Run something that emulates his whole OS
– VMWare
– Lin4Win
Run something that emulates the system
service/API portion of his OS
– wine
– cygwin
Run something that emulates the behavior
of certain particular applications of his
– OpenOffice
Go ahead and turn his machine off!
--Doing it on his machine
Doing it on his machine
Run nothing of his on your machine
– not his OS
– not his API
– not his applications
You just access his machine’s I/O
© David Morgan 2003,2004
Accessing I/O: examples
Accessing I/O: examples
VNC
VNC
rdesktop
graphic
mode
telnet, ssh, etc
--character
mode
win-to-lin
lin-to-win
© David Morgan 2003,2004Accessing his graphical I/O
Accessing his graphical I/O
© David Morgan 2003,2004
VNC
VNC
RFB (Remote Frame Buffer) protocol
by AT&T Laboratories, U.K.
(defunct)
server – ports 590 for displays
0-
plus http server – 100 ports lower
– allows a browser as client
rdesktop
rdesktop
RDP (Remote Desktop) Protocol
– by Microsoft
based on ITU T-120 family of protocols
– “Data protocols for multimedia conferencing”
– by International Telecommunications Union
server - port 3389
© David Morgan 2003,2004
Microsoft Terminal Services (TS)
Microsoft Terminal Services (TS)
is an RDP implementation
rdesktop, an RDP client, runs against TS
TS also, more recently, dubbed “Remote
Desktop Connection”
© David Morgan 2003,2004
[root@EMACH1 root]# su david -c vncserver New 'X' desktop is EMACH1:1
Starting applications specified in /home/david/.vnc/xstartup Log file is /home/david/.vnc/EMACH1:1.log
[root@EMACH1 root]# su nitsa -c vncserver New 'X' desktop is EMACH1:2
Starting applications specified in /home/nitsa/.vnc/xstartup Log file is /home/nitsa/.vnc/EMACH1:2.log
[root@EMACH1 root]# ps -ef | grep Xvnc
david 3047 1 0 09:23 tty1 00:00:00 Xvnc :1 -desktop X –httpd /usr/share/vnc/classes -auth /home/david/.Xauthority -geometry 1024x768 -depth 8 -rfbwait 120000 -rfbauth /home/david/.vnc/passwd -rfbport 5901 -fp unix/:7100 nitsa 3061 1 1 09:24 tty1 00:00:00 Xvnc :2 -desktop X –httpd /usr/share/vnc/classes -auth /home/nitsa/.Xauthority -geometry 1024x768 -depth 8 -rfbwait 120000 -rfbauth /home/nitsa/.vnc/passwd -rfbport 5902 -fp unix/:7100 root 3118 1488 0 09:24 tty1 00:00:00 grep Xvnc
Setting up 2 VNC servers
Setting up 2 VNC servers
run a server instance as user david
and another as user nitsa
displays
© David Morgan 2003,2004
Setting up 2 VNC servers
Setting up 2 VNC servers
One server
– user david
– on X display 1
– via vnc on port 5901 or http on port 5801
– runs david’s “xstartup”s window manager etc
the other server
– user nitsa
– on X display 2
– via vnc on port 5902 or http on port 5802
– runs nitsa’s “xstartup”s window manager etc
lin
lin
desktop from win desktop
desktop from win desktop
(via
(via
vnc
vnc
)
)
ran VNC viewer against
192.168.3.7:2 (display 2)
© David Morgan 2003,2004
lin
lin
desktop from win desktop
desktop from win desktop
(via http)
(via http)
ran Internet Explorer against
ports 5801(display 1)
and 5802 (display 2)
© David Morgan 2003,2004
lin
lin
desktop from win desktop
desktop from win desktop
(via http)
(via http)
(Note: / home/david/.vnc/xstartup changed to call gnome instead of twm, relative to earlier slied)
© David Morgan 2003,2004
[root@EMACH1 root]# su david -c vncserver New 'X' desktop is EMACH1:1
Starting applications specified in /home/david/.vnc/xstartup Log file is /home/david/.vnc/EMACH1:1.log
[root@EMACH1 root]#
[root@EMACH1 root]# tail -f /home/david/.vnc/EMACH1\:1.log 28/10/03 20:08:53 httpd: get '' for 192.168.3.3
28/10/03 20:08:53 httpd: defaulting to 'index.vnc'
28/10/03 20:09:00 httpd: get 'vncviewer.jar' for 192.168.3.3 28/10/03 20:09:14 Got connection from client 192.168.3.3 28/10/03 20:09:14 Protocol version 3.3
28/10/03 20:09:14 Using tight encoding for client 192.168.3.3
28/10/03 20:09:14 Enabling X-style cursor updates for client 192.168.3.3 28/10/03 20:09:14 Enabling LastRect protocol extension for client 192.168.3.3 28/10/03 20:09:14 Pixel format for client 192.168.3.3:
28/10/03 20:09:14 8 bpp, depth 8
28/10/03 20:09:14 true colour: max r 7 g 7 b 3, shift r 0 g 3 b 6 28/10/03 20:09:14 no translation needed
Finger on the server pulse
Finger on the server pulse
…
…
there’s a log file
watch dynamically
Stopping server
Stopping server
[david@EMACH1 .vnc]$ vncserver New 'X' desktop is EMACH1:1
Starting applications specified in /home/david/.vnc/xstartup Log file is /home/david/.vnc/EMACH1:1.log
[david@EMACH1 .vnc]$ ps -ef | grep Xvnc | grep -v grep
david 2777 1 0 22:04 pts/0 00:00:00 Xvnc :1 -desktop X –httpd /usr/share/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 8 –rfbwait 120000 -rfbauth /home/david/.vnc/passwd -rfbport 5901 -fp unix/:7100 [david@EMACH1 .vnc]$
[david@EMACH1 .vnc]$ vncserver -kill :1 Killing Xvnc process ID 2777
[david@EMACH1 .vnc]$
[david@EMACH1 .vnc]$ ps -ef | grep Xvnc | grep -v grep [david@EMACH1 .vnc]$
born as display :1
© David Morgan 2003,2004
win desktop from
win desktop from lin
lin
desktop
desktop
(via
(via
rdesktop
rdesktop
)
)
© David Morgan 2003,2004
win desktop from
© David Morgan 2003,2004
X client/server model, VNC and
X client/server model, VNC and
X Client/application
X Server /
service
-OR-VNC vis
VNC vis
-
-
à
à
-
-
vis X
vis X
X Client/application
X Server /
service
X11 protocol X11 protocol port 6000 port 6000 VNC protocol VNC protocol port 5900 port 5900© David Morgan 2003,2004
Why VNC over X?
Why VNC over X?
widely cross-platform
– clients and servers for UNIX, Win, Mac,
mainframes, handhelds
lightweight (low bandwidth)
persistent desktops
– close viewer
– relaunch later, to previous desktop unaltered
© David Morgan 2003,2004
“
© David Morgan 2003,2004
capturing screen images
capturing screen images
xwd
– “xwd –root –out screenimage.xwd”
ImageMagick
– “display screenimage.xwd”
– when image appears left click, file/save/format
to convert to another format (jpg, gif, etc)
see man xwd, man ImageMagick
VNC sources
VNC sources
http://www.tightvnc.com
http://www.realvnc.com/
http://networking.earthweb.com/netos/print.php/1470341
http://www.linux-mag.com/2003-03/guru_01.html
/usr/share/doc/kernel-doc-*/fb/framebuffer.txt
© David Morgan 2003,2004
rdesktop
rdesktop
sources
sources
http://www.rdesktop.org/
http://www.microsoft.com/windows2000/techinf
o/howitworks/terminal/rdpfandp.asp
http://www.itu.int/ITU-T/
© David Morgan 2003,2004THE END
THE END
© David Morgan 2003,2004