Exaile 0.2.11 for maemo

I’ve updated the maemo port of Exaile to version 0.2.11. There are not many visible changes, apart from alphabetic separators in the collection list. I now include the bytecode-compiled pyc files, so startup time should be reduced slightly. It still takes a bit long to start up though. I’ve been using this for about a month now and it seems to be stable enough.

This will probably be the last release for OS2007. I’ll make a release for OS2008 once I have that installed and working on my N800.

Filed under: exaile,maemo,N800 — twegener @ 22:09


Updating to Fedora 8

A few weekends ago I updated my system from Fedora 6 to Fedora 8. I did a fresh install, as opposed to doing an upgrade. Here are a few of the problems I encountered, along with solutions:

Wireless networking wasn’t working

Fedora 8 detected my Atheros-based wifi card, since it now includes the new freedomware ath5k driver. However I couldn’t get it to associate with my access point. The workaround was to install the proprietary madwifi package from livna: On a machine with Internet access, go to livna.org and download madwifi and the kmod-madwifi package corresponding to the installed kernel (do uname -r to find out). Then do:
su -
rpm -ihv madwiki kmod-wifi
modprobe -r ath5k
modprobe ath_pci

Go to Administration->Services and start/turn on NetworkManager and NetworkManagerDispatcher services. The NetworkManager applet should appear in the system tray. Click on this to configure a wireless connection.

1280×1024 resolution was not available

This resolution was working on my Fedora 6 setup, with an nVidia gforce2 MX 440 and Viewsonic E771 monitor.
To fix, add the following line to /etc/X11/xorg.conf in the “Display”/”Screen” section:
Modes "1280x1024" "1280x1024" "1280x960" "1280x960" "1280x800" "1280x800" "1152x864" "1152x864" "1152x768" "1152x768" "1024x768" "1024x768" "800x600" "800x600" "640x480" "640x480"

Setting up the livna repository

The livna.org repository is a separate repo containing packages that aren’t included in the main Fedora repo for various legal, technical and ethical reasons. I need it for the madwifi driver and the gspca webcam driver among other things. Set it up like so:
su -
rpm -ihv http://rpm.livna.org/livna-release-8.rpm

Installing the webcam driver

The driver for my Logitech Quickcam IM webcam is freedomware, however apparently it does yucky things like JPEG decoding inside the kernel, so is not included in the mainline kernel. It can be installed from livna like so:
su -
yum install gspca
modprobe gspca

Alternatively, you can install it from the GUI by going to System->Add/Remove Software and searching for gspca.
You can test that the webcam is working by running Ekiga (strangely filed under Internet->IP Telephony blah blah) and setting up video.

Using a home directory on a separate partition

I have my home directory stored on a separate ‘data’ partition. I was not able to log in when I configured my account to use this as my home directory. To fix this, I had to change the SELinux context on the root directory of the file-system on the data partition like so:
chcon system_u:object_r:home_root_t:s0 /data

Fixing broken icons in Evolution

It appears that the necessary dependency isn’t installed by default for a KDE install. Fix the icons like so:
su -c 'yum install nodoka-theme-gnome'

Installing Adobe Flash Player

To install the proprietary Adobe Flash player do:
su -
rpm -ihv http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
yum install flash-plugin

Note that a freedomware flash player, gnash, is in the works, but it only supports a subset of Flash v7 functionality.

Other issues

I’ve had problems with sound not being available upon booting from time to time. This seems to be due to the coexistence of the webcam’s internal microphone sound device, and my main soundcard sound device. I also get ‘artsd’ crash messages upon logging into KDE from time to time.

I hope to cover my impressions of the various Fedora 8 components in subquent posts, but we’ll see how we go.

Filed under: fedora — twegener @ 22:27


How to create a .deb package for maemo without Scratchbox

The officially recommended way to create .deb packages for the maemo platform is to use dpkg-buildpackage within Scratchbox. For me, Scratchbox is a pain to install for two main reasons. First, there is no RPM package of the scratchbox environment, so apparently I need to run some scripts as root, let my system get a little messier, which I am not willing to do. Second, the docs advise to turn off SELinux in order to get the Scratchbox environment to work, which again I am not keen to do.

If you are using Debian or Ubuntu, there is probably a cleaner approach, but I am currently using Fedora, so I just rolled my own method using the command line. Copy the following files to your project directory:

Then rename deb_hand_example.mak to Makefile, and adjust the variables in this file to match your project.

Setup the required files (referenced in these makefiles) for packaging. There some pointers on this in the Python Maemo howto in the packaging section.

Note the ${PACKAGE_DIR}/data: ${SOURCE_DIR} target in the makefile. This must be modified to layout all files as you wish them to be installed on the target system. The example makefile rule should be a reasonable guide.

Then once you are ready, do ‘make PACKAGE_DIR= deb’ and if all goes well a shiny new deb package should be sitting in release_dir. If not, fix your settings in the Makefile, run ‘make clobber’ and then try again.

Filed under: maemo,N800 — twegener @ 14:40


Exaile N800 port webpage

I’ve whipped up a webpage for the Exaile N800 port. This has the latest packages, screenshots, todo list, etc.

I’ve also made a new release with the following changes:

  • Basic Hildon-ization: window, menus, full-screen support, file dialogs
  • Icon now appears in taskbar
  • Fixed default OSD background colour
  • Made track info in title bar briefer

Double-clicking the playlist items in the sidebar doesn’t work. This is due to this bug in maemo gtk. Vote for it if you want this fixed.

There is plenty still to be done. I don’t have stacks of time to work on it at the moment. Send me some encouragement and I may work a bit faster. :-)

Filed under: exaile,maemo,N800 — twegener @ 22:02


Exaile N800 port updated to 0.2.10

I’ve rebased the N800 port of Exaile to the latest upstream release. In the process, I tidied up my existing patches and it is marginally more stable now. Here are some of the more noticeable changes:

  • the track position is now a progress bar and looks much nicer (upstream)
  • the plugin loader works now (upstream)
  • the volume slider works better (upstream)
  • turned off a lot of my debug output from the previous release
  • fixed a bug where a playing track would occasionally stop out of the blue

.debs are here:

Next, I’ll probably work on making the interface a bit prettier, starting with hildon-izing the menus. I’d also like to add Replay Gain support to Exaile at some stage. And of course there are still a few bugs to iron out. There is a TODO file tucked away somewhere in the package with more details on things that need to be done.

BTW, make sure you change the foreground color in the preferences for the OSD notifications. There is some problem setting the background color at the moment which results in the notifications appearing blank. I’ll fix this (at least the default setting) soon.

Filed under: exaile,maemo,N800 — twegener @ 22:56


Preview .deb packages for Exaile for maemo

After much messing around I have build some .deb packages for my Exaile for Maemo port and the mutagen library (one of its dependencies):



There’s lots of work still to be done, but if your desperate for a nicer sound player on the N800 then this should do the job. If there are any features that you would like to be fixed/added sooner rather than later then leave a comment and I’ll push it higher on my todo list.

Filed under: maemo,N800,Python — twegener @ 23:11

Manually creating a .deb package for maemo

After much gnashing of teeth I have managed to manually make a .deb package that installs on the N800. I wanted to make the .deb by hand since I use Fedora on the desktop, for which the dpkg tools are not available. (I haven’t installed Scratchbox, because there are no rpms available for it at the moment, and I’d like to install it cleanly.)

A .deb package is quite simple, at least in theory. It consists of a control.tar.gz archive with package control files, data.tar.gz archive of all files that will be installed and debian-binary file that indicates the deb version to use. These files are then placed within an ar archive.

I cobbled together the archive contents using a hacky make file and sed. The final ar archive was the main sticking point. The ar format used in .deb packages is different to that generated by GNU ar. By looking at an existing deb package (the one for maemo-wordpy as it happens) with the emacs hexl-mode and consulting the wikipedia entry on the ar format and a few other people who shared my pain, I was able to come up with a sed script to fix the internal headers:

sed -e 's|^\([^/]\+\)/ \(.*\)|\1 \2|g' temp.ar > output.deb

This still didn’t cut the mustard. It turns out that the order of the files within the ar archive is important:

ar -rc temp.ar build/debian-binary build/control.tar.gz build/data.tar.gz

The complete makefile is a bit of an embarrassment at the moment, so I won’t post it here. At some stage I’ll write a more general script for generating .deb packages.

A few more things learnt along the way:

  • dpkg-deb on the N800 cannot be used to make .debs since it appears to be incompatible with the busybox version of tar
  • non-header lines in the control file most be indented (e.g. description lines and base64-encoded icon)
  • the maemo installer icon is 26×26; ImageMagick is helpful here: convert -rescale 26x26 icon.png output.png
  • to base64 encode the icon do base64 icon.png | gawk '{print " "$$0;}' > icon.txt
  • create the md5sums file like so: find . -type f -exec md5sum {} \; | sed -e 's| \./||' > md5sums
  • some extra fields are needed in the .desktop file to get the icon to show up: X-Icon-path=/usr/share/icons X-Window-Icon=appname and the .png extension should be dropped from the Icon line.

Functional Exaile for maemo debs coming soon hopefully…

Update: I’ve made a reusable makefile fragment for generating .deb packages without using dpkg tools: deb_hand.mak, and an example custom makefile that uses this fragment: deb_hand_example.mak

Filed under: maemo,N800 — twegener @ 1:58


Exaile N800 port progress

I shamefully forgot to include a screenshot in the last post, so here you go:

Exaile on N800 screenshot

As you can see, the GUI needs a bit of polishing (‘hildonisation’).

I fixed end-of-track detection for the nokia-mode pipeline. This means that the player will actually start playing the next track in the playlist when a song finishes! The problem was that I neglected to add the playbin bus setup for the nokia pipeline. Also, I had to ensure that the on_message handler was reconnected whenever a new track is played in nokia-mode, since the pipeline gets rebuilt if the file format is different.

