As a complement to my Life with Linux blog series, I’m introducing another series which explores what I can do in virtual worlds and immersive Internet environments on Linux.
Last night I decided to play with OpenSim, aka OpenSimulator, which is, according to its website:
OpenSimulator is a 3D Application Server. It can be used to create a virtual environment (or world) which can be accessed through a variety of clients, on multiple protocols. OpenSimulator allows you to develop your environment using the technologies you feel work best – we’ve designed the software to be easily extendable through loadable modules to build completely custom configurations. OpenSimulator is released under a BSD License, making it both open source, and commercially friendly to embed in products.
I’ve fiddled with it before, but never really got something up and running very long. My new plan is experiment with opensim locally and then install it on my SliceHost account so I can access the virtual world regions from anywhere. My goals for last night were simple:
- Download and install OpenSim on my desktop running Ubuntu Linux 9.10 “Karmic Koala.”
- Create four regions arranged in a square and start them off with perfectly flat terrain. I planned to call the four regions Zeus, Hera, Athena, and Poseidon.
While OpenSim can run on several platforms including Mac OS X, Windows, and various flavors of Linux, I’m only focusing here on Ubuntu 9.10. Consult the wiki to see what variations of what I say below you will need for your platform.
I would call OpenSim an “extended subset” of Second Life. I used the Second Life viewer on Linux, though there are others available as well. OpenSim is written in Mono, the Microsoft .Net open source clone by Novell. On some systems you will need to install Mono if you want to try this. On Ubuntu 9.10, almost everything I needed was already there.
In recipe fashion, here’s what I did to accomplish my goals above. Note that this is pretty gorpy in terms of Linux shell commands and I’ve assumed you know what to do with compressed tar files. To be honest, I didn’t quite discover all this in the order presented, but this should work for you. That is, you get the benefit of my hindsight.
The only point of this is to get OpenSim up and running as a basis for further learning and explanation. By the time I get much further into this, I expect the configuration to be more sophisticated. You can certainly change the names of your regions or have more or fewer of them.
Install missing components for building OpenSim
sudo apt-get install nant sudo apt-get install mono-mjs libmono-microsoft8.0-cil
Download OpenSim
This page in the wiki has the information about download the latest version of OpenSim. You can either use Archive Manager or tar to extract the files. I put the OpenSim directory in my user home directory and renamed it opensim.
Compile OpenSim
Open a console window and …
cd cd opensim ./runprebuild.sh nant cd bin cp OpenSim.ini.example OpenSim.ini
Get the Second Life viewer
Go to the Second Life download page and get the viewer for Linux. I installed the directory in my user home directory. Rename it SecondLife.
Start up OpenSim
Go to the console window in which you compiled OpenSim above and …
mono OpenSim.exe
This will run for a while. When it starts asking you for values, accept all the defaults except for the following:
- For region name, specify Zeus.
- For master avatar first name, specify Master.
- For master avatar last name, specify Avatar.
- For master avatar sandbox password, specify passw0rd.
You should now be in the OpenSim console. You will need to return to this later.
Start up and shut down the Second Life viewer
Start up a new console window, and assuming you did name the Second Life directory as SecondLife, do the following …
cd SecondLife ./secondlife -loginuri http://127.0.0.1:9000/ -loginpage http://127.0.0.1:9000/?method=login
At the very bottom of the screen (not the form in the middle of the screen), logon with the avatar information above:
- For master avatar first name, specify Master.
- For master avatar last name, specify Avatar.
- For master avatar sandbox password, specify passw0rd.
If all goes well, you should have a female avatar in strange clothes floating slightly above a small round island. So far so good! Now go to the menu and quit the Second Life viewer.
Shut down OpenSim and add three more regions
Go back to the terminal window where you have the OpenSim console window running and issue the quit command. You should now be back at the shell prompt.
Issue
cd Regions gedit Regions.ini
You should see something that looks like
[Zeus] RegionUUID = 06b3ae3e-13fe-4ee6-ad60-3e5692098b36 Location = 1000,1000 InternalAddress = 0.0.0.0 InternalPort = 9000 AllowAlternatePorts = False ExternalHostName = SYSTEMIP MasterAvatarFirstName = Master MasterAvatarLastName = Avatar MasterAvatarSandboxPassword = passw0rd
though the RegionUUID will be different. Select that block in the file and make three additional copies of it in the file. The name in brackets at the top is the region name. We’ll want to change the three subsequent region blocks to be [Hera], [Athena], and [Poseidon]. Increment the internal ports to be 9001, 9002, and 9003 in the three later region blocks. For each of the RegionUUID fields in the three new regions, change the last digit so that the four fields have unique, different values.
Finally, modify the Location fields as shown in the following example. When done, save the Regions.ini file.
[Zeus] RegionUUID = 06b3ae3e-13fe-4ee6-ad60-3e5692098b36 Location = 1000,1000 InternalAddress = 0.0.0.0 InternalPort = 9000 AllowAlternatePorts = False ExternalHostName = SYSTEMIP MasterAvatarFirstName = Master MasterAvatarLastName = Avatar MasterAvatarSandboxPassword = passw0rd [Hera] RegionUUID = 06b3ae3e-13fe-4ee6-ad60-3e5692098b37 Location = 1000,1001 InternalAddress = 0.0.0.0 InternalPort = 9001 AllowAlternatePorts = False ExternalHostName = SYSTEMIP MasterAvatarFirstName = Master MasterAvatarLastName = Avatar MasterAvatarSandboxPassword = passw0rd [Athena] RegionUUID = 06b3ae3e-13fe-4ee6-ad60-3e5692098b38 Location = 1001,1000 InternalAddress = 0.0.0.0 InternalPort = 9002 AllowAlternatePorts = False ExternalHostName = SYSTEMIP MasterAvatarFirstName = Master MasterAvatarLastName = Avatar MasterAvatarSandboxPassword = passw0rd [Poseidon] RegionUUID = 06b3ae3e-13fe-4ee6-ad60-3e5692098b39 Location = 1001,1001 InternalAddress = 0.0.0.0 InternalPort = 9003 AllowAlternatePorts = False ExternalHostName = SYSTEMIP MasterAvatarFirstName = Master MasterAvatarLastName = Avatar MasterAvatarSandboxPassword = passw0rd
Note that OpenSim wiki has all sorts of information about what all this information means.
Restart OpenSim
In the terminal where you were running OpenSim, do …
cd .. mono OpenSim.exe
You should see a lot of mention of Hera, Athena, and Poseidon in addition to Zeus.
Flatten the terrain and go back in world
In the OpenSim console …
terrain fill 21
Note that I am changing everything at once here. Learn more about change region to modify the terrain region by region.
Go back to the terminal shell and restart the Second Life viewer …
./secondlife -loginuri http://127.0.0.1:9000/ -loginpage http://127.0.0.1:9000/?method=login
and log in as before. Your avatar should be in the middle of a vast four region flat space.
![]()
Other considerations
I’ll be exploring other aspects of this with variations in future entries. In the meanwhile, if you want to improve your avatar and change the gender, go into the Inventory in the Second Life viewer and create a new shape, skin, hair, and eyes. Right click on them and wear them. Then edit your appearance to adjust what you look like. In the same way, you can make some new basic clothing. I’ll explore getting better clothing as well as doing more sophisticated region manipulations later.
Update on February 20: I decided to try to create a megaregion, an OpenSim-specific feature that allows you to combine more than one sim into a single instance. All I needed to do in the above configuration was to edit the OpenSim.ini file in the bin directory to include the line
CombineContiguousRegions=true
and then restart the server. Land coordinates now went all the way to (512, 512) rather than just (256, 256) and the whole megaregion was called Zeus. Megaregions have the advantage of getting rid of the annoying delays when crossing region boundaries and they use less server memory and fewer processing resources. The feature is considered experimental and some things do not work. For example, I wasn’t able to terraform smoothly across region boundaries.
Next: Virtual Life with Linux: Free textures



There are much easier ways to do this. OSGrid has a self-installing OpenSim version that automatically configures everything for you — including router settings.
And the Diva Distro is a nice option if you want a four-region megaregion (no border crossings!) and hypergrid enabled — which means you can teleport from your own little grid to many of the other grids out there in the OpenSim universe.
More info on both here: http://www.hypergridbusiness.com/faq/whats-the-easiest-way-to-install-opensim/
And for a list of grids you can hypergrid teleport to: http://www.hypergridbusiness.com/2010/01/december-hypergrid-list/
– Maria Korolov
Editor, Hypergrid Business
http://www.hypergridbusiness.com
Maria, thanks for the pointers! My intention with the article was to be more of a start-from-scratch guide since in the future I want to compare it with other environments. I’ll definitely look at your links as I think about moving from my local machine to the web.