Compiling Miro 3.0.3 on Lucid

Not sure if all of the stuff I installed was necessary, but at least nothing required was missing when I did it like this. I’m writing this down from memory and not on-the-go, so there might be errors, but the idea is there.

  1. # apt-get install miro python python-pyrex \
    libboost-python-dev libboost-filesystem-dev \
    libboost-date-time-dev libboost-thread-dev \
    libboost-serialization-dev python-gtk2-dev \
    python-gnome2-extras-dev libxine-dev chrpath \
    libxv-dev libssl-dev libffi-dev python-dbus \
    python-gtk2 python-gnome2 libtorrent-rasterbar-dev \
    python-glade2 python-gst0.10 imagemagick libxine1-x \
    libxine1-plugins xulrunner-1.9 xulrunner-dev
  2. $ wget http://ftp.osuosl.org/pub/pculture.org/miro/src/Miro-3.0.3.tar.gz
  3. $ tar xvf Miro-3.0.3.tar.gz
  4. $ cd Miro-3.0.3/platform/gtk-x11
  5. $ ./run.sh

Creating Rorschach-like inkblots in GIMP

I wanted to experiment with GIMP to create some inkblots à la Rorschach. I couldn’t hack it with the prebuilt filters, but to my surprise, I couldn’t even find any documentation of anyone having tried this before, so I thought I’d write down a little how-to.

Actually, I could just link to the two tutorials I did find, which weren’t about creating Rorschachish inkblots per se, but which can be easily applied in doing so. The first one is the easy one: Creating a bloody splatter texture by Bernhard Stockmann. The spatters of blood are a cool effect in themselves, and to turn them into pretty believable inkblots you just have to turn the red into black, as I’ll explain further down.

The second tutorial takes quite a bit more work, but the results are equally more spectacular: Create Cool Splatter Color Effect with The GIMP from GIMP Plus uses custom-made splatter brushes to make beautifully colored images not unlike some works of modern art.

Should the simple way be unaccessible (linkrot or otherwise), I’ll re-create the steps I took to apply it for inkblots here:

  1. Start with an empty canvas of preferred size. For this how-to, I chose the default of 640 × 400 that GIMP 2.6 gave me. Note that the dimensions of your final image will be different after we rotate and mirror this initial canvas.
  2. Pick the Airbrush Tool, and pick the yellow brush called ‘Sparks’.
  3. Add a new (transparent) layer, and paint around with the brush. You may want to adjust the scale of your brush and apply more pressure if your canvas is really big. Make sure there’s lots of contrast, i.e. areas where the yellow is very intense and areas where it’s barely visible. (They’ll translate to different shades of grey later on.)
    A 640x400 canvas with yellow sparks in GIMP
  4. In the layers dialog, lock the alpha channel.
  5. Pick black as your foreground color, and select Fill with FG Color from the Edit menu.
    A 640x400 canvas with black spattering in GIMP
  6. Unlock the alpha channel.
  7. From the Colors menu, select Curves…. In the Curves dialog, pick Alpha as the Channel to modify, and modify the curve like so:
    GIMP's Curves dialog: lower end at (55,0), higher end at (105,255)
  8. From the Image menu, select Merge Visible Layers, and from the dialog, Merge.
    A 640x400 canvas with inkblots in GIMP
  9. Rotate (and maybe crop) the image so that you’ll feel it works as the left side of your final image.
    A 400x640 canvas with inkblots in GIMP
  10. From the Image menu, select Canvas Size…. Uncouple width and height, and resize your canvas so that it’s double the width of the original.
  11. From the Layer menu, select Layer to Image Size, then Duplicate Layer, then TransformFlip Horizontally.
  12. From the Image menu, select Flatten Image.

And there you have it, a nicely random inkblot ready to frighten your poor patients with!
A Rorschach test -like inkblot in GIMP

WebDownloader for X settings

The app which calls itself “WebDownloader for X” comes in a  package called d4x and saves its settings in ~/.ntrc_2. How’s that for consistency!

Miro 2.5.2 for Lenny

I tweaked the current build from sid just enough to make it compile and run on lenny (IIRC, just one build-dependency version needed to be changed). The resulting packages are linked below, but I take no responsibility if they crash and burn your hard drive, so from here on, you’re on your own:

Retaining Epiphany’s overloaded address bar while using Privoxy

As per the comment in Privoxy’s ticket #2530592, I’ve set up a Privoxy rule to interpret dot-less domains as search terms. This emulates the search function built into Ephy, which breaks with Privoxy’s DNS error messages. In /etc/privoxy/user.action I now have:

# Redirect dotless hostnames as search parameters to Scroogle

{+redirect{s@^http://([^\\.]*)/$@https://ssl.scroogle.org/cgi-bin/nbbw.cgi?Gw=$1@}}

Pinning KNewsTicker down to bottom of screen with DevilsPie

This is on a 1280 × 1024 desktop, with the bottom panel remaining below (not behind) the ticker:

(if (is (window_name) "News Ticker") (begin (pin) (above)
(undecorate) (skip_tasklist) (geometry "1280x20+0-0")))

The ‘xwininfo’ command is useful in getting the coordinates.

Note that this makes shutting the ticker down impossible, apart from issuing a ‘kill’ command to do it.

Google Calendar not working in Epiphany?

Seemingly out of the blue Google Calendar ceased to function for me the other day. I finally tracked the issue down to Greasemonkey and more particularly to _blank Must Die. Adding the two lines I listed below to it seems to have fixed it for now.

// @exclude        http://calendar.google.com/*
// @exclude        http://www.google.com/*

I’m left to wonder what brought this on so suddenly, since I haven’t touched the script prior to this in ages — in fact, I had a hard time even remembering I was using Greasemonkey at all.

Trying Python

I tried my hands on the Snake, and was quickly defeated. It’s an ugly mess currently from the point of view of an international beginner: 2.5 (Lenny’s version) doesn’t work too well with unicode, and  3.0 isn’t yet in the repos. Ubuntu 8.10 has the basic 3.0 interpreter, but that failed me at the beginning of the 3rd chapter. Apparently the examples there require Tk, which for 3.0 isn’t in the repos.

I was surprised by the somewhat flaky unicode support in 2.5. This was due to my misconception that Python was new — newer than Java for instance. As I have no background in Python, and no code to support either, I’m just happy they’ve fixed this in version 3.