Moonlight on Ubuntu Linux 8.04 Hardy Heron
May 13th, 2008Running Silverlight applications in Firefox under Linux is still pretty complicated. There doesnt seem to be any choice but to compile and install from the source code and the build instructions on the Mono project site are a little confusing.
This is a quick HOWTO. Thanks to Dan for his help. Any comments / feedback appreciated!
Starting from a clean install from ubuntu-8.04-desktop-i386.iso
First install subversion:
sudo apt-get update sudo apt-get install subversion
Then we can create a directory for all the source code which we then retrieve from the Mono project repository.
mkdir src cd src svn co svn://anonsvn.mono-project.com/source/trunk/mcs svn co svn://anonsvn.mono-project.com/source/trunk/mono svn co svn://anonsvn.mono-project.com/source/trunk/gtk-sharp svn co svn://anonsvn.mono-project.com/source/trunk/gnome-sharp svn co svn://anonsvn.mono-project.com/source/trunk/olive svn co svn://anonsvn.mono-project.com/source/trunk/moon svn co svn://anonsvn.mono-project.com/source/trunk/monodoc
Before we can build the source, we must install the necessary build tools and dependent libraries:
sudo apt-get install build-essential bison libglib2.0-dev mono-mcs sudo apt-get install autoconf libtool automake sudo apt-get install libpango1.0-dev libatk1.0-dev libgtk2.0-dev libglade2-dev sudo apt-get install libgnomecanvas2-dev libgnome-dev libgnomeui-dev libgnomeprint2.2-dev sudo apt-get install libgnomeprintui2.2-dev libpanel-applet2-dev firefox-2 firefox-2-dev sudo apt-get install libavutil-dev libavcodec-dev librsvg2-2.18-cil libswscale-dev sudo apt-get install libtiff4-dev libgif-dev libexif-dev sudo apt-get install libxul-dev libasound2-dev sudo apt-get install monodevelop
Now we can build Mono and the Mono C Sharp Compiler (MCS):
cd mono ./autogen.sh --with-moonlight=yes --prefix=/usr make sudo make install
Then build Olive:
cd ../olive ./configure --with-moonlight=yes --prefix=/usr make sudo make install
Then build GTK Sharp:
cd gtk-sharp ./bootstrap-2.12 --prefix=/usr make sudo make install
Then build monodoc:
cd ../monodoc ./autogen.sh --prefix=/usr make sudo make install
Then build Gnome Sharp:
cd ../gnome-sharp ./bootstrap-2.20 --prefix=/usr make sudo make install
Then build Moon:
cd ../moon ./autogen.sh --with-mono=yes --with-swscale=yes --prefix=/usr make sudo make install
The final build step is to install the plugin for Firefox so that we can run Silverlight applications from within the browser.
make test-plugin
Now we can test things out using Firefox 2. Start Firefox from the command prompt like this:
firefox-2 &
From the browser, check that the Silverlight plugin is indeed installed by typing about:plugins into the address bar. If everything is working properly, you should see the Moonlight / Silverlight plugin listed.
Now browse to http://silverlight.net and away you go!

