Saturday, January 25, 2014

SDLvnc

It's been a long, long stretch with not much happening here.  What can I say?  I've been busy.  Yeah, yeah, I know...enough already with the excuses.  Onto the new stuff.

A few years ago (years?!) I mentioned sdlvnc as something to investigate "someday", and apparently never, ever got back to it.  Until now, that is.  There was a sudden flurry of activity on the zipit IRC leading into this weekend, and someone brought up vnc again.  Got me thinking...

So I tracked down the sdlvnc source code, and a slightly updated version of the sdlvnc sample client from WebOS with some screen panning code included.   I also discovered some libsdl_vnc fixes in the SVN repository that apparently have never been released.  In my opinion, either panning or scaling (or both) is absolutely required for vnc to be the least bit useful on the tiny 320x240 zipit screen.  Here's a picture so you can see what I mean.
I'm running a rather small 640x480 tightvnc session on my Debian Mint laptop.  With no panning, even this would be useless, but at least now I finally have a vnc client that's rotated properly for the zipit, thanks to the SDL backend.  However, the vnc mouse is jumpy and sluggish, ctrl-esc may not be the best key combo for quitting vnc, and my current choice of panning keys (ctrl-shift) is cumbersome on the zipit, but I can finally imagine someone actually, maybe attempting to use this in some sort of dire emergency situation.  So I'm gonna release the zipitized sources and an IZ2S executable, as soon as I clean up the code and test it just a wee bit more - especially the keyboard support for the unusual zipit keys. 

Really.  I mean it this time.  Well... except maybe first I want to check out the code for the WebOS junkvnc client, which claims to have taken sdlvnc even further and added a zoom function!

I wonder what else we can borrow from WebOS?

Update:

Ok, I fixed up the keys for the zipit.  Sorta.  It's been so long that I need to review how to do it for the Latin keys.  And I decided to go with ctrl-mousemotion for panning the vnc screen around.  For now.  I'm not sure how that fits in with slug's mouse setup on openwrt.

Here's the modified sources and an IZ2S executable of sdlvnc. 

sdlvnc105-iz2s.zip

I should probably repack it with a vnc wrapper script that sets the SDL environment vars first, but you can steal that from the rockbox, gmu, or glinks wrappers.  That'll have to wait for Rev 2 when I figure out how to fix all the other issues, and maybe add some zoom.

Here's an openwrt executable of sdlvnc.

sdlvnc-wrt.tgz

I'll have to add an option to swap left and center mouse buttons so the openwrt build is less awkward in the current gmenu2x userlands.

Update2:

I managed to get zoom working in 0.05% increments.  It's painfully slow, but it seems to work.  Good luck if you try it on a large framebuffer.  Here's an fbgrab screenshot of 65% zoom on an openwrt zipit.

The vnc zoom is on the ctrl-comma and ctrl-period keys.  I also added a -mb command line option to swap the mouse buttons, making drag-n-drop a bit less painful on openwrt.  I'll try to package it up in both iz2s and openwrt flavors tomorrow during the superbowl.

sdlvnc106-wrt.tgz

sdlvnc106-iz2s.zip

sdlvnc client code on github



1 comment: