July 29, 2008
filed in the early evening by DrScofield in: from the grid, hacking
technorati tags:
QR code for this entry · average time to read 0:56 minutes

following up on yesterday's post about GridInfo i created a simple launcher for matrix: URIs which allows you to just click on something like matrix://osgrid.org:8002/ and have your SecondLife client come up ready to log in to osgrid.

the launcher is written in python, i've tested it under ubuntu linux, but it might work on windows and mac OSX as well. you can get it from here (opensim svn).

to add it as a protocol handler to firefox:

  • open a new tab
  • enter about:config in the location bar
  • accept the warning
  • then right click and select "new->string"
    • enter network.protocol-handler.app.matrix as preference name
    • enter the path to your copy of matrix.py as value

done.

to add it as a protocol handler to thunderbird:

  • you basically need to do the same steps as for firefox, the problem is, that the plain vanilla thunderbird does not have an about:config...but
  • install the [MR Tech Toolkit][mr-tech-toolkit] add-on for thunderbird and you then get a "tools->edit my config->about:config" option
  • repeat the procedure as outline above:
  • right click and select "new->string"
    • enter network.protocol-handler.app.matrix as preference name
    • enter the path to your copy of matrix.py as value

done.

have fun.

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
July 28, 2008
filed in the early evening by DrScofield in: from the grid, hacking
technorati tags:
QR code for this entry · average time to read 1:35 minutes

mana janus suggested last week on opensim-dev that it would be rather useful to have a grid info mechanism that would allow smart clients to obtain useful grid related parameters such as

  • login server (-loginuri parameter for the SecondLife® client)
  • grid welcome page (-loginpage)
  • URI of the economy subsystem (-helperuri)
  • URL of the grid's about page
  • URL of the web page to register a new account
  • URL of a help web page

and more...

...once we had such a mechanism, we could simply point any enabled client at http://osgrid.org:8002/ and it would figure out the rest via GridInfo.

as we were also looking for a simpler mechanism to start up the client and have it connect to the various internal grids, i jumped on this idea and quickly did a proof-of-concept as an application plugin to OpenSim providing the get_grid_info XmlRpc call..

...which worked nicely with standalone mode, but not quite with grid mode --- for that the GridInfoPlugin logic had to be refactored into a service for both grid and standalone mode instead of being a plugin. i'm pleased to announce that as of subversion release 5692 that code is now working:

  • if your OpenSim.ini config file contains a [GridInfo] section, all key--value pairs will be used to populate the response
  • if your OpenSim.ini config file does not contain such a section, then some reasonable defaults will be used, so that a client would at least get the login server.

so, a simple HTTP GET to the standalone server's URL or the userserver's URL will provide all the information needed to your client --- once it's smart enough and knows about GridInfo.

have a look at the OpenSim GridInfo wiki entry and also at the OpenSim OpenSim.ini entry for more information and sample output.

the fact that GridInfoService uses whatever you provide in the [GridInfo] section of OpenSim.ini allow us to extend the configuration data as needed and do so in a backward compatible way: we could, for example, provide the address of the VoIP server that we are using for voice support; or, ...

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
July 9, 2008
filed in the early afternoon by DrScofield in: from the grid, hacking
technorati tags:
QR code for this entry · average time to read 1:18 minutes

working a lot these days on the exciting OpenSim project i end up generating a number of patches. even though i do have commit rights for the OpenSim subversion repository i tend to really use the distributed version control tool mercurial and work against the OpenSim mercurial repository as that allows me to very quickly set up a clone of the OpenSim source tree, work on a particular feature there, then draw a patch set, apply that to the subversion tree, and get rid of the cloned tree. mercurial's clone function is particularly nice in that it uses hard links wherever possible.

so, what i've done is the following:

% hg clone http://opensimulator.org/hg/opensim-trunk/ opensim

that clones the opensimulator.org tree via HTTP to my local /proj tree. next, i create a local clone:

% hg clone opensim opensim-http

(i'm currently overhauling the HTTP server code inside OpenSim); do whatever i feel urged to do inside that tree. when i'm ready to commit a patch i update the opensim-http tree to the latest version:

% cd opensim-http
% hg pull http://opensimulator.org/hg/opensim-trunk/
% hg merge
% hg ci

those steps will ensure that i'm at the latest and greatest OpenSim level now. next, i need to prepare a patch set against the latest subversion release. if you look at the output of hg log...

changeset:   4634:111496b95f43
parent:      4631:10ade1d4f3de
parent:      4633:076831c7c06b
user:        Dr Scofield <hud@zurich.ibm.com>
date:        Wed Jul 09 13:58:52 2008 +0200
summary:     sync/opensim

changeset:   4633:076831c7c06b
parent:      4629:cc11643a0520
user:        mw
date:        Wed Jul 09 11:01:26 2008 +0000
summary:     [svn 5396] corrected the params types on IClientAPI.SendParcelMediaCommand. the command parameter should be set to the the ParcelMediaCommandEnum value. While flags seems to need to be set to (uint)(1<<[value of the command enum])

...you can see that some of the summary fields of the mercurial changesets contain an [svn NUMBER] part, which, by happy coincidence1, indicates the corresponding subversion release number.

so all we need to do now is create a diff against mercurial changeset 4633:076831c7c06b and apply that to our subversion tree (or submit it to [OpenSim's mantis][os-mantis]):

% hg diff -r 076831c7c06b > /tmp/opensim-another.patch

needless to say, but after doing this a couple of times you start wondering whether that process could be wrapped in a script...

...and it turns out, that, yes, we can do that:

save it in ~/bin/hgsvn, stir2, then apply as follows:

% hg diff -r $(hgsvn) > /tmp/opensim-yet-another.patch

voila.


  1. well, not really, that's intentional. 

  2. stir as in chmod a+x ~/bin/hgsvn 

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.