8
Feb/10
0

Banshee + GNOME 3.0

The GNOME logo I spent a little time this weekend doing one of the things I’ve wanted to do for years – eradicate one of the oldest files in Banshee: banshee-dialogs.glade.

The vast majority of Banshee’s UI is custom widgetry that is laid out dynamically at runtime. The main window and the preferences dialog hasn’t been restricted by Glade for a couple of years, but all the other dialogs were defined in part in Glade:

  • Open Location
  • Seek To
  • Import Media
  • Smart Playlist Editor
  • Error list dialog (very unlikely anyone has ever seen this)
  • Last.FM Station Editor

These were all fairly simple dialogs in Glade — mostly consisting of a table, some static labels, and placeholders to pack in custom widgets at runtime (e.g. the import source combo box in the Import Media dialog, or the actual query builder UI packed in the Smart Playlist Editor dialog).

Old Banshee Glade Dialogs
Old Banshee Glade Dialogs

These are now fully defined in code, allowing the dialogs to derive directly from BansheeDialog, which provides extra common functionality for dialogs on top of Gtk.Dialog.

The big take-away here is no longer depending on the deprecated libglade/glade-sharp libraries (well, almost — later this week Gabriel will port Muinshee — an alternative Banshee client in the image of Muine, but not a core component). Additionally, I removed our dependency on libgnome/gnome-sharp, which is also deprecated.

This means that Banshee 1.5.4 will be GNOME 3.0 ready. The last thing to do is implement a udev hardware backend. We already have partial DeviceKit support, and GIO support. However, we don’t take a hard dependency on HAL. The removal of the last Glade file represents the eradication of any hard obsolete GNOME 2.0 dependencies. Exciting!

As a quick aside: what was really nice about the porting from Glade to C# was the use of C# 3.0 features – specifically type inference and object initializers. This permits interface construction using a more terse syntax than available in C# 2.0, yielding improved readability and organization. For instance:

    var table = new Table (2, 2, false) {
        RowSpacing = 12,
        ColumnSpacing = 6
    };

    table.Attach (new Label () {
            Text = Catalog.GetString ("Station _Type:"),
            UseUnderline = true,
            Xalign = 0.0f
        }, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Shrink, 0, 0);

Bring it on, GNOME 3.0. We are ready!

For more frequent updates, you should follow me on Twitter here.

29
Jan/10
8

Banshee 1.5.3 and the return of OS X support

The Banshee logo

The Banshee community is proud to announce the availability of Banshee 1.5.3! With a slew of new features and bug fixes, and a fully refreshed Mac OS X build, this is another solid release on the road to 1.6 (due out on March 31st).

Get It!

Gabriel highlights a number of new features and improvements on his release announcement blog:

  • A new sync device from playlist option
  • Audiobooks library extension
  • Library-folder watcher extension
  • eMusic importer/downloader extension
  • GIO file backend supporting non-local files

Additionally, 75 bugs were fixed since the last release. Read the 1.5.3 release notes to learn about additional new features and improvements.

Mac OS X Release

What’s particularly exciting to me is the return of the OS X releases. I have completely overhauled our OS X build, and we no longer take a framework dependency on Mono or GTK – these dependencies are bundled as part of the binary distribution of Banshee on OS X.

If you have OS X 10.5 or newer (Intel only), you can simply download and run Banshee – nothing else needs to be installed.

Banshee 1.5.3 on Mac OS X 10.6

This gives us greater flexibility to refine and polish Banshee for OS X. For instance, I started working on a new GTK theme that uses the flexible Murrine engine. Currently the Mono framework installation uses Clearlooks.

There’s still a lot to do on the OS X build, so if you’re interested in hacking on the platform backend, it’s now easier than ever to do so:

  • Install XCode
  • Clone Banshee from GNOME git
  • Run ./bootstrap-bundle at the top of the checkout

This process will magically build everything that Banshee requires, and from there hacking on Banshee is just like it is on Linux. I recommend using MonoDevelop of course to get real work done though.

Enjoy!

Update: There was a lame bug preventing startup of Banshee 1.5.3 on OS X. This has been fixed and the DMG image has been respun. If you had problems running the release, download the updated image. My bad ya’ll!

For more frequent updates, you should follow me on Twitter here.

17
Dec/09
21

Banshee Grid View

