Wednesday, December 19, 2007

Sharing media with Xbox 360

My flatmate has an Xbox 360 so I thought I should I should work out how to share my media from my Ubuntu laptop...

Turns out to be pretty simple.

  1. Install ushare. There is a ushare and libdlna package to install

  2. Edit the config file in /etc/ushare.conf. Set USHARE_ENABLE_XBOX, USHARE_DIR and USHARE_IFACE

  3. Restart with /etc/init.d/ushare restart



Notes:

You don't need to add any routes that they recommend (as long as your default route is OK and you're only using one network interface). Remember to set the appropriate interface (in my case my wireless is eth1) as the USHARE_IFACE option.

The default config file in 1.1a had invalid config item names. All config items should start with USHARE_. The Xbox one did not in my default config file.

Sunday, December 09, 2007

Ubuntu Python Upgrading

The other day I went to a SyPy. One interesting thing I learnt from a Canonical employee I was talking to there is what caused a much duplicated glChess bug. The symptoms of the bug are basically glChess crashes on startup while upgrading due to not being able to import the glchess module. Unfortunately as an Ubuntu upgrade can take some time users tend to be looking for some small task to amuse themselves; say, playing a game :)

I'm not 100% sure of all the details but essential the following occurs when python files are upgraded in Ubuntu:
At some point in the upgrade the site-packages Python directory (which contains all the python modules to import) is moved/symlinked out of the way. This is done to avoid binary incompatibilities between .pyc files between Python versions. The .pycs are rebuilt and then the directory returns.

What this means for application developers like me... Files installed into bin/ directories remain so a user can launch the application but the libraries have dissappeared so the application will fail with an ImportError exception.

I'm not convinced the upgrade needs to be this dramatic as .pyc files are only a load optimisation but this means that the ImportError should be caught at the top level and the user warned they have an invalid install (a good thing to report anyway) or they are upgrading and must wait for the upgrade to complete.