Monthly Archives: February 2011

ViewVC on DreamHost, revisited

While getting ready to install MoinMoin on bat-country.us to replace my current static pages, I noticed my ViewVC install was two years out of date. Readers seem to have found my writeup of the last time I installed ViewVC on DreamHost useful, so here’s an update.

DreamHost‘s standard environment now includes Python 2.5.2, virtualenv, and Python bindings for Subversion 1.5. This makes setting up ViewVC a good deal simpler than it used to be. This time around, I’ll be using FastCGI rather than classic CGI as the mechanism for getting Apache to talk to Python. I’d use WSGI, the preferred method of running Python webapps, but WSGI is apparently a little flaky on DreamHost.

Make sure $HOME/bin is in your $PATH environment variable before /usr/bin. My instructions below assume your working directory is $HOME.

Set up a Python virtualenv in your home directory, if you don’t have one already:
$ virtualenv $HOME

ViewVC uses Flup for FastCGI support, and Pygments for syntax highlighting. Install Flup and Pygments into the virtualenv:
$ easy_install Flup
$ easy_install Pygments

Download and unpack the latest stable release of ViewVC (currently 1.1.8):
$ wget http://viewvc.tigris.org/files/documents/3330/48659/viewvc-1.1.8.tar.gz
$ tar -xzf viewvc-1.1.8.tar.gz
$ rm viewvc-1.1.8.tar.gz

Run ViewVC’s installer script:
$ viewvc-1.1.8/viewvc-install --prefix=$HOME/viewvc

Delete the installer directory:
$ rm -rf viewvc-1.1.8

Configure viewvc.conf and the ViewVC templates to suit yourself, as per the ViewVC install instructions and my previous post on ViewVC setup. Remember to set up static content serving with the docroot option in viewvc.conf and the appropriate directory mapping.

Set up an .htaccess file in your domain folder to use Apache’s mod_rewrite for pretty URLs:

RewriteEngine on
RewriteRule ^code/(.*)$ viewvc.fcgi/$1
RewriteRule ^code$ viewvc.fcgi/

Copy viewvc.fcgi, the FastCGI entry point to ViewVC, to your domain folder:
$ cp viewvc/bin/wsgi/viewvc.fcgi example.org/viewvc.fcgi

ViewVC’s installer script will automatically create a viewvc.fcgi that points to the Python interpreter in your virtualenv (the one that has Flup and Pygments installed), so you don’t need to edit the #! line. You will still need to add a line to viewvc.fcgi to set the SCRIPT_NAME environment variable to a URL that matches your .htaccess rewrite rules. Instead of changing os.environ, change environ inside the application function that is the Flup entry point:

def application(environ, start_response):
  environ['SCRIPT_NAME'] = '/code'
  server = sapi.WsgiServer(environ, start_response)
  cfg = viewvc.load_config(CONF_PATHNAME, server)
  viewvc.main(server, cfg)
  return []

And with that, you’re in business. Took me less than half an hour, and that’s counting the time it took to write this.

Tagged , , , , , , ,

Digsby: useful, once you turn off the ads

Adium is the alpha and omega of chat clients. It does everything right. Unfortunately, it only runs on Macs. I just can’t seem to find a good multiprotocol IM client for Windows.

Way back in the dark ages, when Pidgin was GAIM 1.5 and the UI team hadn’t adopted their “our way or the highway” policy, I used that. But the Gtk+ interface always bugged me and GAIM 2.0 disabled a bunch of UI tweaks that I liked. There was a fork called Carrier or FunPidgin that re-enabled them, but like most annoyance-related forks, there wasn’t a lot of backing and it’s now long dead. So I kicked it to the curb and used Miranda for a while. Unfortunately, maintaining a Miranda install means dealing with at least a dozen plugins to provide features that should have been built in, like grouping a person’s multiple chat handles together (“metacontacts”), the ability to change smileys, a decent chat-history viewer, or a UI that doesn’t look like a throwback to Windows 95. Too much hassle.

Then I heard about Digsby somewhere. It’s not open source. It’s actually kind of unclear what their business model is. However, in terms of feature set, it’s the closest thing to Adium you can get on Windows, with the notable exceptions of OTR encryption and IRC support. It supports metacontacts, it works with Facebook messaging (always surprised by how many people use that), it has a decent message display, and it can be configured to be quite unobtrusive, a major selling point for me. Part of that configuration is turning off all the crap they ship with it. Honestly, I hate ad-supported free stuff, and I hate installers that carry a crapware payload even more. If it’s good, just make it payware. I’ll buy it. If it’s not good, I’m not going to put up with ads because it’s free – there are plenty of other freeware and OSS products out there that are usable.

To the credit of Digsby’s developers, you can turn off the various user-exploitation features! Here’s how.

There’s a constantly varying crapware payload in the Digsby installer: last time I installed Digsby, it was the Ask.com toolbar (link goes to uninstall directions). Real useful. Ask.com’s installer screen has the checkboxes for “Yes, please install this useless piece of data-harvesting crap” pre-checked, so don’t blindly click through.

Once you’ve got Digsby installed, open Digsby’s Preferences window from the systray icon or the Tools menu (shown):

Location of Digsby's Preferences window

The newest publicly available version of Digsby added ads under every conversation window; that’s what pissed me off enough to go looking for some way to kill them. In the Conversations pane, uncheck the box next to “Support Digsby development by showing an ad in the IM window“.

Location of checkbox to disable Digsby's conversation window ads

I want to smack anyone who sends emails ending with “sent from my iPhone” (or BlackBerry, or Hotmail account, or whatever). I prefer my messages unbranded, thanks. Digsby does some similar self-promotion in your AIM profile. In the General & Profile pane, uncheck the box next to “Promote Digsby in my AIM profile“.

And then there’s the most insidious piece: Digsby uses Plura’s platform to appropriate your CPU cycles for commercial purposes. This is one step away from botnet membership, and it uses the same verbiage as legitimate volunteer grid computing like BOINC (the platform that powers SETI@home). In the Research Module pane, uncheck the box next to “Allow Digsby to use CPU time to conduct research“. Maybe some day, commercial grid computing will advance to the point where I can make more money by running it than it costs to power the machines it’s running on, but on that day, the money better be going to me, not whoever landed a parasite program on my computer first.

With this junk disabled, Digsby is a nice little multiprotocol messenger program.

Tagged ,