tutorial

Got Mozilla Weave 1.0 Minimal Server working on Mac OS X, at least

Posted in account-management, dreamhost, tutorial on February 2nd, 2010 by matt – 2 Comments

Decided to put in some more time on Mozilla Weave 1.0 minimal server after this attempt, but a little less ambitious: getting it working locally on Mac OS X (10.5.8), where I have full admin rights. While the instructions are _technically_ sufficient, there’s a lot more that can be said to make it more straightforward.

By far the most frustrating and poorly documented part are permissions issues. The instructions below are pretty crude and insecure, but it’s just for practice. So here’s what I did:

  1. Download the minimal server, and read the README.
  2. Move the whole “weave_minimal” directory into your DocumentRoot; for me, it was at “/Library/WebServer/Documents”. Note that you might have to `sudo` to get it in there. It also doesn’t hurt to rename it to something that doesn’t begin with “weave”, to minimize weird path conflicts down the line. E.g.: `sudo mv weave_minimal /Library/WebServer/Documents/minimal-weave-1.0`
  3. For good measure, change the ownership and groupship to root and admin, respectively, and give them full permissions: `chown -R root minimal-weave-1.0`, `chgrp -R admin minimal-weave-1.0`, `chmod -R 775 minimal-weave-1.0`
  4. Modify your “httpd.conf” (in /etc/apache2/httpd.conf) by adding the following line at the end: “Alias /weave /Library/WebServer/Documents/minimal/index.php”
  5. Restart your local Apache instance by going into System Preferences > Sharing > Web Sharing (check to enable)
  6. Per the README, hit the URL to initialize the sqlite database: http://localhost/weave/1.0/blah/info/collection
  7. You should get a pop-up that axks for authentication info (username and password). You MUST enter “blah” for username, and the SOMETHING (anything) for password (it CANNOT be blank).
  8. You still won’t be able to authenticate, but if you look at your minimal-weave-1.0 directory, you should now see a new file called “weave_db”.
  9. If you’re this far, congrats, you’ve finished the most annoying parts! Now we create a new user; thankfully somebody in the comments tipped me off to this, otherwise I could have wasted hours. The “create_user” script in the installation is actually a PHP commandline script, and MUST be run this way on the commandline: `/usr/bin/php create_user` (you probably need to sudo).
  10. Now you’re done, and can install the Weave client from the project page. Some last notes during client installation: in Firefox Preferences > Privacy, you MUST remember some kind of history, otherwise the Weave preferences tab will be greyed out (this was very confusing, and I hope it’s clarified in the next version of the client).

This is admittedly a very ghetto and unprofessional installation guide (PLEASE PLEASE PLEASE don’t set up your instance like to for _anything_ other than playing around, on a non-production machine), but it was just an experiment to learn what’s _supposed_ to happen during an install. Now I can try and get this thing working on Dreamhost. We’ll see.

Mozilla Weave 1.0 Minimal Install on Dreamhost: Fail

Posted in account-management, dreamhost, tutorial on January 30th, 2010 by matt – 3 Comments

The 1.0 release yesterday seemed like a great time to try Weave again. Following the big bold suggestion at the top of https://wiki.mozilla.org/Labs/Weave/Sync/1.0/Setup, I hit up http://tobyelliott.wordpress.com/2009/09/11/weave-minimal-server/ and tried to install my own instance. Alas, Dreamhost bested me. Too tired to fully explain why, but quickly:

  1. Dreamhost doesn’t allow “Alias” directives in .htaccess (either that, or you can only have Alias directives in httpd.conf/apache.conf, in a VHost block; whatever, the bottom line is you can’t use it).
  2. You somehow need to map some path to a PHP file. That is, something like “host.com/weave/a/b/c” is actually supposed to be a request to “host.com/weave/install/dir/index.php” with a bunch of extra URI stuff after it (in this example, “/a/b/c”). Don’t worry, this sentence doesn’t make sense to me either.
  3. Apache rewrite rules are confusing enough, but factor in PHP processing, and it’s more than I can figure out right now.

Damned shame, from the instructions it sounded like it would take 10 minutes, max. <sigh/> Will try again another day. Gods, I hope somebody else figures it out by then.

Removing dead tracks in iTunes automatically

Posted in itunes, tutorial on January 30th, 2010 by matt – Be the first to comment

Doug’s “Super Remove Dead Track v2.1″ works like a charm: http://dougscripts.com/itunes/scripts/ss.php?sp=removedeadsuper

Installation takes about 20 seconds. Note that if your music collection is large (mine clocked in at 120 GB…), and you have a lot of dead links (I had around 10-15 GB), it could take up to an hour.