.comment-link {margin-left:.6em;}

I Hate Linux

Saturday, May 16, 2009

Proof of Concept: Silverlight based VNC client

Forward: I would advise not looking for potential meanings of the below post or infer potential new features of Windows Home Server as it all involves things I was doing on my own time and for my own nefarious purposes.

The other weekend I had a little free time on my hands and thought: “Wouldn't it be cool (and useful) if there was a Remote Desktop client that ran completely within the context of Silverlight?”

After a quick read of the core spec behind RDP... I decided that a simpler protocol would probably be good to do as a proof of concept first of the general idea.

Which protocol did I pick? RFB (PDF warning), the basis for VNC.

So last weekend I sat down and began writing a proof of concept VNC client, first as a WinForms app but with frequent compilations for Silverlight (to ensure that I only used classes/methods that exist under both), and late Thursday night after writing a quick and dirty 125 line long proxy server (to work around the built in port and host address limitations), it all just worked at last.

Behold, a ugly shot of it in action:

VNC via Silverlight

(Click for larger version)

Why so ugly? To save time I only implemented a couple of the most simple video encoding methods that VNC supports which cuts me off from some of the more pretty color possibilities. Adding others won’t be very difficult, however improving some of the core services I wrote would be a better use of my time.

Why XP? When I quit using VNC back in about 2005 it was due to my upgrading to Vista and the two of them not getting along well (due to the Vista security feature known as session 0 isolation)... and I had it handy in a VM.

When will it be released? Certainly not in it’s present form as it is rather insecure at present as it doesn’t support any authentication (mostly because I opted not to write a DES encryption provider which Silverlight lacks). Also likely not in future because of the prototype nature of this code and my almost certainly not having enough time to take on and manage another side project (my day job keeps me plenty busy).

I also need to say that the new improvements to the MediaStreamSource class in Silverlight 3 are pretty cool as they enable you to manually generate a video and specify the raw RGB bits of each frame.

This while does kind of serve as a reminder to me… rather than spend time implementing things that already exist (this, DHCP4WHS, a C# based DNS server I wrote a few years back, plenty of other half completed network clients or file format parsers)... I should focus (when writing code on my own time) on building new things that do not yet exist... shame I’m not the most creative in that way.

Labels:

8 Comments:

  • I just think it's cool you use the WinXP pink flower as your sign-on avatar. :-)

    By Blogger deichmans, at 8:36 PM  

  • Na, that's just the default it gave me :p

    By Blogger Brendan, at 9:29 PM  

  • You should try to sell this to VMWare. They provide an ActiveX plug-in for their esx server, but a Silverlight version doesn't require installing a separate plug-in.

    By Blogger Edgar Harris, at 7:29 AM  

  • Given that I work for their biggest competitor (granted the product I build does not compete with any VMWare offerings), it'd be quite wrong for me to be moonlighting to help the competition... more so when I think that most of the offerings from my company are superior to theirs.

    By Blogger Brendan, at 8:49 AM  

  • Even though this is a proof of concept. Would you mind sharing the code, to show how such a feat can be achieved?

    By Anonymous Beats, at 2:26 AM  

  • Marvellous!
    Hi , I am a fresh silverlight enthusiast. Would u please share the code. Purely for recreational purposes. I would be really thankful to u.

    By Blogger Sumit, at 1:51 AM  

  • great job, i agree. i would love to a look at your code.

    By Blogger arnoud, at 11:48 AM  

  • Nice post here -- this is a very nice entry point. I'm beginning Silverlight development on an internal helpdesk front-end. The ability to VNC from within Silverlight would be amazing.

    Is there any chance of getting a copy of the source code that I can study or some pointers? Thanks so much!

    By Blogger Celani, at 7:34 PM  

Post a Comment

<< Home