tag:blogger.com,1999:blog-14890466674756482442024-02-19T13:02:02.083+05:30Life's Goodnagalenojhttp://www.blogger.com/profile/16258196284062926782noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-1489046667475648244.post-42151739731471832642010-04-26T17:05:00.008+05:302010-07-30T14:49:21.279+05:30RfbProxy - How to installSteps to install RfbProxy:<br />
<br />
<ol></ol>1. You could get the source from sourceforge by either <br />
<div style="color: #4c1130;">wget http://sourceforge.net/projects/rfbproxy/files/rfbproxy/1.1.1/rfbproxy-1.1.1.tar.bz2/download</div>or<br />
In browser, load <span style="color: #4c1130;">http://sourceforge.net/projects/rfbproxy/</span> and click on the 'Download Now' button.<br />
<br />
2. Once you do this, you'll get a bzipped tar file, untar it.<br />
<div style="color: #4c1130;">tar - jxvf rfbproxy-1.1.1.tar.bz2</div><a name='more'></a><br />
<br />
3. Enter the source directory,<br />
<div style="color: #4c1130;">cd rfbproxy-1.1.1</div><br />
4. configure it,<br />
<div style="color: #4c1130;">sh ./configure</div><br />
5. Do make and install it.<br />
<div style="color: #4c1130;">make</div><div style="color: #4c1130;">make install</div><br />
Installation is done now. You will find an executable in the directory named 'rfbproxy'! <br />
<br />
Execute '<span style="color: #4c1130;">make uninstall</span>' to uninstall when you want to uninstall.<br />
<br />
Further reading:<br />
<a href="http://nagalenoj.blogspot.com/2010/04/rfbproxy.html">RfbProxy</a> - How to use guidenagalenojhttp://www.blogger.com/profile/16258196284062926782noreply@blogger.comtag:blogger.com,1999:blog-1489046667475648244.post-26078335454917102902010-04-24T15:40:00.012+05:302010-07-30T14:50:03.500+05:30RfbProxy - How to useGlad to write about a tool which I've experimented to record the remote screen and playback.<br />
<br />
<i><b>RfbProxy</b></i><br />
It helps connecting to a VNC server and record the changing contents of its screen to a file, play the recorded file, convert it to MPEG and some other formats.<br />
Though it doesn't support <a href="http://en.wikipedia.org/wiki/TightVNC">tight encoding</a>, which is considered to be efficient and occupies low bandwidth when transferring the updates, it works well with the raw encoding.<br />
<a name='more'></a><br />
<br />
<i>To record:</i><br />
<i> </i>As said in the last articles, RfbProxy will act as a VNC client and captures the screen updates to a file<i>.</i><br />
<div style="color: #4c1130;">./rfbproxy --server=xxx.xxx.xxx.xxx:0 --shared --record ./sample.fbs<br />
<div style="color: black;"> xxx.xxx.xxx.xxx refers to the IP of the machine where the VNC server is running. To record the server, the connection need to be a shared session.</div></div><br />
<i>To Playback:</i><br />
<i>Way - I (Through VNC viewers):</i><br />
Here is the very simple way to view the recorded session. RfbProxy will be streaming the file contents to a port which we need and VNC viewer has to be connected to the port. So, It is more or less similar to simulating the VNC server. <br />
<br />
command:<br />
<div style="color: #4c1130;">rfbproxy -p sample.fbs</div> This command will stream the contents in localhost:10, connect a VNC viewer to it.<br />
<br />
<i>Way - II (FBS to MPEG2 conversion):</i><br />
By having the fbs file in hand, it isn't possible to play it with players which supports various movie formats like MPEG, AVI, etc., So, it is needed to convert the fbs file to a movie format and play it with any player which supports the format.<br />
It needs mjpegtools package to be installed in Ubuntu.<span style="font-size: small;"> mjpegtools debian package is available in sourceforge, but I've got error when installing it. Haven't tried much, give a try.</span><br />
<br />
Command:<br />
<div style="color: #4c1130;">rfbproxy -x sample.fbs | ppmtoy4m -S 420jpeg | mpeg2enc -b 10000 --no-constraints -f 3 -4 1 -2 1 -q 4 -P -N 1.0 -M 2 -E -10 -D 10 -a 2 -o video.mp2</div> 'rfbproxy -x' will export the fbs file content to PPM frames. Sorry, I have no idea about the options provided for the other commands. But, it worked for me.<br />
<br />
<div style="color: black;"> Based on size of the fbs file, it'll consume more time to convert from fbs to mp2. May be you wanted to have a coffee break in between! </div><br />
<i>References:</i><br />
<a href="http://rfbproxy.sourceforge.net/">http://rfbproxy.sourceforge.net/</a><br />
<a href="http://mjpeg.sourceforge.net/">http://mjpeg.sourceforge.net</a>/<br />
<br />
<i>Further reading:</i><br />
<a href="http://nagalenoj.blogspot.com/2010/04/rfbproxy-how-to-install.html">RfbProxy - How to install</a> - Installation guidenagalenojhttp://www.blogger.com/profile/16258196284062926782noreply@blogger.comtag:blogger.com,1999:blog-1489046667475648244.post-10351594661874095872010-04-21T11:11:00.021+05:302010-07-30T14:42:51.503+05:30FBS filesFBS stands for Frame Buffer Stream.<br />
<br />
When you access the remote desktop with the help of VNC viewers, you might be in need of record the screen updates for future references. Most of the VNC viewers have the feature to record the screen updates into a file. These files can be <br />
<a name='more'></a>played back whenever you need.<br />
<br />
The file which has the Frame buffer updates stored is FBS file. Some people may call it as VNC file.<br />
<br />
There are very few(countable) programs which works as VNC recorder which only records the remote desktop. vastly available as a part of VNC viewer.<br />
<br />
<span style="font-style: italic;">File content:<br />
<br />
</span>The fbs file will have FBS version and series of chunks of frame buffer data as the image represent below,<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2uWoQf9ZR7uPfkewkwp8_0wFI6cr7v5JkTWW6PTbMTaf1mXeXaz2LLKOBU7gbUb7ZYsamzaCyjgHazy_3Rrpv7TFeVp68y7Q_Oq97WPxewge7C40Rcdcj-Eng9MyCHtO_mCimI7SLT-I/s1600/Fbs-2.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5462462637153603410" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2uWoQf9ZR7uPfkewkwp8_0wFI6cr7v5JkTWW6PTbMTaf1mXeXaz2LLKOBU7gbUb7ZYsamzaCyjgHazy_3Rrpv7TFeVp68y7Q_Oq97WPxewge7C40Rcdcj-Eng9MyCHtO_mCimI7SLT-I/s400/Fbs-2.jpg" style="cursor: pointer; display: block; height: 237px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a><span style="font-size: 85%;"> </span><span style="font-size: 85%;"></span><span style="color: #330000; font-size: 85%;"> * [capture file] ::- [version][data]<br />
* [version] ::- 'FBS 001.000\n' | 'FBS 001.001\n'<br />
* [data] ::- [byte-count][raw-data][timestamp][data][data]<br />
* [byte-count] ::- 32-bit number of bytes, big-endian<br />
* [raw-data] ::- data received at timestamp [timestamp], which is [byte-count] bytes in length, padded to multiple of 32-bits<br />
* [timestamp] ::- 32-bit number of milliseconds since beginning of capture, big-endian<br />
</span><span style="color: #330000; font-size: 100%;"><span style="font-size: 85%;">(Extracted from RfbProxy source code.)</span></span><span style="font-size: 100%;"><br />
<br />
<span style="font-style: italic;">Key points about fbs file:</span></span><br />
<ul><li>The size of the file is based on the frequency of FramebufferUpdates received and the amount of changes in the desktop.</li>
</ul><ul><li>File extension can be given as 'fbs'.</li>
</ul><ul><li>Timestamp available in every chunk of data represents the relative time from beginning.</li>
</ul><ul><li>Byte count and Timestamp are in big-endian representation.</li>
</ul><ul><li>This file doesn't have any kind of indexing to ease positioning.</li>
</ul><ul><li>The first chunk of <data _moz-userdefined="">data doesn't only contain the frame buffer update, it also has the meta data(SecurityType and ServerInit) which includes the frame buffer width, frame buffer height, desktop name and pixel format.</data></li>
</ul><ul><li>FBS files are quiet similar to protocol dumps.</li>
</ul>Some questions could have raised in your mind on how to record the remote screen in fbs format, what tools to be used to record and what tools to be used to playback. The following articles will have the answers for your questions.<br />
<br />
<i>Further reading:</i><br />
<a href="http://nagalenoj.blogspot.com/2010/04/rfbproxy.html">RfbProxy</a> - Tool which helps to record, stream, convert FBS files.<br />
<a href="http://nagalenoj.blogspot.com/2010/04/rfb-protocol.html">Rfb protocol</a> - Know how Rfb protocol works.<br />
<ul></ul><span style="font-style: italic;"></span>nagalenojhttp://www.blogger.com/profile/16258196284062926782noreply@blogger.comtag:blogger.com,1999:blog-1489046667475648244.post-23281550924565218202010-04-19T12:56:00.012+05:302010-07-30T14:51:40.896+05:30Rfb protocol - IIThis article is about the different VNC protocol messages and the negotiations between the VNC server and client.<br />
<br />
The negotiations between the server and client will be similar to the diagram given below,<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvmOv6MS27InxgfvKfQYkmg-ziP7EfRI-4q9NqTD1Mdmnj4gzTGQ0x0lnlzYn35mvfWvo7yiTeSFTRQR_fpRUQqizFfojLQzyrQAuBBBIJaOUQ8HI6Oo2Z82pofV0U2NJA3PJlT_qycS8/s1600/Rfb.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5461747570199386562" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvmOv6MS27InxgfvKfQYkmg-ziP7EfRI-4q9NqTD1Mdmnj4gzTGQ0x0lnlzYn35mvfWvo7yiTeSFTRQR_fpRUQqizFfojLQzyrQAuBBBIJaOUQ8HI6Oo2Z82pofV0U2NJA3PJlT_qycS8/s400/Rfb.jpg" style="display: block; height: 400px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a><br />
<a name='more'></a><br />
<br />
<span style="font-style: italic;">ProtocolVersion:</span><br />
Server sends the first message when a client connects to it. It sends the highest protocol version which it supports. Client responds to server in a similar way with the protocol version which it could work with.<br />
<br />
<span style="font-style: italic;">Security:</span><br />
Security type for the conversation. Server lists the security types to client and the client responds to it.<br />
<br />
<span style="font-style: italic;">Security result:</span><br />
After the negotiations for security is done, server responds to the client with a single word ( OK / failed ) to let the client know whether the security handshaking is successful.<br />
<br />
<span style="font-style: italic;">ClientInit:</span><br />
Client sends a value either zero to ask for an exclusive connection to the server or non-zero to ask the server share the desktop other clients too.<br />
<br />
<span style="font-style: italic;">ServerInit:</span><br />
The server sends back various data like frame buffer's height, width, pixel format and desktop name.<br />
<br />
After all these negotiations, the client will start to send the <span style="font-style: italic;">FramebufferUpdateRequest</span> to the server and server responds with the <span style="font-style: italic;">FramebufferUpdate</span>. Client will also send other messages to server like <span style="font-style: italic;">KeyEvent</span>, <span style="font-style: italic;">PointerEvent</span>, and more.,<br />
<br />
You could find a more detailed explanations about the protocol messages in <a href="http://en.wikipedia.org/wiki/RFB_protocol">wiki</a>.<br />
<br />
<i>Further reading:</i><br />
<a href="http://nagalenoj.blogspot.com/2010/04/fbs-files.html">FBS files</a> - To know how RFB data is stored in FBS files and what does the FBS files contain.nagalenojhttp://www.blogger.com/profile/16258196284062926782noreply@blogger.comtag:blogger.com,1999:blog-1489046667475648244.post-90418711100143710912010-04-19T12:49:00.010+05:302010-07-30T14:45:53.264+05:30Rfb Protocol - IAs we know VNC is working with the server-client architecture, some protocol have to be used for communication. VNC uses RFB protocol to help server and clients communicate with each other.<br />
<br />
<span style="font-size: 100%; font-weight: bold;">RFB Protocol:</span><br />
<ul><li>RFB stands for Remote Frame Buffer.</li>
</ul><ul><li>It is a simple protocol for remote access to graphical user interfaces.</li>
</ul><ul><li>It works at the frame buffer level, so it can work with any windowing system.</li>
</ul><span style="font-weight: bold;"><a name='more'></a><br />
How it works:</span><br />
There are 2 types in protocol messages based on its purposes,<br />
<ul><li>Display</li>
<li>Input</li>
</ul><span style="font-style: italic;">Display:</span><br />
The server will be sending a rectangle of pixel data and a corresponding x,y position and the client will receive it and apply the pixel data in the x,y co-ordinates sent by the server.<br />
Series of rectangles makes a frame buffer update.<br />
These updates will be sent by the server only when the viewer requests for it. So, the quality is based on the number of requests sent by viewer and the responses received. This helps to get adapted to networks with different bandwidth. When, you are in slow networks, it is good to reduce the frequency of requests sent to server to avoid network traffic.<br />
So, the slower the client and the network are, the lower the rate of updates becomes.<br />
<br />
<span style="font-style: italic;">Input:</span><br />
Input events are sent to the server by the client whenever the user presses a key or the mouse is moved. It is also possible to simulate the input events when the user uses different IO devices.<br />
<br />
So, RFB as a protocol is very much adaptive in the way it works.<br />
<br />
continue reading about Rfb Protocol in <a href="http://nagalenoj.blogspot.com/2010/04/rfb-protocol-ii.html">Rfb Protocol - II</a>nagalenojhttp://www.blogger.com/profile/16258196284062926782noreply@blogger.comtag:blogger.com,1999:blog-1489046667475648244.post-5790391181924428132010-04-19T11:08:00.010+05:302010-07-30T14:46:50.390+05:30VNC - BasicsVNC(Virtual Network Computing) helps you to access the remote desktop. It makes the remote access simpler and easier by way of transferring the frame buffer updates across the network. So, It gives the feel like sitting in front of a remote machine and accessing it.<br />
<br />
It is a proven model of accessing the remote desktops. The great thing about VNC is, it's platform independent. So, it is possible to take control of a windows machine from Linux/Mac/Cent or any., <br />
<a name='more'></a><br />
So, you doesn't need to bother the remote machine's platform or flavour, all you need to do is launch the VNC viewer and connect to the remote host(which should run the VNC server). In short, it allows you to access your desktop from any part of the world.<br />
<br />
VNC works with the simple server-client architecture. VNC server has to run in the remote machine( Desktop which you need access ), VNC viewer has to be launched from where you're going to access it.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQqyes1j7juoJ3JHA1tCiPtOsRH05JJRYuWjbTp_qwbTtOblj0DFb_VUMYwxnsm6M7Wtklc2bnwgEbJEBS_FlH9plp6XC1Td80EzergBQvurz5yPVbEEGE9iuMBFx8ldIHuoW85r6vGjY/s1600/VNC.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5461719912256419858" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQqyes1j7juoJ3JHA1tCiPtOsRH05JJRYuWjbTp_qwbTtOblj0DFb_VUMYwxnsm6M7Wtklc2bnwgEbJEBS_FlH9plp6XC1Td80EzergBQvurz5yPVbEEGE9iuMBFx8ldIHuoW85r6vGjY/s400/VNC.jpg" style="cursor: pointer; display: block; height: 124px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a><br />
VNC server captures the screen updates from video frame buffer and sends to the VNC viewer. In order of responding to the server, the viewer transmits the mouse and keyboard events and gets back the screen updates for the events sent.<br />
<br />
<i>VNC server</i>:<br />
VNC server is a program which waits for the clients to connect and when some clients are connected, authenticate them, do the protocol negotiations and send the frame buffer updates to the clients.<br />
<br />
<br />
<i>VNC client:</i><br />
<i> </i>VNC client is the program which connects to the VNC server, send password for authentication, do protocol negotiations with server, receive the frame buffer updates from server and display it to the user(in case of VNC viewer).<br />
<br />
It doesn't only helps to access the remote desktop, but it has a bunch of features like,<br />
<ul><li>File transfer between the remote machine and you machine.</li>
</ul><ul><li>Secure access by way of authentication. The server will ask for a password, when some clients try to connect.</li>
</ul><ul><li>It also allows the transactions to be encrypted.</li>
</ul><i>Further reading:</i><br />
<a href="http://nagalenoj.blogspot.com/2010/04/rfb-protocol.html">Rfb protocol</a> - To know about the protocol used by VNC.<br />
<a href="http://nagalenoj.blogspot.com/2010/04/rfbproxy.html">RfbProxy</a> - To know about the tool to record, stream & convert FBS files<br />
<ul></ul>nagalenojhttp://www.blogger.com/profile/16258196284062926782noreply@blogger.com