Spread out over a number of hours over the last few weeks I’ve been working on making our high-performance list view in Banshee also handle grid-style layouts.

That is, all the benefits of our polished list widget with a new look and feel! I’m making the widget more clever and abstracted about layout and rendering so it can be more inviting to users. In fact, you can even live-toggle between layout modes (e.g list and grid) without losing any state.

This effort provides a more visually immersing and space-conscious view for your collection of albums. This big step forward is the groundwork for presenting other media collections in a friendlier way — video thumbnails, movie box covers, audio books, photos…

Screenshot of Banshee's new grid layout for albums
The new grid layout mode for the album browser.

There are still a few quirks to work out regarding interaction (different maths for keyboard navigation), and some more polish to add on the rendering side of things, but I am very close to merging this work to master in git.

The code is being developed in the grid branch in git for those who would like to try it out. Poke me on IRC if you find problems, but I probably am already well aware — again, it’s not merged to master because it’s not RC worthy yet — but it’s ready for some broader testing!

Thoughts? Suggestions? Complaints? Hopes and dreams? I’m super excited about finally having this land, and it’s been an enjoyable hack to implement.

For more frequent updates, you should follow me on Twitter here.

16
Dec/09
2

Mono 2.6 + MonoDevelop 2.2 on openSUSE 11.2

Fantastic news — Mono 2.6 and MonoDevelop 2.2 are out! Be sure to read the detailed Mono 2.6 release notes.

If you are running openSUSE 11.2, it’s quite simple to safely update your entire Mono stack and stay up to date with any 2.6 updates:

  • zypper ar -f -n Mono http://ftp.novell.com/pub/mono/download-stable/openSUSE_11.2 repo-mono
  • zypper mr -p 10 repo-mono
  • zypper refresh
  • zypper dup -r repo-mono

Those instructions will change the Mono distribution from openSUSE to the upstream Mono repositories.

I highly recommend installing MonoDevelop 2.2 (zypper in monodevelop), though if you already had it installed, the above will update you to the 2.2 release.

MonoDevelop 2.2 Integrated Debugger
Integrated Mono 2.6 soft debugger in MonoDevelop 2.2

A huge congratulations and thank you to the Mono team for another exceptional major Mono milestone!

UPDATE: apparently there is a problem on the x86_64 build in the openSUSE Build Service. This appears to be an OBS bug, but for this reason, it’s recommended that you use the repositories at http://ftp.novell.com/pub/mono/download-stable.

For more frequent updates, you should follow me on Twitter here.

14
Jul/09
44

Exciting updates on the road to Banshee 2.0

At the Gran Canaria Desktop Summit last week I demoed my new work-in-progress Netbook-focused interface to Banshee called Cubano.

Cubano: Experimental new Banshee Interface

Cubano is designed with the Netbook in mind, but is certainly not limited to such a device. I prefer this clean and simple interface to the more traditional Banshee interface already, even on my desktop. Cubano is more about experiencing your music than managing it.

I am aiming to introduce visual metadata (photos, colors) and simple whitespace as UI elements to separate and emphasize content instead of the hard lines from traditional toolkit widgets.

However, even with a minimal interface you don’t lose any of the power to which you may be accustomed from the traditional Banshee interface.

Cubano: Experimental new Banshee Interface

I must stress that not all of the UI concepts here are solidified or indeed implemented. A few quick things to note about what will change in the very near future:

  • The painful source combo box will go away, don’t worry! It was just a widget that already existed in Banshee that I was able to easily reuse to connect the dots.
  • We’re working on a grid view for artists and albums.
  • I don’t care for the header either — it will receive much attention in due time.

Feel free to checkout Cubano’s source code, but you’ll also need clutter, clutter-gtk, and clutter-sharp from Clutter git master, and Banshee from GNOME git master. Bleeding edge!

Lastly, let me further stress that Cubano does not replace Banshee as we know it today. It only augments it. Cubano simply provides a different user experience on top of the existing Banshee platform.

Platform you say?

Trendy, I know. Banshee is in its third generation now. It’s been designed to be completely extensible, and major components are abstracted and organized in reusable ways.

As such we’ve fostered the development of many Mono/.NET libraries, most of which are not specific to Banshee and can easily be reused in other projects.

We essentially glue everything together with Mono.Addins, and build user interfaces on top of it all. What this means is the traditional user interface we’re used to in Banshee is an astonishingly small 875 lines of C# code.

