Connecting

From OpenSimulator

Revision as of 11:16, 16 March 2008 by Phrearch (Talk | contribs)

Jump to: navigation, search

Contents

Browser Protocol Handlers

A browser-protocol handler is a quick way to connect to a grid, by just clicking on a hyperlink that has an "opensim://" prefix, The only thing you have to do, is instruct your browser how to handle the sl-viewer. Currently there are protocol-handlers for Linux and Windows. I'm pretty sure it's just as easy on the Mac, but since I don't own one, you have to find out for yourself(for now).

Linux

Firefox

You can setup firefox to open opensim://serveraddress links, so you don't have to specify the login-parameters every time you're connecting. Follow these steps in order to use this functionality:

  • create a file named osurl.sh in your secondlife directory, and fill with:
#!/bin/sh 
exec= kdesu -c "/your/path/to/secondlife/secondlife -loginuri ${1:10} -loginpage ${1:10}/?method=login"

Notice that kdesu is optional. Somehow secondlife crashes when i run it as a normal user, so I run it as root.

  • Make the file executable
chmod +x ./osurl.sh

Next you have to add a protocol handler to firefox, so firefox knows that it should run this shellscript.

  • Enter about:config in your browser
  • Add a new string, name it "network.protocol-handler.app.opensim"
  • Enter /path/to/your/secondlife/dir/osurl.sh as value
  • Add a new boolean, name it "network.protocol-handler.external.opensim", and set it to "true"

Now you can try to connect with the OS-Grid by opening "opensim://osgrid.org:8002"" in your browser. Please notice that using protocol handlers may cause a potential security hazard(http://www.heise-security.co.uk/news/96163). I am not sure whether this script is vulnerable to the -autologin vulnerability, so be warned(ps. I don't take any responsibility for using this script).

Windows

Internet Explorer

You can do the same for windows, but it takes a little more work. Follow these steps to get the functionality:

  • create a file named osurl.bat in your secondlife directory, and fill with:
@echo off > osurl.bat
SET rawUrl=%1
SET cleanUrl=%rawUrl:~10%
START "OpenSim" /HIGH /B "%~d0%~p0SecondLifeWindLight.exe" -loginpage %cleanUrl%?method=login -loginuri %cleanUrl%
EXIT
  • We need to create a file named opensim.reg, fill with(modify paths to SL if needed) the text beneath, and save:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\opensim]
"(default)"="URL:opensim"
"URL Protocol"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\opensim\DefaultIcon]
@="\"C:\\Program Files\\SecondLifeWindLight\\osurl.bat\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\opensim\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\opensim\shell\open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\opensim\shell\open\command]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\opensim\shell\open\command]
@="\"C:\\Program Files\\SecondLifeWindLight\\osurl.bat\" %1"
  • Right-click the file, and import it to the registry

Firefox

  • Follow the previous steps for Internet explorer
  • add a protocol handler to firefox, so firefox knows that it should run this shellscript.
  • Enter about:config in your browser
  • Add a new string, name it "network.protocol-handler.app.opensim"
  • Enter c:/Program Files/YourSecondLifedir/osurl.bat as value (use your own sl-path here)
  • Add a new boolean, name it "network.protocol-handler.external.opensim", and set it to "true"

Now try to connect with the OS-Grid by clicking this link in your browser: opensim://osgrid.org:8002""

Mac OSX

Not yet implemented

Connecting with the Second Life Viewer

Use the -loginuri yourserver.org:8000 switch and the -loginpage yourserver.org:8000/?method=login switch. You may want to use the -settings switch to use a different configuration set as well (the default is settings.xml). Some examples:

SecondLife.exe -loginuri http://localhost:9000/ -loginpage http://localhost:9000/?method=login
SecondLife.exe -loginuri http://osgrid.org:8002/ -settings settings_osgrid.xml -loginpage http://osgrid.org:8002/?method=login

Setup the protocol handler for convenient connecting, or use the same syntax for other Grids. After the protocol handler is setup, you can try to connect to some grids, by clicking on of the examples below:

opensim://user.deepgrid.com:8002/

opensim://osgrid.org:8002/

opensim://logingrid.net:8002/

opensim://maingrid.centralgrid.com:8002/

Another option is to try the 'Launcher' for Windows (.net required). http://www.openlifegrid.com/downloads/gridlauncher.zip
To login to the Public GRID examples registration is required first see OpenSim: Grids for Public Grids.

Technical issues

Platform Specific

Setup launcher for Mac

/Applications/Second\ Life.app/Contents/MacOS/Second\ Life -loginuri http://localhost:9000/ -loginpage http://localhost:9000/?method=login
/Applications/Second\ Life.app/Contents/MacOS/Second\ Life -loginuri http://user.deepgrid.com:8002/ -loginpage http://user.deepgrid.com:8002/?method=login
/Applications/Second\ Life.app/Contents/MacOS/Second\ Life -loginuri http://osgrid.org:8002/ -loginpage http://osgrid.org:8002/?method=login
/Applications/Second\ Life.app/Contents/MacOS/Second\ Life -loginuri http://logingrid.net:8002/ -loginpage http://logingrid.net:8002/?method=login
/Applications/Second\ Life.app/Contents/MacOS/Second\ Life -loginuri http://osgrid.org:8002/ -loginpage http://osgrid.org:8002/?method=login -settings settings_osgrid.xml

alternatively you can add arguments to arguments.txt on a mac by:

  1. right-click secondlife choose "show package contents"
  2. navigate to contents -> resources -> arguments.txt
  3. add this on one line: -loginuri http://localhost:9000/ -loginpage http://localhost:9000/?method=login
  4. save and run the application normally
    • note: you will not be able to connect to Second Life again until you remove this line from arguements.txt
Personal tools
General
About This Wiki