Tuesday, June 12, 2007

Firefox and SLURLs and Troubleshooting

Sometimes it takes a while to solve a technical problem. I just spent about 30 minutes solving a very minor but irritating problem. I thought I'd share the process and the result.

There is a simple microformat called a SLURL, or second life URL, which allows you to share a Second Life location via the Web, and have the user click to launch Second Life and open a map to teleport to that location.

A sample SLURL is http://slurl.com/secondlife/Divergent%20001/221/34/24/ (which is my student learning center in Second Life). The URL takes you to slurl.com where you can then "teleport now" into SL.
Clicking that orange button launches Second Life (if it isn't running already) and then puts a beacon on the map, allowing you to teleport to it.

The first time you click on a SLURL in Firefox, you will get a warning message that looks like this:

Well, if, by accident or on purpose, you don't accept the launching of Second Life when Firefox asks you, then SLURLs won't work any more. They will take you to slurl.com, but when you click on the teleport button, nothing will happen.

And, there is no obvious way to fix this, because NOTHING happens and, after looking through the Firefox options menus, I could find no way to fix it.

So, what did I do?

Go to google.

Of course. I love google. You can usually find the solution to a technical problem in a few minutes. This one took me a little longer. I searched for "slurl firefox problem" and "slurl firefox not working" and "slurl firefox" but couldn't find the solution. I tried "second life firefox" and that didn't work either. There were simply too many pages. I did discover that a SLURL is a "microformat", and learned a bit about the difference between a SLURL and a landmark, but no solution to my problem.

(I'll finish this later..... NOTE: after i posted this with the "Ill finish this later" note, a comment by Alex gave the solution. However, I also wanted to talk about the process....)

One thing I did learn was that a SLURL is somewhat different from what is known as a link with the "secondlife://" protocol prefix. Like other protocol prefixes such as http:// and ftp://, the secondlife:// prefix tells the browser how to handle a link. The secondlife:// prefix says to the browser, when you encounter this link, load secondlife.com (the Second Life client) and set the map to the location indicated in the link. So, for example, you can use the following link to go directly to my student learning center: secondlife://Divergent%20001/221/34/24.
However, that link doesn't work if you don't already have Second Life on your computer. In other words, the primary purpose of a SLURL is to deal with the situation where a person doesn't have Second Life installed on their computer. The SLURL directs the user to the slurl.com web site, which presents the screen mentioned above, with the orange "Teleport Now" button and another blue button that allows the user to get the Second Life client application.

So, the slurl http://slurl.com/secondlife/Divergent%20001/221/34/24/ uses the http:// protocol prefix to send the browser to a page at slurl.com which presents the user with the opportunity to access a link using the secondlife:// protocol prefix (through the "Teleport Now" button). The problem I had encountered earlier wasn't with the SLURL itself, but with the secondlife:// link. Firefox wasn't knowing how to handle the secondlife:// link on the "Teleport Now" button.

Knowing this new piece of information allowed me to refine my search in Google to include "secondlife:// firefox protocol". This brought up the first site on the list, Ryan Eby's blog:

Not dealing directly with Second Life, but with protocols in Firefox, Eby writes:

"By protocol what I mean is the URL prefix such as aim:// mailto:// etc. Usually when you install a program that uses it’s own protocol prefix it will update your browser with the correct information....If you don’t already know you can type about:config into the address bar in Firefox and get advanced settings. This allows you to highly tweak the browser if you wish."

So, when you go into about:config, you can filter by secondlife and see:

network.protocol-handler.external.secondlife with a value of "false".

This is the culprit; basically "false" means Firefox doesn't allow you to use the secondlife:// protocol. So, you right-click (Apple-Click on a Mac) and choose "Reset." Then, try the "Teleport Now" link again, and a new entry is added, which is

network.protocol-handler.warn-external.secondlife with a value of "false," which means that second life is launched without a warning, which is what I wanted in the first place.

So, took a while.

Took some "collateral learning" that i hadn't expected (about protocols, and firefox).

But i solved my problem.

Which is always so satisfying, in the end, and worth the aggravation that sometimes attends the journey.

5 comments:

Unknown said...

This is a known bug in Firefox, and will be fixed in Firefox 3. In the meantime, type about:config into the location bar, and search for network.protocol-handler.warn-external

Find the SLURL protocol and set it to true.

SLURLs would be a really creative use of the native microformat detection coming in Firefox 3.

Becky said...

What if the second life protocol isn't listed at all?

Craig A. Cunningham said...

star...then I guess you've never tried to access a SLURL before...and it should work just fine (provided that you have the second life client installed on your machine).

-- said...
This comment has been removed by the author.
-- said...

Yeah....I HAVE tried to use a SLURL, many times, and the SL protocol wasn't listed. It doesn't work on my new Win7 machine, which of course I have SL installed on. It gives me a 404 not found page. I added the string manually and still no change.