I noticed that a new feature had been added to qemu-img which allowed for copying a snapshot out of a qcow2 image to become it’s own qcow2 image.  This would allow me to make live snapshots of my running KVM instances and archive them off to another machine.  I got around to testing it this morning and it appears to work fine, streaming back “Big Buck Bunny” whilst archiving off my test machine resulted in only a couple of slight (0.5 sec maybe) pauses.

I’ve produced a small script which allows me to make a backup of the current image, it’s available here, note since I’ve had to compile head of qemu-img I’ve chosen not to overwrite my Lucid version, and have instead called it qemu-img2.

OpenSG Browser Plugin

June 29, 2009

Well the summer has finally arrived, and I’ve finally got around to publishing this on the research groups website.  It is a small application making use of the Qt4 browser-plugin API to provide an OpenSG canvas within a web browser.  It wouldn’t take much effort to make it easily installable for users.  (Just statically link the whole thing into a single binary I’m guessing)

The advantage of using OpenSG rather than OpenGL as a canvas for web3d graphics is that you can build upon the scenegraph, take all of it’s functioanltiy, rather than you worrying about creating file loaders etc.  The URL for the plugin is http://novellab.brighton.ac.uk/?q=projects/opensgplugin

P.S. If anyone is able to help me solve https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/389441 it’ll be great.

Converting Access to mySQL

November 11, 2008

One of those joys within computing which we come across is the need to convert legacy data to a new shiny format.  My current task is to convet a legacy Access database to mySQL so it can be accessed via the web.  It contains data on various scupltures around sussex and will be available at http://www.publicsculpturesofsussex.co.uk

To convert the database I found a GPL’ed application (http://www.bullzip.com/products/a2m/info.php) which is able to produce a mySQL database dump file or connect to the database and create a replica.  Through a simple Windows installer and GUI wizard the task was made suprisingly trival, with the whole process taking less than 5 minutes.

gsoap and fedora

August 6, 2008

Here is a quick tutorial on how to access the SOAP interface for a fedora repositary.  (For more info about fedora see here.)

We need the gsoap package for Ubuntu 8.04 Hardy. So:

  sudo apt-get install gsoap

Once installed we use some tools called wsdl2h and soapcpp2 to create stubs for us.  So:

 wsdl2h -c -o fedora-a.h http://www.fedora.info/definitions/1/0/api/Fedora-API-A.wsdl

 (You can use -r <proxy> in the wsdl2h command if your behind a web proxy)

 soapcpp2 fedora-a.h

Then open soapClient.c in your favorite editor and replace all occurrences of localhost with the hostname/ip address of your server.

We need a simple application which allows us to make use of these stubs.  This can be found here.  You’ll need to change the username and password to match what you have configured on the server.

The application then needs compiling which is easily done with the following command.

 g++ simple-client.cpp soapC.c soapClient.c /usr/include/gsoap/stdsoap2.c \
 -o simple-soap-client

This applications should then be able to connect to your fedora server and print out the information describing your repository.

I’ve mentioned OpenSG on this blog.  It is a scene-graph based API I use at work for rendering of 3D scenes.  As part of these scenes you can create textures on these objects, which are basically pictures.  Well my co-worker, Karina, has produced some code for displaying video on these textures, which is really cool.

We’ve been playing around with video playing over our tiled wall cluster both playing just a video, or wrapping the video around an object such as a sphere.  We’ll be releasing the source code for it soon on our website along with some other cool things we’ve been producing.  But before hand I’d just like to show you a picture of it running the Big Buck Bunny video (which is cool project as well).

The OpenSG packages within Ubuntu Hardy don’t contain any of the contrib directory functionality been built.  These aren’t prebuilt due to them been work in progress or licensing issues.  The ply contribution is restricted due to it’s license to non commercial work only, so it needs to be built outside of the packages distributed.

Normally this would be built and stored within the libOSGSystem.so library, requiring the the library to be built again, which takes a while 🙂  So instead I’ll show you how to build it as a separate library for you to link against in your applications.

Within the directory containing the source code, the following command will build it as a shared library called libOSGPly.so.

g++ OSGply.cpp  OSGPLYSceneFileType.cpp -I/usr/include/OpenSG/ `pkg-config OSGSystem
 --libs --cflags` -shared -fPIC -o libOSGPly.so

This then needs to be copied to your system path so the linker can find it, so:

sudo cp libOSGPly.so /usr/lib/.

The header files then require installation, so:

sudo cp *.h /usr/include/OpenSG/.

Now all you need to do is add -lOSGPly to your linker options to use the library.

I’m sure the same trick can be used with the other contrib features if you wish to enable them easily.

Just a quick post to let you know that the novellab at the University of Brighton has launched it’s website which can be found at http://novellab.brighton.ac.uk/

Within the site you can find more information about the novellab, people working there, list of publications and links to our current projects:

Point of Regard (PoR) : An open source (GPL2) head and eye tracking software making use of the Polhemus FASTRAK and ISCAN eyetracker hardware

OpenSG Related : Work we have done with OpenSG towards level-of-detail nodes, video as textures (note these are coming very soon)

The way which I was originally shown to build new nodes for OpenSG involved using the existing OpenSG build system. It usually existed of these steps

  • Putting your node code into the source dir (I can’t remember which one)
  • Re-running configure for it to be copyied to the build dir
  • Use make and sudo make install to rebuild OpenSG and re install it all

Of course if your installing binaries from the repo’s you don’t want to be doing this. Instead you’ll need something like the following to build and link against the binaries. (with the -dev packages installed)

g++ -I`pwd` -I/usr/include/OpenSG `pkg-config OSGBase --cflags --libs` `pkg-config OSGSystem --cflags --libs` -shared -fPIC *.cpp -o libOSG<nodename>

Of course you’ll need to link against other libraries if you need them.

The compiled library can then just be copied into /usr/lib and you can start using it. The above build command can easily be broken down to work with autotools as well, allowing your new node to built on other distros which make use of pkg-config and have installed to different paths.

OpenSG Packages for Ubuntu

October 19, 2007

UPDATE: Opensg has been accepted for the hardy release cycle and backports will be forthcoming hopefully.

Using the personal package archives over on launchpad I’ve created feisty and gutsy packages for OpenSG. The packages which are built are:

  • libopensg-core1 – Base and System libraries for users
  • libopensg-core-dev – Base and System libraries for developers
  • libopensg-qt1 – WindowQT libraries for users
  • libopensg-qt-dev – WindowQT libraries for developers
  • libopensg-windowx1 – WindowX libraries for users
  • libopensg-windowx-dev – WindowX libraries for developers
  • libopensg-glut1 – WindowGLUT libraries for users
  • libopensg-glut-dev – WindowGLUT libraries for developers
  • opensg-tools – fcdEdit and actorEdit
  • libopensg-doc – User and developer docs

The scripts used to build it are in the source package so if you apt get them. A launchpad team has also been created to help manage the packages along with providing a team to assign bugs with the packages to when reporting them.

To install OpenSG you’ll first need to add the ppa your /etc/apt/sources.list file.

For Feisty Fawn :

deb http://ppa.launchpad.net/opensg/ubuntu feisty main restricted universe multiverse
deb-src http://ppa.launchpad.net/opensg/ubuntu feisty main restricted universe multiverse

For Gutsy Gibbon :

deb http://ppa.launchpad.net/opensg/ubuntu gutsy main restricted universe multiverse
deb-src http://ppa.launchpad.net/opensg/ubuntu gutsy main restricted universe multiverse