January 23, 2008
filed mid-afternoon by DrScofield in: from the grid
technorati tags:
QR code for this entry · average time to read 0:37 minutes

this morning ansi and i were wondering how we could do XmlRpc calls to OpenSim. well, this is what we found out:

to have a reasonable XmlRpc experience™ you should enable the remote admin interface, to do so just add the following lines to your OpenSim.ini file:

        [RemoteAdmin]
        enabled = true
        access_password = secret

next open up your-editor-of-choice™1 and use the following piece of python code2

#!/usr/bin/python
import xmlrpclib

# XML-RPC URL (http_listener_port)
gridServerURL = 'http://127.0.0.1:9000'

# instantiate server object
gridServer = xmlrpclib.Server(gridServerURL)

# invoke admin_alert: requires password and message
gridServer.admin_broadcast({'password': 'secret', 
                         'message': 'the answer is 42'})

run and you should see on OpenSim’s region console:

[RADMIN] [01-23 04:17:10] Broadcasting: the answer is 42

and, of course, an alert popup in your SL viewer:

message from god


  1. yep, found the “™” key combination for my keyboard ;-)  

  2. i’m using a standalone OpenSim installation. 

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.

3 comments »

  1. What file do I put this in and where? Can I use Visual C#?

    comment by bailey — August 1, 2009 @ 22:40

  2. any file you like. re visual c#: no clue, would be surprised though, as this is python code. but who knows (am not a visual c# user myself)

    comment by DrScofield — August 2, 2009 @ 17:07

  3. Hey that works after running it thru sed:

    s/’/”/g

    comment by Bwild — August 29, 2009 @ 11:22

RSS feed for comments on this post. TrackBack URI

Leave a comment