How to install Opensim on Mac OSX - The Geeky Way...

...there is an easy way and a hard way, this is the hard way :)

Edited by: SP


I had barely worked in the Terminal before I tackled Opensim. I suspect many Mac folks are the same way. Most command line tutorials assume you know what to do with their instructions. But not everyone is a developer or a Unix administrator. It's really fairly simple once you know how to proceed. If you think this might be a bit tricky then head on over to the companion tutorial: How to install Opensim on Mac OSX - The Easy Way

So here goes...

1. Install the Mono Framework, you can get the .dmg file here

What is this? It is a bit of coding magic that runs Windows programs on an Intel Mac without requiring that you run Bootcamp or Parallels. It comes as an installer so there is no command line work required to install it.

2. Download, install and build Opensim from the Subversion (svn) repository

What does this mean? it is really just a low-level install of the program elements, bypassing your desktop and the usual way you install a program on the Mac. It takes all the pieces from the developers' storage site (svn) and builds an "executable". This usually happens behind the scenes in software install. This way you get to see some of it as it happens, scrolling by in the Terminal window.

Make sure you are in your user folder. If there is just one user on your machine, the one that you are in when you first turn it on, you don't need to do anything. In this installation Opensim will install in the top level of that user, alongside Documents, Music, Applications, etc. - it will not go into the applications folder. Don't worry if this is confusing now - you will see where it goes in just a few minutes.

Open the Terminal program. It can be found in the main Applications folder, inside of the Utilities folder, on the top level Macintosh HD level, not in the User Applications folder. In fact, you may want to drag the Terminal application icon into the dock, so you can find it again easily.

image001

 

One line at a time, carefully copy each of the following lines into the Terminal window at the $ prompt, and hit return. Some of the commands will trigger long sequences of loading and scrolling of text - don't worry, just let it go until you see the $ prompt again.

svn co http://opensimulator.org/svn/opensim/branches/0.6.4-post-fixes opensim
cd opensim
./runprebuild.sh
nant

Here's a detailed look at the screen when you are running these commands. Your prompt will differ - it will show your user folder name and the $.

image002

 

image003

 

The next commands are cd opensim (return) and ./runprebuild.sh (return), as seen below.

image004

 

Wait until you see the next prompt…

image005

 

and then type nant and hit return

image006

 

You will watch many build pages go by until you finally see that the build has succeeded.

image007

 

Congratulations! You have installed all of the opensim software, and now you are ready to configure it.

3. Duplicate the example initialization file, and make it your working ini file

Go to the Finder, and look in your user folder for the opensim folder. Look in there for the bin folder.

image008

 

Open that folder and find the OpenSim.ini.example .

image009

 

Right click or control-click on the filename and choose duplicate.

image010

 

On the copy, change the ending on the filename - remove .example, leaving only OpenSim.ini as the name.

image011

 

Make sure you have a file now that is called Opensim.ini

image012

 

4. Run your new server:

Go back to the Terminal window.

You will need to use Terminal commands to move a level down in the User folder, in order to be on the right level to run the application. That can be done with the cd (change directory command) in one operation.

Terminal always shows which directory you are in. You should still be in the opensim directory, so this command will take you down to the right level:  cd bin

image013

 

Now you will run the OpenSim app using Mono. Make sure you get the uppercase characters right.

mono OpenSim.exe

The startup process will scroll for 5-15 seconds, until you are asked for configuration information. Name your region at the first prompt and hit return. You can then hit return at each item and keep the defaults until you get to avatar name.

 image014

 

You may want to set up your user name and password to match your Second Life login, if you have one.

image015

 

Finally you will see the words Region (yoursimname) #

image016

 

And you will know that the sim is waiting for you to connect, using the viewer.

5) Open the Hippo Viewer Client and see your world

 

There is a Mac build of the 0.4 Hippo viewer here

image017

 

Download and install the Hippo viewer if you have not already done so. When it opens, hit the Grids button on the bottom menu bar. In the window that pops up, use the top dropdown to choose "local" - the parameters of your server will populate the page. That is really just the internal IP address and port - 127.0.0.1:9000. If you will be using your local sim often, you can hit the default button at the top to make this the default region. Click Apply and OK. The window will disappear, the background will be black.

 

Login using the username and password you entered above. You will arrive in your new world as Ruth - a generic avatar.

image018

 

Open inventory, go to Create at the top of the window, and create a new body shape and a new skin - this is necessary because otherwise they will be locked when you go to edit appearance. Right-click or control-click on the avatar, choose edit appearance, and edit your avatar. You will find yourself on one little circular island. Use edit terrain tools to change it, or load an OAR file. Also see below instructions regarding physics engine choice.

At this point you can shut down the server and return to do further configuring later. To do that, first quit the Hippo viewer, then go to the Terminal window and type control-c at the prompt. Once the $ prompt returns, you can quit Terminal.

 

To start the Opensim server up the next time you use it, you can open Terminal and use the following commands to start up Opensim.

image019

 

WHAT ABOUT PHYSICS? - How not to walk through walls

We are changing the physics engine from the default (basicphysics) to ODE - OpenDynamicsEngine. The BasicPhysics engine only detects collisions between your feet and the ground - you will find your self walking through walls and unable to stand on any floors that you build.

You will make changes in OpenSim.ini which is in the bin folder inside the opensim main folder. Open the file in Textedit or another text editor, like SubEthaEdit.

