Click to See Complete Forum and Search --> : remote desktop


Craigjw
December 18th, 2004, 11:09 AM
I'm writting some remote admin software in C#, I would like to be able to implement a remote desktop, much like what MS does with the windows terminal services, however, i'm too poor to pay for this, and hence want to write my own. Unfortunately, I'm not too sure where to start.

I'm intend implementing the solution on Win2k/WinXp. I have VNC connections to the destination networks, however, an HTTP connection solution would be optimally desired.

I currently can see one option available to me and it's not the optimum way. To use a screen grabbing process and download compressed images and mouse coords of the remote machines desktop to the server software, while coordinating keyboard/mouse input between the server & client software.

Using this method, a screen grab of 256 colours, 1024x768 resolution, zip compressed, the file size of the image is about 40-90 KB. With the bandwidth available to me, which is about a 500 Kb/s (62 KB/s) cable connection, the results are going to be slow frame rate of about 1-2 frame/s, which is not really acceptable.

If anyone can give me any pointers to source code or methods to implement a better way, it would be most helpful.

Mathew Joy
December 19th, 2004, 11:19 AM
Using this method, a screen grab of 256 colours, 1024x768 resolution, zip compressed, the file size of the image is about 40-90 KB. With the bandwidth available to me, which is about a 500 Kb/s (62 KB/s) cable connection, the results are going to be slow frame rate of about 1-2 frame/s, which is not really acceptable.I don't know the best method. But you can greatly improve this method. One is use your own on alg for storing color. You can use to store relative position of the previosly stored one, with repetition stored in numbers. With this alg, the file size will depend on the complexity of the picture. Since the destop have lot number of similar color, the file size will be much small(than 40k). Second is send the relative position, rather than the entire file. For instance if there is no difference in the destop in an interval of say 3 secs, you are not sending any files. Thirdly, I suggest to build your own protocol over an existing one (UDP might be sufficient, because losing one file in a while don't cause any trouble). The above mentioned suggestions have to be worked out to get the best working model that suits your need.

Ejaz
December 19th, 2004, 11:14 PM
Well, there are few points that I would like to mention.

As already suggested that you can design a high level protocol based on UDP. Next to it, for desktop capturing, have a look at Various methods for capturing the screen (http://www.codeproject.com/dialog/screencap.asp), also Barry's Screen Capture (http://www.codeproject.com/gdi/barry_s_screen_capture.asp) is easy to implement.

After that, you'll have to trade off at bandwidth over processing. If you go for doing some image processing, so that you can survive with low bandwidth, then it may effect the target system performance and surly, you wont like to stop the heart beat of it.

Studying VNC can give you alot of ideas, how to implement it in a better way.