Wednesday, May 21, 2008

VirtualBox 1.6 is out

The most usable (for me anyway) VirtualBox release for mac is out. I just downloaded 1.6.0 from VirtualBox.org. I was finally able to load the virtualbox additions. Check out my previous blog to read about the issues I faced. Here is a quick recap of the issues:
  1. I could not use my full screen real estate which was 1440x900. The max resolution I could get was 1152x864.
  2. Unable to mount my shared folder.
  3. Cannot ssh from master OS (mac OS).
First I am glad that VBox for mac has finally come out of beta. Just the fact that there is a release lifts the spirits a bit.

Coming to my first issue, I am now able to make full use of my screen. It did not work out of the box, but the tweaks I had to do were small enough to not make me grumpy.
  1. I installed 1.6.0 on my macbook pro.
  2. Started my Gentoo guest OS.
  3. Loaded the virtualbox additions iso to the virtual cdrom by doing Devices > Install Guest Additions...
  4. Mounted the cdrom from Gentoo by doing mount /mnt/cdrom as root.
  5. Executed /mnt/cdrom/VBoxLinuxAdditions.run. At this point all the modules are compiled and installed. My old /etc/X11/xorg.conf was saved as /etc/X11/xorg.conf.bak and the /etc/X11/xorg.conf was modified to add a new monitor and the video driver was changed from vesa to vboxvideo.
  6. Restarted my guest OS and all the modules loaded properly (no issues like with the beta release). But my kdm did not start. What gives? So I logged in as root and restarted xdm with /etc/init.d/xdm restart and I got kdm running. It was bizzare that for some reason X failed during boot up. And I know that the only changes were the new video driver and the vbox modules. Since X started normally when I restarted xdm, I knew the the vbox modules did not load before the video driver. What did I do? Just moved the vbox init scipts from default to boot like so
    rc-update add vboxadd boot
    rc-update del vboxbox default
    rc-update add vboxadd-timesync boot
    rc-update del vboxadd-timesync default
    rc-update add vboxvfs boot
    rc-update del vboxvfs default
    Thats it. Now all the modules get loaded before xdm starts.
  7. I restarted the guest OS and found out that it did not make full use of screen, but the size is something odd. It just filled the size of the VirtualBox window. So I maximized the virtual box window and restarted, lo and behold my guest OS fills the whole screen. Here is the screen size from xdpyinfo
    xdpyinfo | grep dimensions
    dimensions: 1432x830 pixels (378x219 millimeters)
  8. Sometimes the virtual box does not detect the full screen properly. In such a case just restart the guest OS again in maximized window and it will work.
The next issue is mounting the shared folder. With the previous beta release of virtual box the filesystem driver that talks to the shared folder could not be loaded using modprobe. But with 1.6 it has all changed. The vboxsf works! Just do
mount -t vboxsf < shared folder name > < mount point >
and it just works.

The final issue where I cannot connect to the guest OS from master OS still exists and I don't have a solution for that yet. But hey I don't need it now that I have the shared folder working! I can transfer files back and forth between them.

Tuesday, May 13, 2008

Yet Another GTD now open sourced

I was finally able to clean up the code and add some comments to my pet project YAGTD which stands for Yet another getting things done. See my previous blog for more details. The code is available here if anyone is interested to modify for their specific needs. To try out the application go to http://yagtd.appspot.com/

Tuesday, May 06, 2008

Elisa problems marshalling MediaUri

The short version
If you are having problems with elisa not playing your local media files (see https://code.fluendo.com/elisa/trac/ticket/957 and https://code.fluendo.com/elisa/trac/ticket/961) then you can fix it by editing ~/.elisa/elisa.conf and changing gstreamer:gst_metadata_client to gstreamer:gst_metadata. That is all and it works!

The long version
Ever since I heard about elisa, I have been trying to get it to work as my media center. It was well designed and the vector graphics are awesome. It plays music, videos and displays pictures, and has several plug-ins to play online music and youtube videos etc. You can even get cover arts from amazon from with in the software. But there is just one problem. It could never play my local media. Neither movies, nor music and not even photos. I gave v0.3.3 of elisa a try. It did not play my personal media. I thought, well it is still in development, so why not wait for the next release. I did not even take a look at the logs.

Then came v0.3.4 and that again did not work. So I synced up to the latest code in svn and tried that. No luck. At this point I was starting to think something must be wrong with my configuration or the versions of dependencies that I have installed. This time I looked at the logs and a warning pointed me to a log file in /tmp. A quick look and I could not understand why jelly.py (from twisted) seems to think MediaUri is not a known type. I didn't know much about twisted framework (and I still don't), so I emailed the elisa mailing list. And in response a developer kindly opened a ticket for me. You can view it here https://code.fluendo.com/elisa/trac/ticket/961.

