Cross-platform UI access VNC and rdesktop David Morgan Running the other guy s s software Do it on your machine Do it on his machine (today s topic) 1
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 Run nothing of his on your machine not his OS not his API not his applications You just access his machine s I/O On your machine, run the software for that -- Turn his machine off? you better not! -- 2
Accessing I/O: examples character mode graphic mode lin-to-win -- VNC rdesktop telnet, ssh, etc VNC win-to-lin Accessing his graphical I/O -- with VNC or rdesktop 3
VNC RFB (Remote Frame Buffer) protocol by AT&T Laboratories, U.K. (defunct) server ports 5900- for displays 0- plus http server 100 ports lower allows a browser as client 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 4
Microsoft Terminal Services (TS) is an RDP implementation rdesktop, an RDP client, runs against TS TS also, more recently, dubbed Remote Desktop Connection Setting up 2 VNC servers [root@emach1 root]# su david -c vncserver New 'X' desktop is EMACH1:1 run a server instance as user david Starting applications specified in /home/david/.vnc/xstartup Log file is /home/david/.vnc/emach1:1.log [root@emach1 root]# su nitsa -c vncserver and another as user nitsa New 'X' desktop is EMACH1:2 Starting applications specified in /home/nitsa/.vnc/xstartup Log file is /home/nitsa/.vnc/emach1:2.log displays [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 ports 5
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 desktop from win desktop (via vnc) ran VNC viewer against 192.168.3.7:2 (display 2) 192.168.3.7:1 (display 1) 6
lin desktop from win desktop (via http) ran Internet Explorer against ports 5801(display 1) and 5802 (display 2) lin desktop from win desktop (via http) (Note: / home/david/.vnc/xstartup changed to call gnome instead of twm, relative to earlier slied) 7
Finger on the server pulse [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 there s a log file watch dynamically 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 Stopping server [david@emach1.vnc]$ vncserver New 'X' desktop is EMACH1:1 born as display :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 kill, by its display number Killing Xvnc process ID 2777 [david@emach1.vnc]$ [david@emach1.vnc]$ ps -ef grep Xvnc grep -v grep [david@emach1.vnc]$ 8
win desktop from lin desktop (via (via rdesktop) win desktop from lin desktop (via vnc) 9
X client/server model, VNC and -OR- X Client/application X Server / service VNC vis-à-vis X X11 protocol port 6000 X Client/application X Server / service VNC Client VNC Server VNC protocol port 5900 vncviewer vncserver (Xvnc) 10
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 vncviewer 192.168.3.7 from 3.4 11
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 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 12
rdesktop sources http://www.rdesktop.org/ http://www.microsoft.com/windows2000/techinf o/howitworks/terminal/rdpfandp.asp http://www.itu.int/itu-t/ THE END 13
into win from lin rdesktop 192.168.3.3 rdesktop F 192.168.3.3 how to escape fullscreen? vncviewer 192.168.3.3 F8 to toggle fullscreen 14