March 04, 2010

LinuxMint 8 running in Virtualbox

At work I have a WineDoh$ machine :( So not to miss my trusty Mint machine during the day I decided to install it in virtualBox.

The tricky part is to get the network running for the guest machine (the LinuxMint), as you need to create a bridge between the host and the guest. Then you need to set the proxy on your LinuxMint guest machine.


Now you should be able to run: 

sudo apt-get update
sudo apt-get upgrade

And get the latest package updates, as well as intall your favorite applications. To share data between the two machines, open the host machines shared folder menu:


Create a shared drive
Then on the guest you need to mount this drive:

sudo mkdir /mnt/windows_drive
sudo mount.vboxfs D_DRIVE /mnt/windows_drive
ls /mnt/windows_drive

and you should be able to see your files.

 [Edit 1] Update on the proxy configuration

March 01, 2010

PS3 media server on LinuxMint

Setting up a ps3 media server was extremely easy! just follow the guide at: http://ps3mediaserver.org/forum/viewtopic.php?f=3&t=5589Tests

I previously attempted streaming to my ps3 using vlc but the result was not good. The video was stopping. It seemed like a transcoding problem.

However, installing vlc and using this through the ps3media server has an exellent result.

C++ enum inheritance

Today I needed to have enums with an inheritance ability. I have some HMI panels in an application where each panel button has a handler function, which is placed incide a stl vector. Each of these buttons can be enabled and disabled using a unique ID, it's number in the vector.

The problem I fased was that the base class implementing the basic functionality of the panels (done and cancel) also implemented the indecies for these functions. Now in a derived class i wanted to extend the enum with button indecies for the buttons added by the new class, but enums and C++ does not support this directly.

To overcome the problem a template can be used. here is a similar approach using atemplate to extend enum definitions. This solved my problems and I can get the panels back in action.