The first section you will change is the Physics section, which starts with comments like this:

; ##
; ## PHYSICS
; ##

Look for the lines which determine the physics engine. You will change this:

; Choose one of the physics engines below
physics = basicphysics
;physics = POS
;physics = OpenDynamicsEngine
;physics = modified_BulletX

to this:

; Choose one of the physics engines below
;physics = basicphysics
;physics = POS
physics = OpenDynamicsEngine
;physics = modified_BulletX

The difference is just two semicolons - you will put one in front of physics = basicphysics and remove the one in front of physics = OpenDynamicsEngine

 


The other changes are in Avatar Control, where the heading looks like this:

; ##
; ## Avatar Control
; ##

Find these settings and make sure they match the following:

;girth of the avatar.  Adds radius to the height also
av_capsule_radius = 0.68 ; Max force permissible to use to keep the avatar standing up straight av_capsule_standup_tensor_win = 1900000 av_capsule_standup_tensor_linux = 1900000 ; used to calculate mass of avatar ; float AVvolume = (float) (Math.PI*Math.Pow(CAPSULE_RADIUS, 2)*CAPSULE_LENGTH); ; av_density * AVvolume; av_density = 80

Save the OpenSim.ini file back into the bin folder, being careful not to change the filename.

That's it! Now you have a standalone sim, an avatar, and a world to start modifying and building.

Article tagged: OpenSim | howto | MacOSX | Tutorial | Standalone

We recommend that you discuss this article on Think, but if you really want to you can leave a comment right here as well:

13 comment(s) for “Opensim on Mac OSX - The Geeky Way”


Gravatar of Aenea Nori Aenea Nori said on Tuesday, April 28, 2009 (8:38:22 AM)
Dave, congratulations on a great post! I'd been meaning to write up my own installation process on OS X, but kept procrastinating... your *two* versions are SO much better than mine would've been. :)

What I've found difficult with OpenSim after the richness of SL is starting up in a totally barren world -- no skin, no shape, no hair, no buildings, no textures... after a few days I stopped having as much fun with it, I think, but I hope to pick it up again soon. :)
Gravatar of Tenuki Tenuki said on Tuesday, May 26, 2009 (7:26:12 PM)
If you get an error running 'nant' you need to fix it:

1) 'sudo vi /usr/bin/nant'

2) add the line 'export
PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig' after the first line and before the second.
Gravatar of Tenuki Tenuki said on Tuesday, May 26, 2009 (9:50:26 PM)

http://www.opensim.talentraspel.de/downloads
Gravatar of Bailey Bailey said on Tuesday, June 09, 2009 (10:04:53 PM)
Thanks so much, this will help!
Gravatar of tenuki tenuki said on Wednesday, July 15, 2009 (8:05:08 PM)
Have this running with the latest mono from novel and opensim_0.6.5-post-fixes from svn.

get the physics engine at:

svn co http://opensimulator.org/svn/opensim-libs/trunk/unmanaged/OpenDynamicsEngine

and copy the resulting lib to the directory OpenSim.exe is or just do a system install.

Also need to get the openjpeg lib at:

svn://opensecondlife.org/libsl/libopenmetaverse/trunk

and copy the resulting lib to the OpenSim.exe directory as well.
Gravatar of Tenuki Tenuki said on Friday, July 17, 2009 (1:54:44 AM)
after upgrading mono to 2.4.2.2 nant requires the same edit, but with the following all on one line...

export
PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig:
PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/2.4/lib/pkgconfig

this is assuming you have 2.4 installed ...
Gravatar of Kitsune Kitsune said on Saturday, July 18, 2009 (7:22:27 PM)
Tenuki...

Which file do you edit for this to work? nant.sh or nant.bat?
Gravatar of Kitsune Kitsune said on Saturday, July 18, 2009 (8:01:20 PM)
or does this just go in the terminal window?
Gravatar of Kitsune Kitsune said on Saturday, July 18, 2009 (9:39:28 PM)
ok got it that it's in sudo. I hate to sound like the noob that I am but how do you edit this?
Gravatar of Tim Tim said on Saturday, July 25, 2009 (9:11:00 PM)
Kitsume, add that line to /usr/bin/nant. Although, I still can't get it to work. Still get the Failed to initialize the 'Mono 3.5 Profile' (mono-3.5) target framework. error. Anyone have ideas?
Gravatar of Jim Jim said on Saturday, January 30, 2010 (10:24:22 AM)
Hi all. I'd be grateful for some help. Knowing very little about the terminal (I use Mac OSX) I ran the Opensim startup but may have done something wrong when it came to naming the username which i left blank and naming the region.

When I start up Hippo viewer the screen does go black but I get the message "You must have an account to connect to a local host"

Do I need somehow to redo the startup ?
Gravatar of Jim Jim said on Saturday, January 30, 2010 (10:24:23 AM)
Hi all. I'd be grateful for some help. Knowing very little about the terminal (I use Mac OSX) I ran the Opensim startup but may have done something wrong when it came to naming the username which i left blank and naming the region.

When I start up Hippo viewer the screen does go black but I get the message "You must have an account to connect to a local host"

Do I need somehow to redo the startup ?
Gravatar of Sean Sean said on Saturday, February 06, 2010 (5:44:33 AM)
I think the defaults is "test in all cases. So try
First name = test
Last name = test
Password = test