Wednesday, December 27, 2006

HOWTO: Griffin Powermate in The GIMP

This Christmas, I was graciously given a slick Griffin Powermate from my brother.

It's a nifty little aluminum knob for your PC, with an extremely smooth touch and a blue LED that makes the bottom glow. There's support in the Linux kernel for the device, and it acts like a regular old input device. If you're crafty, you can edit your xorg.conf to make it control X, or you can use other software's built-in support for the device. Both the free DJ software Mixxx and The Gimp support the device. Mixxx's support needs a bit of work, but the device works great in The Gimp. However, there doesn't seem to be any documentation on how to actually set up the Powermate in The Gimp, so here we go:

1. Edit your ~/.gimp-2.2/controllerrc, and add the following to the end of the file:

(GimpControllerInfo "MIDI"
(enabled yes)
(debug-events yes)
(controller "ControllerLinuxInput"
(device "/dev/input/event2"))
(map "button-0" "select-all")
(map "dial-turn-left" "context-tool-select-previous")
(map "dial-turn-right" "context-tool-select-next")))

If you have more than just a keyboard and mouse hooked up to your PC, you might need to change the "/dev/input/event2" to a different device (/dev/input/event3 or something).

2. Set up the permissions
for the Griffin Powermate device (run this in a terminal):

sudo chmod a+r /dev/input/event2

Again, replacing the device with the proper one if your's is different. (Also, see the note at the end of the HOWTO about setting this at bootup.)

3. Fire up The Gimp
and change the mappings in the preferences as you see fit:

4. That's it, enjoy!

There's probably a good way of setting the proper permissions (like in step 2) by default at bootup, but I can't figure it out. If anyone does figure it out, drop me a comment. In the meantime, use your favourite hack to run the command in step 2 at bootup ("/etc/rc.local" is a good enough place). :)

Wednesday, December 20, 2006

PDF + Cube = PDF Cube?

PDF Cube uses the OpenGL API to add spinning cube page transitions to PDF documents

PDF Cube is an OpenGL API-based PDF viewer that adds a compiz/Keynote-like spinning cube trasition effect to your PDF presentations (including Latex, Beamer and Prosper). You can also zoom on 5 predefined areas of any presentation page with a smooth zooming effect.

That pretty much says it all. It's still pretty alpha-quality, but it might be part of a cool solution to the presentation software dilemma some day. If you're interested, check it out.

Thursday, December 14, 2006

GPL kernel modules, reverse DRM, and the future of Linux

I was doing my daily read of Digg today, and I stumbled across this: Linus Torvalds on the "GPL only modules" debate.

The issue at hand is whether the kernel should only be allowed to load GPLed modules (that is, drivers). That's right, some of the Linux kernel developers want to do away completely with binary-only (ie. closed source/proprietary) drivers, like the (good) Nvidia and ATI ones.

On the one hand, Andrew Morton writes:

Give people 12 months warning (time to work out what they're going to do,
talk with the legal dept, etc) then make the kernel load only GPL-tagged

I think I'd favour that. It would aid those people who are trying to
obtain device specs, and who are persuading organisations to GPL their drivers.

(Whereas the patch which is proposed in this thread hinders those people)

The patch in question would allow more components of drivers to be handled outside of the kernel, thus allowing developers of binary-only drivers (like Nvidia) to write GPLed skeleton drivers that actually just move their proprietary stuff outside of the kernel. So really, it doesn't solve anything, as Linus himself argues:

It will only result in _exactly_ the crap we were just trying to avoid,
namely stupid "shell game" drivers that don't actually help anything at
all, and move code into user space instead.

What was the point again?

Was the point to alienate people by showing how we're less about the
technology than about licenses?

Was the point to show that we think we can extend our reach past derived
work boundaries by just saying so?

The silly thing is, the people who tend to push most for this are the
exact SAME people who say that the RIAA etc should not be able to tell
people what to do with the music copyrights that they own, and that the
DMCA is bad because it puts technical limits over the rights expressly
granted by copyright law.

Doesn't anybody else see that as being hypocritical?

Linus then goes on to argue that decisions in the kernel should be based on technical merit, and shouldn't seek to limit how people are allowed to write/use drivers for Linux.

Because the history of Linux is so deeply intertwined with that of the Open Source/Free Software movement, many people feel that the kernel should only accept GPLed modules. The idea is that this would put pressure on companies like Nvidia and ATI to release GPLed ("Free") drivers. However, the flip-side is that it may well just end up in the same companies simply shunning Linux all together, or just moving their proprietary code out of the kernel. (The only thing the latter case seems to accomplish is a philosophical cleansing of the kernel.) Furthermore, proponents of this approach seem to be ignoring the other important component of "Free" - that is, being able to do what you like with it.

