Remote GUI
Transcription
Remote GUI
Cross-platform UI access VNC and rdesktop David Morgan © David Morgan 2003,2004 Running the other guy’s software Do it on your machine Do it on his machine (today’s topic) © David Morgan 2003,2004 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! -© David Morgan 2003,2004 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! -© David Morgan 2003,2004 2 Accessing I/O: examples lin-to-win character mode graphic mode -VNC rdesktop win-to-lin telnet, ssh, etc VNC © David Morgan 2003,2004 Accessing his graphical I/O -- with VNC or rdesktop © David Morgan 2003,2004 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 © David Morgan 2003,2004 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 4 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 Setting up 2 VNC servers [root@EMACH1 root]# su david -c vncserver run a server instance as user david 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 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 © David Morgan 2003,2004 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 © David Morgan 2003,2004 lin desktop from win desktop (via vnc) vnc) ran VNC viewer against 192.168.3.7:2 (display 2) 192.168.3.7:1 (display 1) © David Morgan 2003,2004 6 lin desktop from win desktop (via http) ran Internet Explorer against ports 5801(display 1) and 5802 (display 2) © David Morgan 2003,2004 lin desktop from win desktop (via http) (Note: / home/david/.vnc/xstartup changed to call gnome instead of twm, relative to earlier slied) © David Morgan 2003,2004 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 28/10/03 20:08:53 httpd: 28/10/03 20:08:53 httpd: 28/10/03 20:09:00 httpd: 28/10/03 28/10/03 28/10/03 28/10/03 28/10/03 28/10/03 28/10/03 28/10/03 28/10/03 20:09:14 20:09:14 20:09:14 20:09:14 20:09:14 20:09:14 20:09:14 20:09:14 20:09:14 -f /home/david/.vnc/EMACH1\:1.log get '' for 192.168.3.3 defaulting to 'index.vnc' get 'vncviewer.jar' for 192.168.3.3 there’s a log file watch dynamically Got connection from client 192.168.3.3 Protocol version 3.3 Using tight encoding for client 192.168.3.3 Enabling X-style cursor updates for client 192.168.3.3 Enabling LastRect protocol extension for client 192.168.3.3 Pixel format for client 192.168.3.3: 8 bpp, depth 8 true colour: max r 7 g 7 b 3, shift r 0 g 3 b 6 no translation needed © David Morgan 2003,2004 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]$ © David Morgan 2003,2004 8 win desktop from lin desktop (via rdesktop) rdesktop) © David Morgan 2003,2004 win desktop from lin desktop (via vnc) vnc) © David Morgan 2003,2004 9 X client/server model, VNC and -OR- X Client/application X Server / service © David Morgan 2003,2004 VNC vis-à-vis X X11 protocol port 6000 X Client/application X Server / service VNC protocol port 5900 vncviewer VNC Client vncserver (Xvnc) VNC Server © David Morgan 2003,2004 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 © David Morgan 2003,2004 “vncviewer 192.168.3.7” from …3.4 © David Morgan 2003,2004 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 © David Morgan 2003,2004 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 12 rdesktop 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,2004 THE END © David Morgan 2003,2004 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 © David Morgan 2003,2004 14