Therefore, it’s conceivable, and even quite easy to think of Banshee as not just an application, but a platform for building new applications and user experiences. Ergo, Cubano.

A quick overview of the Banshee platform building blocks

For those interested in some of the wider details of the design and utility behind Banshee as platform, I recently had lovely a discussion on the topic with Scott Hanselman — Senior Program Manager in the Developer Division at Microsoft — for his podcast, Hanselminutes.

F-Spot

A major take-away from this platform discussion at GCDS last week is talk of re-basing the core of F-Spot — the wonderful photo management application — on top of Banshee itself.

The goal is simply to allow F-Spot to benefit from Banshee’s mature and maintained core, which provides many of the underpinning necessities in F-Spot, and allow the F-Spot developers to focus on the more interesting task of organizing and manipulating Photos.

While nothing is set in stone, I have a simple proposal:

  1. Re-base F-Spot’s non-UI core on Banshee’s non-UI core.
  2. Implement basic photo importing, tagging, and viewing as a Banshee extension (an optional feature). This would mean showing photos in Banshee like we do for videos.
  3. With Banshee/Cubano supporting basic photo management, grow the F-Spot user interface and experience to be more like that of professional tools such as Adobe Lightroom — an experience missing today on the Linux desktop.

GCDS Slides

The talk I gave at GCDS covered the above and a bit more. The slides are available here, but may be a bit terse if you weren’t in the audience. I’m not sure if my talk was recorded or not.

Nevertheless, for your perusal:

Slides from GCDS 2009 talk

For more frequent updates, you should follow me on Twitter here.

11
Jul/09
7

Caught in the act

I could not believe my eyes as I covertly snapped this photo, just a block from the Fataga Hotel.

GNOME Art is fueled by McDonalds

For more frequent updates, you should follow me on Twitter here.

Tagged as: ,
18
May/09
2

openSUSE 11.1 on Linode ala zypper dup

I’ve been a Linode user for around four years now, and have always run Debian, until today. Last year Linode added openSUSE 11.0 as one of the distributions available to install, and I tried it very soon after it was available. Unfortunately it could barely boot (UML related issues I assume), and without any time to poke around, I switched back to my Debian image.

This weekend I decided to try again, even though the openSUSE version from Linode is still 11.0. I figured, “I’ve never actually done a [so called] dist-upgrade in openSUSE, so maybe I should try.” I was quite impressed.

It took all of about 30 minutes to fully migrate my Debian Linode to openSUSE 11.1 – with fully working/migrated lighttpd, mysql, and git-daemon.

  • Deploy an openSUSE 11.0 distribution in your Linode, boot it.
  • Log in as root (via SSH, not LISH)
  • Nuke the 11.0 repository list: /etc/zypp/repos.d
  • Add the 11.1 base repository: zypper ar -f http://download.opensuse.org/distribution/11.1/repo/oss openSUSE-11.1
  • Update the update stack: zypper in zypper
  • Refresh the repo (probably not actually necessary, will be done automatically by the next step): zypper refresh
  • Update to openSUSE 11.1: zypper dup

At this point you will have fully migrated from openSUSE 11.0 to openSUSE 11.1, something that historically has been very difficult with SUSE. zypper is awesome! Now reboot the machine as a sanity check, and configure for updates.

  • Add the update repository: zypper ar -f http://download.opensuse.org/update/11.1/ openSUSE-11.1-Updates
  • Patch the 11.1 install to be fully up-to-date: zypper up

Reboot again as another sanity check. At this point you have the latest patched and stable openSUSE 11.1 on your Linode. The openSUSE base install is fairly stripped down by Linode, so I recommend installing and setting up the firewall (SuSEfirewall2), sudo, iputils, lighttpd, mysql, git-daemon, etc.

Additionally, you can easily update to the latest stable Mono release by subscribing to the official Mono OBS repository:

  • zypper ar -f http://download.opensuse.org/repositories/Mono/openSUSE_11.1 Mono
  • zypper in mono-core mono-data mono-data-sqlite mono-web

So finally I am still a happy Linode user, but now with my favorite and most familiar distribution, openSUSE! I’m looking forward to playing with ASP.NET MVC on Mono 2.4. Any good MVC blog engines out there?

For more frequent updates, you should follow me on Twitter here.

31
Mar/09
9

