SDL VNC Server module
I keep writing things related to VNC, and coding in C. It’s seriously starting to worry me.
I’ve spent the last couple of days writing a new SDL video output module, which acts as a VNC server using libvncserver. Here are the patches against SDL 1.2.14. To use VNC support, you need to run ./configure with --enable-video-vnc, and once built and installed, run the SDL application with the environment variable SDL_VIDEODRIVER="vnc".
What works:
- 16, 24 and 32-bit true-colour displays.
- Mouse events.
- Keyboard events.
What’s left to do:
- Fix mouse cursors so they display correctly.
- 8-bit (paletted) displays.
- Handle surface locking properly.
- Reduce/eliminate tearing on frequent screen updates.
- Run the libvncserver event loop inside SDL’s event loop system.
- Implement a password on the VNC server and some sort of simple access control.
- Implement a view-only mode.
- Allow setting the display number manually.
- pygame applications.
- Fix screen resolution change colour issues.
What will never work:
- OpenGL surfaces.
- CDROMs, Joysticks and Sound over VNC.
- YUV video output.
I’ve had a lot of success with using the Origyn web browser (a WebKit/SDL-based web browser) and cgterm (a SDL C64/C128 telnet client) with this output method. Any SDL application that doesn’t use OpenGL surfaces should be able to run with this output module.
Some pictures:
|[origyn web browser in tightvnc]| |[cgterm in tightvnc]|
tightvnc]| image:: /static/projects/sdlvnc/sdl-video-vnc-v1-owb_small.png .. |[cgterm in tightvnc]| image:: /static/projects/sdlvnc/sdl-video-vnc-v1-cgterm_small.png