OpenSim Command Line A-Go-Go!
Okay, I was going to save all this stuff for a nicely crafted tutorial – but I realize that some of you may be chomping at the bit here. So, here’s a few command-line things to get you even *deeper* into OpenSim-ing.
I’ll just break it down into simple “how do I…” here.
(All of these assume you are staring at the dos-like window that your OpenSim server is running in. That would be the small window with the “Region#” prompt in it.)
“How do I change my terrain?”
Pretty easy to do, but first, type ‘help’ at the command line, followed by the <Enter> key.
Lots of commands to play with! The one that we’re interested in is at the very end. Luckily the developers have a sub-help list for this, so type ‘terrain help’ at the command line, followed by <Enter>.
Scads more commands! You should see things like “load”, “load-tile”, “save” now being displayed in a handy list. The command we’re interested in is “load”.
My experience is with .raw files, but the formats OpenSim supports is: .r32 (RAW32), .f32 (RAW32), .ter (Terragen), .raw (LL/SL RAW), .jpg (JPEG), .jpeg (JPEG), .bmp (Windows Bitmap), .png (PNG), .gif (GIF), .tif (TIFF), .tiff (TIFF)
So, to load a .raw file (which a lot of you may already have some experience with, since it is the heightfield map that SL supports) you’d type “terrain load myname.raw” (Be warned, unless you use ‘change-region <simulator name>’ you are applying this command to *everything* running on your box!)
Feel free of course, to try out the other formats, though it may be a good idea to keep your source image sizes divisible by two, just like how you upload textures to SL.
To make this your default terrain, type “terrain bake”.
Other useful commands are “terrain elevate” which will raise (in meters) your terrain if it is too low, “terrain lower” which does the opposite, and if you totally and utterly mess up – it is okay, either type “terrain revert” which will put your terrain back to where you set it with the bake command, or alternately you could start all over and type “terrain fill <level in meters>” for a flat filled plane at whatever height you wish.
“How do I change my appearance?”
This is a bit easier, but for now I’ll have to lay off the steps needed to make all of your changes persistent – you’ll have the settings saved in the body shape and other things you edit, you’ll just have to drag them on to yourself again (if you’re using the default SQLite implementation for OpenSim – which you probably are) every time you login.
Inside the viewer (I’m assuming here you are using the SL default viewer I’ve referred to in my other tutorial) you’d select “Inventory” (Or use the keyboard shortcut Ctrl-I) then expand the directory “Body Parts”. There won’t be anything here, but we’re going to change that.
Right-Click the Body Parts folder, and select from the popup menu “New Body Parts” and proceed to create new shape, skin, hair and eyes for yourself. After you’ve done this, right-click on the new items and proceed to wear them.
This will allow you now to edit your appearance. Make sure to save your changes! The next time you login, you’ll have to re-wear these to change your appearance, but I’ll be helping out later with a tutorial on how to use the proper setup to have things be worn automatically. (These changes only apply to your personal OpenSim Simulator, so don’t worry about your main appearance on other grids changing – they won’t!)
“How do I save my objects?”
If you followed along with my other tutorial, you should have your OpenSim Simulator set up for object persistence. The key thing to check for here is the line in opensim.ini that says storage_plugin = “OpenSim.Data.Null.dll” if this *doesn’t* have a semi-colon in front of it, then you are *not* set up properly to have objects persist between simulator shutdown and restart!
To verify that you have this set properly – there should be a semi-colon in front of the above referenced line, and you should have at a minimum, the lines:
storage_plugin = “OpenSim.Data.SQLite.dll”
This means you are using SQLite as your object database. Unless you have these two lines uncommented (no semi-colon in front!), your objects will *not* be around the next time you reload your sim!
Lets say you’ve built something pretty cool and you want to export it for later tinkering in another sim you have in your network, or you just like the idea of backing up your region. Just use the “save-xml2 <filename>” command. This will save an XML file in your opensim/bin/ directory containing all objects that are in your simulator!
If you’ve made a mistake, or just feel like loading things – you can use the “load-xml2 <filename>” command to bring objects into your sim that you’ve saved before.
“How do I get someone on my home network connected so I can show off my stuff?”
I’m including this because I’m sure it is a common question. Yes, you can have people connect from the internet, but I don’t have *that* much time today, so I’m going to put out the simpler solution of having someone on your same network connecting.
This assumes that you have two computers on the same network, such as 192.168.x.x
Navigate to your opensim/bin/regions/ directory on your machine.
If you’ve already gone through the tutorial, you should have a file called “default.xml” sitting there.
(if not, you’ll have to use the “create-region <sim name> <simname.xml>” command, accepting the defaults for now.)
Right-click this file, and select “Edit” – this should pop it up in notepad. Alternatively, you could just open up notepad and select this file to open from there.
You’ll see some text within – the part we’re interested in is the line:
You’ll need to change this to your machine’s network address. (To find out what this address is, go to Start –> Run type in “cmd”, then in the new dos-box command window, type “ipconfig” and you’ll see your ip address.)
For example, if your machine’s IP is 192.168.1.100, you’d change this line to:
From here on out its a bit easier, all you have to do now is have the person who is connecting create a new viewer shortcut, and put in the line “-loginuri http://192.168.1.100:9000” right after the “Secondlife.exe” in the Target of the shortcut.
Now if you’re both on the same 192.168.x.x network, your friend should be able to log in and see your stuff!
Okay, I’m done for now – but I promise more goodies later 🙂 Happy OpenSim-ing!
(Thanks to Joshua and Justin on the SLU forums for additional clarification on OpenSim commands and setup.)
About this entry
You’re currently reading “OpenSim Command Line A-Go-Go!,” an entry on OpenSim Easy User Guide
- June 28, 2008 / 12:46 pm