You could do what MonoDevelop does to find the location of Mono. This is based on finding the location of an assembly and then going back up four directories to find the prefix where Mono is currently being used from.
The location of the assembly containing int is first found.
string location = typeof (int).Assembly.Location;
Then you go up four directories to find the prefix. MonoDevelop does this with the following code where up is set to 4.
static string PathUp (string path, int up)
{
if (up == 0)
return path;
for (int i = path.Length -1; i >= 0; i--) {
if (path[i] == Path.DirectorySeparatorChar) {
up--;
if (up == 0)
return path.Substring (0, i);
}
}
return null;
}
string prefix = PathUp (typeof (int).Assembly.Location, 4);
This will give you the prefix, usually /usr or /usr/local, and then you can append bin to find the directory where Mono is being run from.