I was waiting for it to get fixed. And then along came the announcement for v0.3.5. I decided to try the latest from source control and it failed to play my media again. This time I was adamant on learning twisted at least up to the point of understanding what jelly.py is and why it is does not know the type of MediaUri. I found out that jelly is used to serialize data to send it over the wire to the server to unmarshall and act on it. That is good enough. Now back to the exception
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line 182, in addCallbacks
self._runCallbacks()
File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line 307, in _runCallbacks
self.result = callback(self.result, *args, **kw)
File "/home/chandanp/workspace/python/fluendo/elisa/elisa-plugins/elisa/plugins/gstreamer_plugin/gst_metadata.py", line 1429, in got_root
dfr = root.callRemote('get_metadata', dic, low_priority)
File "/usr/lib/python2.5/site-packages/twisted/spread/pb.py", line 380, in callRemote
_name, args, kw)
--- <exception caught here> ---
File "/usr/lib/python2.5/site-packages/twisted/spread/pb.py", line 853, in _sendMessage
netArgs = self.serialize(args, perspective=perspective, method=message)
File "/usr/lib/python2.5/site-packages/twisted/spread/pb.py", line 807, in serialize
return jelly(object, self.security, None, self)
File "/usr/lib/python2.5/site-packages/twisted/spread/jelly.py", line 879, in jelly
return _Jellier(taster, persistentStore, invoker).jelly(object)
File "/usr/lib/python2.5/site-packages/twisted/spread/jelly.py", line 464, in jelly
sxp.append(self.jelly(item))
File "/usr/lib/python2.5/site-packages/twisted/spread/jelly.py", line 468, in jelly
sxp.append([self.jelly(key), self.jelly(val)])
File "/usr/lib/python2.5/site-packages/twisted/spread/jelly.py", line 489, in jelly
raise NotImplementedError("Don't know the type: %s" % objType)
<type 'exceptions.NotImplementedError'>: Don't know the type: <class 'elisa.core.media_uri.MediaUri'>

This simply means that there is a problem serializing MediaUri. I greped around and found that MediaUri is not extending one of the serializable classes. So that could be the problem. I looked at the gst_metadata.py which is where the RPC is being made. I noticed that there is another way to get metadata, but it is not an asynchronous call. But hey what the heck, I don't care if the UI locks up for a while when it is scanning my media as long as I can get it to work. So if I used gst_metadata instead of gst_metadata_client I can get away from the whole async RPC calls. I edited ~/.elisa/elisa.conf and changed gstreamer:gst_metadata_client to gstreamer:gst_metadata and guess what, it works!

I updated a ticket with the same problem I was having and at least some one is happy being able to play their local media. The link to the ticket is https://code.fluendo.com/elisa/trac/ticket/957. I got so excited that I wrote this blog immediately. Now I will take elisa for a ride.

Sunday, May 04, 2008

Mac vs PC (Vista)

Why is it so funny. Let's go over it one more time. Who do you think is better, the mac or PC (with windows vista)? Let the games begin, but before we start I am neither a mac fan nor a windows fan, I am all for linux ;)


Mac: 1 PC: 0

Well mac does not need to get all excited. Seems like mac was having problems showing the above video on a mac. You might want to stop the video after a while, otherwise you might want to kill someone


Mac:1 PC:1

Moving along, we have a series of pro-mac videos


Mac: 2 PC:1


Mac:3 PC:1


Mac:4 PC:1


Mac:5 PC:1


Mac:6 PC:1

Let's even out the odds a little bit. This is hilarious and I have to minus 5 for mac for the following video and cannot raise anything for PC since nothing good has been said about it.


Mac:1 PC:1

Finally the winner is

Mac:0 PC:0

Neither...