The first fix had the pleasant side-effect of making m4a files play correctly from Exaile (previously they were really stuttery).

I fixed the about dialog. The version of libglade on the N800 appears to be a bit behind the times and doesn’t support GtkAboutDialog. I just create it in the program directly using gtk.AboutDialog and it works fine. I’m not a big fan of the libglade approach of reading in the widgets at runtime from an XML file. I prefer the way that it is done in Qt Designer/PyQt where the language-independent XML widget description is converted into Python code in a separate step. This code can be imported and extended by the main application code. It feels like such a waste to add an extra parsing step, for no gain.

I’ve encountered a bit of instability now and then during testing, especially when doing lots of seeking. Sometimes this results in a total lack of responsiveness and I have to kill the process manually. I’m willing to live this for now.

There are plenty of todo items, but I think I’ll work on making a .deb package to enable people to try this out more easily. Also, I plan to start a hildonisation branch, and keep another branch for functionality fixes. I’m using Mercurial for revision control, and this will be a good opportunity to play with branching and merging. Hopefully I will get round to setting up an online repository at some stage.

Related posts:

Filed under: maemo,N800,Python — twegener @ 23:19


Porting Exaile audio player to the Nokia N800

The default media player on the Nokia N800, creatively titled Media Player, sucks in many ways. There is no Ogg Vorbis support, no way to create a playlist from the GUI, seeking support is hit and miss, lacklustre graphic design, minimal metadata support, etc. Its shortcomings are compounded by the fact that is closed source, so it’s not just a matter of fixing the warts. This led me to port an existing media player, Exaile, to the N800.

Exaile is a cross-platform player written in Python. It uses the Gtk GUI framework and GStreamer for the audio backend. It attempts to be a clone of the magnificent Amarok, but in Python (fun to hack and easily portable) and Gtk (handy if that’s what you prefer or is all you have, as on the N800). It has nice collection and playlist management in the the style of Amarok, and some degree of last.fm support.

Porting involved taking out some newer Gtk features (e.g. SVG icons), adding support for the SQLite that comes with Python 2.5 (the version available for Maemo), adding support for modified gstreamer audio codec pipelines, and modifying the GUI to suit the constraints of a handheld platform.

I grabbed the basis for the gstreamer audio pipeline support from the Coherence project; a UPnP platform written in Python, with recently added N800 support. This had support for the built-in MP3 dsp codec as well as the third-party Ogg Vorbis software codec. The parse_launch function is used to create a gstreamer pipeline like so:

player = gst.parse_launch('gnomevfssrc name=source ! id3lib ! dspmp3sink name=sink')

I added support for a couple of other codecs; m4a (MPEG4 audio, so I can play iTunes Plus songs without transcoding degradation) and AAC (advanced audio coding, similar to m4a, used by Nokia). These work in my isolated test cases, but have some problems at the moment when integrated with my Exaile port. It took quite a bit of poking around and trial and error to get m4a playback happening; there’s not a lot of Maemo documentation for this at the moment. For the interested, here are the pipelines:

m4a: gnomevfssrc name=source ! demux3gp ! dspaacsink name=sink sync=false'
aac: gnomevfssrc name=source ! dspaacsink name=sink

I’m still not quite sure of the meaning of the ‘sync=false’ setting, but without that playback is grossly stilted. When used within Exaile playback is still problematic, so there is work to be done there.

The user interface is a bit rough at the moment. It needs to be hildon-ised, to fit in with the look and feel fo the N800 software. I’d also like to integrate some of the pretty aspects of the Listen audio player (another Python/Gtk/Gstreamer audio player) into the interface, and adapt it to suit the style of the N800.

At this point I now have a media player that is better (for me) than the ones that I have used up to this point (Osso Media Player, Kilikali, UKMP, and some other player I removed on account of it trashing some of my setup). There is still a lot of work to be done. Here is my current todo list:

  • Fix the ‘about’ dialog
  • Get .m4a files to play properly
  • Fix displaying of notification bubbles
  • Fix getting available plugins
  • Make left column hidable in main view
  • Improve layout of song info in main view
  • Fix opening of directories in Files browser
  • Fix searching for .aac files
  • Test audio scrobbling
  • Add offline queueing for audio scrobbling
  • Get last.fm streaming working
  • Improve startup time
  • Hildon-ise the GUI
  • Make .deb packages for the exaile port and the mutagen library

This should keep me busy for a while! It is a bit of a nuisance to use at the moment, since it must be started from the command line, and the Mutagen library must be installed by hand. Things will be much nicer once I make .deb pacakges for this. Here is a tarball alpha release for those desperate have a play: exaile_maemo/release/exaile_0.2.9_maemo_5.tar.gz

Filed under: maemo,N800,Python — twegener @ 23:34


Blogging from MaemoWordPy

I am writing this post in MaemoWordPy running on the Nokia N800 tablet.

Edit: It lacks the ability to make new categories or to retrieve drafts from the web for editing. Other than that it works fine.

Filed under: maemo — twegener @ 20:01
« Previous PageNext Page »
Powered by WordPress