Initial preparations

Before running MAFW applications, one should ensure the environment is properly setup.

The first thing that should be checked is the playlist daemon. This manual will cover the playlist daemon in more detail in later sections, but for now it is enough to know that this daemon provides the means to access and manipulate playlists to applications.

In order to run the playlist daemon, one should execute the following command:

mafw-playlist-daemon -d
    

Also, if the decision has been made to use out-of-process plugins, one must be sure these plugins are running (remember that out-of-process extensions live in separate processes).

There is a tool to load out-of-process extensions called mafw-dbus-wrapper. In order to load a particular plugin in out-of-process mode do the following:

mafw-dbus-wrapper PLUGIN &
    

This command will load the specified plugin, searching for it in the MAFW plugin directory, and set the program as a daemon. Sometimes one may want to load a plugin that is not located at the plugins directory. For this purpose, mafw-dbus-wrapper also accepts absolute paths to plugin files:

mafw-dbus-wrapper /home/user/mafw-plugin/bar-mafw-plugin.so
    

Usually, one would not invoke mafw-dbus-wrapper directly, instead, it is recommended to create an init script to start all the plugins and the playlist daemon at boot time. Something like this:

/etc/init.d/mafw [start|restart|stop]
    

As with many other Maemo components, take into account that running commands in a Scrathchbox environment requires additional environment preparations. Particularly, the Maemo environment has to be started in the first place, and then any shell commands must be run using the run-standalone.sh script, so they are get appropriate environment settings:

export DISPLAY=:2
sb-fremantle-init.sh start
run-standalone.sh mafw-playlist-daemon -d
run-standalone.sh mafw-dbus-wrapper PLUGIN &