I am alone on a small island that is about the size of a roundabout in the middle of a vast ocean. With my ghostly body I look up at the night sky and contemplate what to do next. Maybe I will make the sun rise, build some more land or just read some more of the wiki. I've just installed OpenSimulator (a.k.a. OpenSim), a "3D Application Server". What this means is that it can be used to host "virtual worlds", a bit like SecondLife. In fact you can use the SecondLife Viewer as a client for it. After hearing about at various points for quite a while and finding a really good set of instructions on how to set it up, I couldn't resist having a go, even though creating virtual worlds is a bit of an excursion for me.
A little while ago I bookmarked a blog post from Bob Sutor with the title Virtual Life with Linux: Standalone OpenSim on Ubuntu 9.10. This is a great post and gives you a complete guide on how to get OpenSimulator installed, running and how to connect to it with the SecondLife Viewer. Reading the post it looked like wouldn't be too complicated to have a go. In the end I followed the guide, but with a couple of major differences, firstly I didn't compile OpenSimulator from source, instead I used pre built, but unofficial, packages from a repository and secondly, I configured it to use MySQL for storage instead of SQLite so that I could have a look around the generated databases. Also I am running the Ubuntu 10.04 (Lucid) Beta.
OpenSimulator uses Mono, an open source implementation of the Microsoft .Net framework. Be aware that some concerns have been raised about possible difficulties about the relationship between Mono and some Microsoft patents. For more information see: http://en.wikipedia.org/wiki/Mono_(software)#Mono_and_Microsoft.E2.80.99s_patents.
On the OpenSimulator website there is a link to some Unofficial "Deb" packages that can be used with Ubuntu and Debian systems (if you are using another operating system check out their website for other options). I added the "releases" repository and followed the instructions to install the "opensimulator" package. The package installs everything for you, but you need to some configuration work before OpenSimulator can be launched.
Firstly, I wanted to be able to run OpenSimulator under my normal user account (as it was just for experimentation). The package adds a user and group called "opensim", so the first thing to do was to add myself to that group with the command:
sudo usermod -a -G opensim YOUR_USERNAME
Then I added write permission on the OpenSimulator directories for the opensim group so that a member of this group can run the program:
sudo chmod g+w /var/log/opensim
sudo chmod -R g+w /usr/lib/opensim
Of course the way I have set it up may well not be the best method! Further work would be needed to make it run on a server properly. Now you can start setting up the configuration file. Make a copy of the OpenSim.ini.example file and rename it to OpenSim.ini in the same directory:
cp /usr/lib/opensim/bin/OpenSim.ini.example /usr/lib/opensim/bin/OpenSim.ini
There are lots and lots of options to explore in this file. You can rename your world, change the laws of physics and change the pull of gravity if you feel like it. Also there is an option to connect up your installation to an instance of FreeSwitch if you want to enable voice communication in your world. The options I changed were all for MySQL support. After setting up a database I went through the config file and commented out the many places it refered to SQLite and entered the MySQL connection details below. There are about five places where you need to make this change. If you don't want to do this it should run under SQLite without issues. The steps needed are documented at: http://opensimulator.org/wiki/Mysql-config.
Now it should run! Start the server with these commands:
cd /usr/lib/opensim/bin/
mono OpenSim.exe
If all goes well you will be asked some configuration questions. I followed Bob Sutor's instructions and accepted default values for everything except:
Region name: Zeus
Master avatar first name: Master
Master avatar last name: Avatar
Master avatar password: passw0rd
The server should now start up and you should find yourself at a console that is the root access to your world! Type "help" to find out some of what you can do. The prompt will like this:
Region (Zeus) #
If you haven't got the SecondLife viewer installed grab a copy at: http://secondlife.com/support/downloads/ and extract it somewhere in your home directory. There are also other viewers available too, but I haven't tried them yet, so if you know of a good one please mention it in the comments. As in Bob Sutor's post launch the SecondLife viewer with a special command to get it to connect to the local OpenSimulator installation instead of SecondLife itself (make sure you are in the directory where the SecondLife Viewer is located):
./secondlife -loginuri http://127.0.0.1:9000/ -loginpage http://127.0.0.1:9000/?method=login
Log in with the "Master Avatar" account by entering the details at the bottom of the screen and you should quicly find yourself a ghostly figure on a small roundabout in a vast ocean.... You can of course use all of the options in the client to make yourself into a more recognisable figure and change the land around you. If you want a bigger world check out Bob Sutor's instructions on adding regions.
I've only dipped my toe into the virtual water of this very interesting looking software, it looks like hours could be spent setting up virtual worlds and it would be interesting to experience OpenSimulator when lots of people are on a server instance too. Even though this is not the sort of technology I usually work with, it was worth experimenting with it to broaden my experience and to see what is involved in the task of creating a virtual world.
Re: Creating a virtual world inside a laptop with ...
Liam --
Congratulations on becoming one of the pioneers of OpenSim!
Please let me know if you plan to hypergrid-enable your world so that you can travel around the hypergrid, and so that others can visit you. We can add your world to our hypergrid directory (http://www.hypergridbusiness.com/worlds)
You should also check out the Diva Distro of OpenSim. All the configuration details are taken care of, and it even comes with an upgrade utility (saves a LOT of time -- OpenSim is developing quickly, and it's a pain in the butt to migrate to newer versions manually).
The Diva Distro is also hypergrid-enabled by default, so you can travel in and out of your little world to the huge universe out there of other virtual worlds. And yes, you can bring your avatar with you. You can even go shopping on other worlds, or visit freebie stores, and bring stuff back with you.
You can get the Diva Distro here: http://github.com/diva/diva-distribution/downloads
Learn how to hypergrid here: http://www.hypergridbusiness.com/worlds/how-to-travel/
--- Maria Korolov
Editor, Hypergrid Business
http://www.hypergridbusiness.com
Re: Creating a virtual world inside a laptop with ...
This is all excellent stuff! I too have just got my laptop running as a server and viewer. I have asked the real-geeks at work to create a server version behind our firewall so that we can all use it here at work. I have found that its taken AGES to set up, and lookforward to the viewer 2 etc. . .