Moonlight

Moonlight is an open source implementation of Silverlight, primarily for Linux and other Unix/X11 based operating systems. In September of 2007, Microsoft and Novell announced a technical collaboration that includes access to Microsoft's test suites for Silverlight and the distribution of a Media Pack for Linux users that will contain licensed media codecs for video and audio.

Moonlight 2 was released December 17, 2009

Table of contents

Download

To get Moonlight, visit http://go-mono.com/moonlight.

Goals

Our goals are:

  • To run Silverlight applications on Linux.
  • To provide a Linux SDK to build Silverlight applications.
  • To reuse the Silverlight engine we have built for desktop applications.

The MoonlightRoadmap includes current Moonlight planning.

Using Moonlight

Getting Started

Up-to-date packages ready to test are available from:

Our supported architectures and operating systems lists the platforms that we currently test the binary packages of Moonlight on.

Once you install Moonlight from the above URL to play video or audio, you will be prompted by Moonlight to install the Microsoft Media Pack for Moonlight available from Microsoft.

Alternatively, you can build Moonlight from source code and link against ffmpeg codecs on your own.

Groups and Mailing List

Discussion on the development of Moonlight happens on the moonlight-list mailing list.

It is also recommended that interested parties subscribe to the mono-devel-list (for general issues on Mono development and the mono-svn-patches list that tracks all of the Subversion commits that go into Mono's source code control repository.

We are also using the #moonlight IRC channel on irc.gnome.org. A web interface to the #moonlight IRC channel can be found on the [official Moonlight site]

Reporting Bugs

Licensing

Moonlight 1.0 is licensed under the terms of the GNU LGPL, it is a pure C++ engine.

Moonlight 2.0 contains code that is licensed under the terms of the GNU LGPL and the MIT X11 licenses, it includes the graphical C++ engine, the Mono Runtime and the Mono class libraries.

The Microsoft Media Pack is a product distributed by Microsoft that includes a license to the various media codecs for video and audio and is available from Microsoft's web site for Moonlight to consume.

Users of Moonlight interested in using this on embedded systems should contact the Mono at Novell team to obtain a commercial license. See our Licensing page for details.

The Microsoft covenant for Moonlight users is posted here.

Developing Moonlight

You should only attempt to build Moonlight from source if you are interesting in contributing or have a need to track the project closely. Otherwise it is recommended that you use the packaged versions.

External Dependencies

Moonlight has several external dependencies, such as:

  • Gtk+ 2.0 development package
  • XULRunner development package
    • for example: mozilla-xulrunner190-devel for firefox 3, mozilla-xulrunner181-devel for firefox 2
  • Alsa and/or PulseAudio development packages

Optionally if you would like to play media without the Microsoft codecs you will need ffmpeg.

If you are not interested in building browser plugins, the mozilla packages can be skipped.

Working from tarball releases

First off, download all 3 tarballs from a given version directory from ftp.novell.com. These need to be unpacked at the same directory level to one another, as in:

 $ ls
 mono/
 mcs/
 mono-basic/
 moon/

Working from GIT

This is a much easier way to track our progress, but it's slightly more complicated. Here again you have two options: stable and unstable.

Here is an example of how to build moonlight from GIT (this will checkout sources into ~/build and install into /usr/local):

 mkdir -p ~/build/moonlight
 cd ~/build
 git clone git://github.com/mono/mono.git mono
 cd mono
 ./autogen.sh --prefix=/usr/local && make && sudo make install
 cd ~/build/moonlight
 git clone git://anongit.freedesktop.org/mesa/mesa mesa
 git clone git://github.com/mono/moon.git moon
 git clone git://github.com/mono/mono.git mono
 git clone git://github.com/mono/mono-basic.git mono-basic
 cd moon
 ./autogen.sh --prefix=/usr/local
 # You can read autgen's summary here, you'll want to make sure
 # everything you want is enabled (in particular the plugin).
 make reset-mono && make && make test-plugin && sudo make install

Now you should have a working moonlight (try accessing http://silverlight.net/showcase in firefox or chrome to test).

If it doesn't work, please ask for help at the moonlight-list (http://lists.ximian.com/mailman/listinfo/moonlight-list) - attach the summary output of moon's autogen.sh from the above instructions and the output of running your browser from a terminal like this:

 export MOON_TRACE=E:all
 firefox http://silverlight.net/showcase

If you want to install into a different prefix, you'll want to follow the instructions here: Parallel Mono Environments

By default Moonlight will be configured to include everything it can according to the installed dependencies, most parts can be disabled if they cause problems (running configure --help will list the available options).

If you get errors about gtk-sharp and you only want the browser plugin, you can pass --disable-desktop-support to moon's autogen.sh.

Creating the XPI is done from the toplevel moon/ directory by running "make user-plugin" (this is not needed unless you want to install moonlight on another machine without building it there).

Packaging

Packaged versions of Moonlight for your browser are available at: http://www.go-mono.com/moonlight/ this will install Mono as a browser extension (add-on in Firefox).

Moonlight packages should also be available through your distribution.

Distributions tracking the packaging process of Moonlight here:

Development Notes

Users interested in details about the implementation of Moonlight can read our MoonlightNotes.

Specification details that are not very obvious can be found in MoonlightQuirks