Droid Fonts for openSUSE

openSUSE Logo

Just a quick note that I have packaged the Droid fonts from Android for openSUSE. I’ve submitted the package to Factory so we should have them in 11.2. Droid fonts are freely available from Ascender.

Install ‘em now!

Stefano Forenza has some more details on getting the most out of these delicious free fonts. Kudos!

Update: I incorrectly attributed Stefano’s post to Neil J Patel, who actually pointed out Stefano’s post on Twitter. Twitter is king! So thanks to both Stefano, and Neil for spreading the link :-)

For more frequent updates, you should follow me on Twitter here.

13
Feb/09
1

Mono 2.0 wins developer product of the year award!

Congratulations to the Mono project for winning the Developer.com Product of the Year Award in the .NET Tool/Add-in category!

"It is no surprise to see Rich Internet Applications (RIAs) take the prize for technology of the year; however, seeing the open source project Mono 2.0 grab the honors for .NET tool is a surprise," stated Bradley Jones, Senior Executive Editor of Internet.com’s Developer Channel.

Very exciting!

For more frequent updates, you should follow me on Twitter here.

Tagged as: , ,
11
Feb/09
60

Announcing Moonshine, the project never formerly known as Pornilus

For the last month, I have been working on a new project officially called Moonshine, but referred to as “Pornilus” in some affluent circles.

Moonshine is a project based on Moonlight that leverages the built-in Windows Media capabilities of Silverlight to bring Windows Media playback to Linux in a fully legitimate way, without forcing the end user worry about what a codec is. This is possible because Microsoft provides the codecs directly to all Moonlight users, regardless of their choice of Linux distribution.

Very simply, Moonshine:

  • Allows an end user to experience Windows Media content on the web.
  • Brings Windows Media playback capabilities to a user’s desktop for playing local/arbitrarily downloaded content.

Moonshine
Moonshine powering HBO and C-SPAN

Install Moonshine

Of course you’ll also need Moonlight installed. If you don’t have the
proper version installed, the Moonshine page will tell you.

Moonshine

On the Moonshine page, there is an XPI available to install for Firefox. You must have the latest Moonlight installed and Firefox 3.0 or newer. The Firefox shell that provides local media playback however is not part of the XPI. You must build Moonshine from source to have this feature. Packages will soon be available for openSUSE, and hopefully for other distributions soon.

Additionally, you must disable the Totem GMP/Windows Media plugin in Firefox, since it basically tells Firefox it can handle the same Windows Media mime types, even if the codec is not installed for GStreamer. It would be really great if Totem would only advertise mime types that GStreamer actually supports on a given user’s system.

Moonshine Overview

The project consists of three components:

  • A media player written in Silverlight/JavaScript that stands on its own.
  • A Firefox/NPAPI plugin written in C that claims support for Windows Media mime types and enables embedded playback of Windows Media on the web.
  • A Desktop Application that allows local playback of Windows Media content, implemented in JavaScript as a XUL overlay that re-purposes Firefox’s user interface to be more appropriate to media playback instead of web browsing.

If you do not care about the really technical details of Moonshine, I’d advise you to stop reading now, and just install Moonshine and try it out! If you’re interested in the details of my life over the last month, read on!

The Silverlight Application

The actual media player for Moonshine is implemented in Silverlight/JavaScript using my MTK widget library. MTK uses the basic approach in GTK for widgetry. Many of the base concepts are similar: size requisitioning, allocation, parenting, realization, etc. To write the Moonshine player, I basically implemented GObject, GtkWindow, GtkWidget, GtkContainer, GtkBox, GtkHBox, GtkVBox, GtkButton, GtkLabel, and GtkScale, hastily of course.

MTK even supports a small level of native look-and-feel integration by reading system/theme colors from the browser’s CSS mapping.

It was still a really entertaining hack: MtkObject for example contains a simple virtual method and event implementation, which greatly simplified writing widgets. JavaScript purists who know better than I will probably bash this though, screaming something about “but think of the prototypes!”

All this effort was necessary as unfortunately Silverlight 1.0 (which Moonlight currently targets) does not offer a toolkit – it really is just a glorified canvas/stage. When Moonlight 2.0 is released, the MTK side of Moonshine will go away, though it would be very interesting to re-target MTK from XAML to say, SVG. I would love to see someone try that, it should be relatively straightforward.

