Sunday, January 30, 2011

Patch for sl_proxy 1.9.3 for Mac and Cygwin

If you're comfortable with patch and make, you shouldn't have much trouble installing this. The instructions to compile are the same on both Mac and Cygwin. Linux users shouldn't have to make any changes, since this software was originally written for linux.
  1. Download sl_proxy-1.9.3 from Network Solutions Laboratory. It's the little 3.5" floppy disk icon.
  2. Extract the sources to a temp folder. I do this from a terminal command prompt:
    • mkdir -p ~/tmp/slproxy
    • cd ~/tmp/slproxy
    • tar xvzf ~/Desktop/sl_proxy-1.9.3.tar.gz
  3. Download my sl_proxy-1.9.3-mac-cygwin.patch from here. (The .patch extension might be hidden)
  4. Test applying the patch, just to be sure you're in the right spot.
    • cd ~/tmp/slproxy
    • patch --dry-run --strip=1 -i ~/Desktop/sl_proxy-1.9.3-mac-cygwin.patch
  5. If that works, apply the patch.
    • patch --strip=1 -i ~/Desktop/sl_proxy-1.9.3-mac-cygwin.patch
  6. Make the junkbox library.
    • cd ~/tmp/slproxy/junkbox_lib-1.2.4
    • autoreconf -f && ./configure && make
  7. Make the sl_proxy programs.
    • cd ../sl_proxy-1.9.3
    • autoreconf -f && ./configure && make
  8. Install them. On Mac, remember to 'sudo' the install command.
    • make install
Assuming that all worked, next you start the processes up. These apps are designed to be running as services or 'daemons' all the time. I haven't bothered to do that under Mac and it's more trouble than it is worth under Cygwin, so I simply start them by hand. If you want to explore them running as a service, feel free.

I recommend using 'screen' to run them. At the least, you'll probably want 3 terminal sessions. I set up some bash aliases to run them in my .profile, so I can just type sl1, sl2, and sl3 -- one in each terminal session. The sl_cache process, sl2 in my aliases, takes a bit to start up. It takes longer each time as you collect more and more textures. This is why I recommend screen if you leave your PC or Mac on most of the time -- because you can detach the session and log out and the apps will keep running.

Starting the apps by hand
On the Mac, you'll need to prefix each of these with 'sudo' because they run as privliged processes.
  1. sl_info -v0 -l -f1 -d
  2. sl_cache -v0 -l -lx -xpr 90 -d
  3. sl_relay -v0 -ci -cs -d
You should read the Network Solutions Laboratory's website for what each of the parameters mean.

In my .profile (or .bashrc, depending), I set up aliases as follows:
  • alias sl1="sl_info -v0 -l -f1 -d"
  • alias sl2="sl_cache -v0 -l -lx -xpr 90 -d"
  • alias sl3="sl_relay -v0 -ci -cs -d"
Pointing the Second Life client to your proxy
In order to start caching textures, you need to have your Second Life client talking to sl_proxy, and not directly to the Second Life servers.

You can do this by putting the IP of your sl_proxy computer in the shortcut. Just copy your Second Life shortcut and perhaps rename it "Second Life - cache". Change your target to add the --loginuri parameter outside the quotes of the exe. For example: "SecondLife.exe" --loginuri http://computer:8100/cgi-bin/login.cgi
Make sure you replace 'computer' with the IP of the sl_proxy machine or use 'localhost' if it's on the same pc you'll run Second Life from.

(instructions shamelessly stolen from the Opensimulator site)
  • Make a '' file, and put this in it:
/Applications/Second\\ Life -loginuri http://computer:8100/cgi-bin/login.cgi
  • set it to executable
  • run it
Good luck and I hope this app helps you out as much as I have. Those of you with FiOS and super-fast connections probably won't get anything from this. But people with slower connections will see things quicker as they move around in places they frequent.


  1. Hmm, trying to build it, the junkbox library is missing from the download, and the version at Network Solutions is both older, and when patched, does not successfully compile.

    Any source for version 1.2.4 of junkbox_lib, and any required libraries?

  2. junkbox is a lib and a peer source tree to sl_proxy-1.9.3. When you untar into the tmp directory, the top level contains INSTALL, junkbox_lib-1.2.4, sl_proxy-1.9.3, and a symbolic link to junkbox_lib-1.2.4 called JunkBox_Lib.

    The URL I give for sl_proxy-1.9.3 at the top of this post is the correct version. Make sure you click on the little floppy disk icon in the upper left. The ones on the bottom seem to point to 1.9.1.

    Looks like this link will directly take you to it, too:

    In one of my posts on my old blog, I mention I needed to install the jpeglib library on my Mac in order to get the old 1.9.1 working. That's at