mopen, mopen1 - Application launcher (including Mono, Moonlight and Silverlight).
mopen [options] file [arguments...]
The mopen command is a tool to open applications, XAML files or
packages that contains executables, images and other resources in a
directory, it is designed to launch Silverligh 2.0 applications. For
testing only 1.0 applications use the mopen1 command.
In addition to launching these applications, it is possible to run
multiple applications using the same Mono virtual machine. This is
useful for example if you want to run a collection of small
applications, gadgets or widgets and do not want to pay the price of
memory consumption of running one entire virtual machine for every
application. This is achieved by using Mono Application Domains: the
equivalent to processes within a Mono virtual machine, and it is the
same infrastructure used by ASP.NET applications to run multiple
isolated applications in the same virtual machine.
In its simplest incarnation, you can open a XAP file like this:
$ mopen /opt/myapp/test.xap
This will load the test.xap file which is a self-contained Silverlight
It is possible to also load 1.0-style Silverlight applications
by passing it a XAML file and using the mopen1FP command instead:
$ mopen1 /opt/myapp/test.xaml
This will laod the xaml file and all of the dependencies it might have
from the directory where test.xaml is located.
mopen also supports launching these applications if they are contained
in a directory thta is on the PATH and such directory contains a file
called "default.xaml" or "main.exe".
In the case of applications that start up from XAML, the default
size of the window will be the one specified for the Canvas unless the
--geometry option has been used
With this configuration it is possible to have entire applications
that are packaged in a directory and can be deployed and copied by
copying the entire directory (drag and dropping the directory, using
cp -a, or any other mechanism to copy a directory).
The following options are available:
Passes the flag --debug to the Mono runtime, enabling a line numbers
and a couple of other debugging features.
This starts up Mono with gdb and prints out the command that you
should use to debug mopen. This is useful when debugging XAML files
that cause problems with Moonlight.
Turns on desklet mode. In this mode the window decoration is not
shown and the default rendering mode will enable alpha transparency.
This means that anything painted with an alpha channel will be
Makes the toplevel window fixed, prevents the user from resizing it.
--geometry=GEO, -g GEO
Sets the geometry of the window to be GEO, the format for this is
WIDTHxHEIGH where WIDTH and HEIGHT are integers, for example:
mopen -g 1024x768
Loads the application into the host identified by NAME. If no host
is specified this application is loaded into its own virtual machine
and can not be shared with others.
Triggers one by one all the named Storyboards in the given XAML file
when you click on the canvas surface.
Parse the XAML file but does not open a window. Useful for testing.
Runs the storyboard named N1 when the mouse is clicked (this is the
x:Name property on the XAML file). The storyboard playback will cycle
if you keep clicking. You can use it like this:
Enables the alpha channel on the rendering surface. Any areas that
are rendered with non-opaque values will be properly composited
against the underlying background by the system compositing manager.
Close the mopen window after X seconds. Useful for testing.
SHARING A VIRTUAL MACHINE
To load multiple independent applications into a single virtual
machine (the virtual machine will isolate each application from each
other using Application Domains, or AppDomains) you use the --host
option with the name of the domain where you want to load your
For example, if you wanted to load various desktop gadgets on a single
process, you would load them like this:
You could load a separate set of programs on another VM, for example
while developing code that might be unstable:
mopen --host devel mytestapp
To load a desklet, you would use:
mopen --desklet mydesklet
When a file is specified, if it exists on the current directory, that
one is loaded, otherwise directories on the PATH are searched and if
they contain the file
or the file
Those are loaded and launched