What’s interesting about the Silverlight player is that it works as an entirely standalone Silverlight application, suitable for embedding on any web page. Of course though my JavaScript is very specific to Firefox 3.0+ I assume, so that kills a little value there. Patches welcome.

The Firefox Plugin

Finally, Moonshine provides an NPAPI plugin that advertises it supports Windows Media to Firefox. When Firefox comes across said media, it loads the Moonshine plugin. Moonshine in turn loads Moonlight, and proxies NPAPI calls directly to Moonlight. Moonshine then injects the Silverlight JavaScript into the browser, and binds it to the Moonlight plugin instance. From the browser perspective, it’s Windows Media, but the real stuff under the hood is just pure unadulterated Moonlight, driving a standard Silverlight application.

Additionally, a further piece of JavaScript is bound to the plugin object that emulates pieces of the standard Windows Media ActiveX/object API for further compatibility.

The implementation details on the Moonshine plugin are a bit interesting:

  • Moonshine provides the 4 standard NPAPI entry points: NP_Initialize, NP_Shutdown, NP_GetValue, and NP_GetMIMEDescription. It proxies each of these calls, excepting NP_GetMIMEDescription to Moonlight’s own NPAPI entry points.

  • Inside of NP_Initialize, Moonshine calls Moonlight’s NP_Intialize, and then overrides three NPP functions to be returned to the browser: NPP_New, NPP_StreamAsFile, and NPP_Destroy.

  • The NPP_StreamAsFile override simply prevents Moonlight from receiving that call, which would cause Moonlight to try to load WM content as XAML. The NPP_Destroy override just allows Moonshine to clean up its Moonlight binding on an instance, and then call’s Moonlight’s version of the function.

  • And finally, the juicy NPP_New override actually creates its own NPP_New call against Moonlight. All it sends to Moonlight is the width, height, and HTML DOM ID of the requested WM player, and sets the onload and source attributes on Moonlight to appropriate values for binding to the injected XAML/JavaScript player.

So this all means that Moonlight has absolutely no idea that the content its driving wasn’t hard coded in the web page. For all Moonlight is concerned, Moonshine is the browser. Plugins helping plugins, that’s what it’s all about.

And it all started as an extension

Moonshine was a really annoying project at first, and it took a while to come together. Most of the real progress and code that ultimately became Moonshine was written over the last two weeks.

Originally I wanted to avoid writing an NPAPI plugin and instead opted for writing a Firefox extension. What a mistake. I have learned way too much about Firefox and the Mozilla platform. It’s huge. But I must say, it was actually pretty pleasant to work with. Most APIs are pretty well documented. MDC is your friend, but a checkout of the Firefox source code is your better friend.

The mistake isn’t really the fault of the Mozilla platform, but a misunderstanding on my part of what I really needed to accomplish. My original version listened to the DOM, listened for new streams, etc. to intercept Windows Media mime types. This finally was working fairly well, but really was just a giant hack. I could not stomach the abuse I was causing inside the browser, and in no way was comfortable with releasing it.

However, the final nail in the extension approach was when I encountered web sites that actually check the plugin registry for a Windows Media plugin, and do not even create DOM content I could bind to if no plugin exists (ahh, gotta love the web). And of course the only way I could find to actually modify this registry was to be an NPAPI plugin.

So I threw away all of that code… about 1000 lines of JavaScript replaced with about a 1000 lines of C, an impressive trade-off — all things considered.

Going Forward, Looking Back

It’s been a very interesting few weeks, but I am so tired of working on this. I am aching to get back to Banshee. I do however want to make this work on the Mac under Microsoft’s own Silverlight. Or maybe someone out there can do it for me? It would be a fun hack!

Additionally, I am pretty interested in MTK, but can’t afford to work on it. I would be absolutely thrilled if someone would rebase the code on top of SVG. SVG needs a toolkit! It’s pretty pointless to continue working on MTK if it just targets XAML, since Silverlight 2.0 provides a toolkit. Any SVG/HTML5/Canvas enthusiasts out there are more than welcome to the MTK code. Keep me posted!

UPDATE: Last night I fixed a bug in Moonshine that prevented Moonlight from downloading the Windows Media codecs if you were running in plugin mode. If you experienced a “Bad address” error, please install the 0.2 XPI.

For more frequent updates, you should follow me on Twitter here.