Site Network: freakymousemats | portal | smashingbloke | regenology

the weblog

Occasional musings that fall out of my brain and on to the site. Occasionally more occasional than I'd like. But will try to fix that.

VNC Geekery

Posted by stephen on Sunday, 15th January, 2006 @ 21:35

Soon I'll be off up to Scotland to plumb RegenTV in to a hotel. The intention is to deploy it wirelessly with 802.11a (in case you've not seen, the Intel Macs support 802.11a too now) to the hotel rooms, eventually with the idea that people other than ourselves will come along later and deploy the service across the local town. An interesting idea indeed!

We're a little sceptical at the moment as to whether or not there's going to be enough bandwidth and QoS to support video. So we're going to do a little scientific experiment to find out if it's possible. I've been charged with writing up the report, as of the three of us involved I'm the one who most recently went to school and therefore apparently have the best chance of remembering the write ups from A-Level Physics (pity I didn't actually finish that).

I'm kinda hoping it doesn't work at the moment. If it does, we've got a lot of development to do and a lot of kit to buy on a project with a modest budget and timescale. Transcoding MPEG2 to MPEG4 isn't going to be too easy and limits the number of channels we can offer. It'd be fun to develop really, but need more time!

I've spent this weekend working here and there, which I don't mind as I'm kind of enjoying it and I did nothing for about three weeks around Christmas. I'm flipping between writing documentation for RegenTV and creating a new service.

The documentation is slow going, but looking pretty good so far, and will be available on the RegenTV site at some point I guess. Hoorah for Open Sourciness!

The new service aims at improving the web browsing experience we provide. The set top boxes we use offer an incredibly basic and slow browser with no Flash, etc. In Stratford, we offer PC-on-TV with Citrix to Windows and with VNC to Linux/KDE. Once logged in our peeps can access IE, Firefox or Konqueror and have a more fulfilling browsing experience.

Now, our hotel isn't going to have a PC-on-TV service. It's not exactly vital that guests can make spreadsheets on their hotel TV. But browsing the web would be good. And issuing usernames and passwords for visitors to login would be rather rubbish. Doing it with Citrix on Windows is pretty easy, publish IE as an application and tick a box to allow anonymous access to it. But that's expensive, closed source and just a bit ick.

Linux isn't quite so easy. I've not found a way of publishing an application with VNC, just a whole desktop session. NX seems like something that could do it, but we don't have an NX client on our STBs unfortunately.

So I've decided to write a little daemon in Python that acts as a web server, handing out HTML pages to set top boxes that include some Javascript to kick off the VNC client connecting to an incrementing VNC port. Currently it starts a vncserver session on demand that itself starts Metacity and Firefox with a brand new profile for each session.

I want to make sure I customise Firefox enough to ensure that our users can't access any parts of the system they shouldn't be able to get to. I also want to write in a prefork model, ala Apache, that'll keep some web browser sessions in reserve, so that the STB gets an immediate browser ready to use and doesn't have to wait for it all to start. Has been pretty straightforward so far.

I've got 44 days of work to do in the next 6 weeks, which equates to 50 days of work time apparently, so it's cutting it a little close. Fortunately, we budgeted 5 days for this VNC Web Browser service, I thought I was being conservative with that, but others thought it'd be a lot longer. And so far I reckon it's probably going to be another day's work beyond what I've got done this weekend. Woohoo!

Made with Django.