A "Free" kernel should let the user insert any modules they want in it, regardless of the license. It's almost reverse DRM - Instead of restricting users from freely using something, users would instead be restricted to only using something "Freely" (that is, only in ways that are compatible with their definition of "free"). Lastly, it just so happens that allowing binary kernel modules (as is the case currently) is the best technical decision, at least in the short-term, because Linux does not have the consumer base to persuade vendors to release open source drivers. Think about it - Linux is most popular in server market right now, and all of the popular binary drivers (Nvidia, Ati, Wifi) are needed on desktop Linux, not on servers.

Moving forward, the Linux kernel must continue to walk the narrowing line that balances between commercial success and philosophy. The next few years are certainly going to be interesting, particularly if ATI and/or Nvidia open source their drivers. Keep on the look-out.

Saturday, December 09, 2006

HOWTO: Banshee 0.11.3 on Ubuntu

Update: Banshee 0.13.1 can be installed in Ubuntu 7.10 (Gutsy Gibbon) by running "sudo apt-get install banshee".

Banshee 0.11.3 was released today and features a bunch small new features and bug fixes, but also includes some pretty big performance enhancements. If you're a Banshee user, it's definitely worth upgrading to this new release for the speed improvements alone (switching to your library doesn't take a ridiculously long time anymore.) Since I've already written a HOWTO for Banshee 0.11, I decided to updated it for Banshee 0.11.3. This guide was written for Ubuntu 6.10/Edgy Eft, but there's only one little change necessary for it to work on Ubuntu 6.06/Dapper Drake (which is explained inline below.) On with the installation instructions:


If you have the QuinnStorm repositories enabled (for Compiz/XGL stuff), you might encounter this compile error: "/bin/grep: can't read /usr/lib/ No such file or directory" or something along those lines. The necessary fix can be found here. (I just ended up removing the "/usr/lib/" part of that line and it fixed it, and I think that's probably a safer route.)

To follow this HOWTO, just punch (ie. copy and paste) the commands listed into a terminal. Good luck!

1. Install prerequisites

First, make sure you have the universe repository enabled. If you're unsure, here's instructions on how to check and enable it.
Next, install the software required to build Banshee:

sudo apt-get build-dep banshee
sudo apt-get install libavahi-cil mono libgconf2.0-cil
sudo apt-get build-dep libipoddevice0
sudo apt-get install libgtop2-7 libgtop2-common libgtop2-dev libsgutils1 libsgutils1-dev
wget \
tar -xvzf libipoddevice-0.5.2.tar.gz
tar -xvzf ipod-sharp-0.6.2.tar.gz

Note: If you're an Ubuntu 6.06/Dapper Drake user, the above "sudo apt-get install..." line might fail. If it does, try running the following:
sudo apt-get install libsgutils libsgutils-dev
(Note: If this fails, just keep going to with the rest of the HOWTO...)

Now, in order to have iPod support, we're going to install libipoddevice and ipod-sharp:

cd libipoddevice-0.5.2
./configure --prefix=/usr
sudo make install
cd ..

cd ipod-sharp-0.6.2
./configure --prefix=/usr --disable-docs
sudo make install

(The above iPod steps can be safely left out if you don't need iPod support...)

2. Download Banshee 0.11.3


3. Extract and configure

tar -xvzf banshee-0.11.3.tar.gz
tar -xvzf banshee-official-plugins-0.11.3.tar.gz
cd banshee-0.11.3
./configure --prefix=/usr --enable-avahi --disable-docs

I suggest leaving Avahi enabled here as I did so that DAAP sharing works. (It lets you share your music library with iTunes, Limewire, etc. users, as well as listen to other peoples'.) iPod support should be automatically detected if you followed the iPod steps above.

4. Build and install Banshee

sudo make install

5. Configure, build, and install the plugins

cd banshee-official-plugins-0.11.3
./configure --prefix=/usr
sudo make install

6. Run Banshee!

Either from the console run "banshee" or launch it from the "Applications->Sound & Video" menu in GNOME.

That's it! I've tested this on Ubuntu 6.10/Edgy Eft machine, but if this doesn't work for you, leave a comment and I can try to help you figure it out. :)


Thursday, December 07, 2006

3D Album Art in Banshee

Hot on the tail of Apple's Coverflow, Łukasz Wiśniewski is developing a plugin for Banshee called Fleow:

That is hot. (Thanks Gabriel!)