Saturday, December 30, 2006

HOWTO scrub iTunes' DRM off of your purchased music with QTFairUse

DRM sucks. A lot. Case in point: I just received a $25 dollar gift certificate from a loving relative who wanted me to buy some music. I summarily went to the iTunes Music Store and downloaded about twenty-five bucks worth of Cannibal Corpse songs. All was good, until I tried to play the songs on another music player. Surprise! The .m4p files are a iTunes-only, DRMed format. That is when I resolved to immediately blog about how to get around it (a mild form of protest, I know).

(Disclaimer: doing this may be violating the DMCA. But if you want to stick it to the man and protect your fair use rights, read on. Besides, the DCMA sucks, too.)

First, you're going to need Windows (sorry... I guess you could always use Wine or Virtualization inside Linux, but I don't have that set up yet -- I'm just dual-booting Ubuntu Edgy and Windows XP). Next, download QTFairUse which is a utility that will scrub the DRM from your music files. (There is also another utility for doing this called myFairTunes and an older one that doesn't work anymore called JHymn). Unzip the QTFairUse archive and launch the .exe file to start the program. Use the drag-and-drop interface to select which songs you want scrubbed and then click the button at the bottom to begin the conversion. You now have .m4a-format, DRM-free audio files!

Neither of these programs work under Wine... neither are in the Wine Application DB... looks like I'll have to stick with Windows (ugh) for now...

QTFairUse throws a "ImportError: MemoryLoadLibrary failed loading win32api.pyd" when using the console version and an "ImportError: MemoryLoadLibrary failed loading win32gui.pyd" when using the GUI version

myFairTunes sets up fine but throws this error when I run the application under Wine: "install the Windows version of Mono to run .NET executables" ... searched Google and it seems like this is a long way from being fixed

new links:
Be sure your computer is 'authorized' to play 'protected' files on iTunes or this won't work.

Thursday, December 21, 2006

Static IPs in Debian-based Linux

Here's a brief overview of how to set up an internet connection using a static IP address on Debian-based Linux systems. Most large networks nowadays use DHCP to get a user an IP address, but knowledge of static IP configuration can still be helpful in a lot of situations. First, edit the /etc/network/interfaces file as a superuser so that the entry for the desired interface looks something like this (replace x's with numeric values):

iface eth0 inet static # static, as opposed to dhcp... replace eth0 with desired interface
address # ip address you want assigned to this computer
netmask # subnet mask
network # optional
broadcast # optional
gateway # gateway (usually router/firewall) ip address

Once you have done this, restart your network interfaces with sudo /etc/init.d/networking restart

The gateway can also be specified on the command line if it's not in the interfaces file: sudo route add default gw The command netstat -nr can show the routes, including gateways, that the kernel is currently using.

To explicitly release a dhcp connection, do something like dhclient -r eth0

If your computer and network is set up correctly, you should now be able to ping your gateway and access sites on the internet by IP address. However, in order to access sites by name you need the help of DNS. Add entries to the /etc/resolv.conf file as a superuser in this format (you can have as many as you want):


Now, if you point your browser to a domain name like, you should be able to get there. Welcome to t3h 1nt3rw3b. You can also do all the above by accessing the System->Administration->Network menu.

Update (in light of ubuntu-users post and responses):
For switching from one interface configuration to another (assuming eth0 and correct /etc/network/interfaces):
  1. sudo ifdown eth0
  2. edit /etc/network/interfaces
  3. sudo ifup eth0
SIOCDELRT: No such process means something is screwy. You probably have the wrong number (i.e. gateway) somewhere. Haven't determined exactly what this means.


kiba-dock (couldn't find the project page...) is an OSX-like dock that you can use to launch applications, and it also has some silly animations to go with it. I installed it on Ubuntu Edgy Eft 6.10 using the instructions here. As the poster mentions, it only works properly after you try and install the second time. Strange, but it works. If you're not running some fancy compositor-window manager like XGL/Compiz or AIGLX/Beryl, it might look pretty ugly (black boxes around everything, sometimes text doesn't show up, etc.). I'm using Beryl and it looks fine.

To use kiba-dock, drag icons onto the dock to be able to launch them from the dock. kiba-dock is, of course, completely customizable (colors, position on screen, physics, etc.) so if it's not immediately to your taste, you can change it.

To launch kiba-dock at startup go to System->Preferences->Sessions and under Startup Programs add kiba-dock.

Here's a video of kiba-dock in all its glory:

Tuesday, December 19, 2006


Beryl is a super-sweet, super-configurable fork of Compiz (also see earlier post). Here I will describe how I got it set up on my system and some cool things to do with it.


Here are my specs:
  • 2 Hyundai 17" screens
  • 32-bit OS (Ubuntu Edgy Eft 6.10)
  • nVidia Geforce graphics card
Following the instructions on the Unofficial Edgy Eft Starter Guide, I got AIGLX/Beryl to work on only one screen without problems. To enable Twinview (sharing one desktop accross two physical screens), enter sudo nvidia-settings in a terminal and go to X Server Display Configuration (this, by the way, beats the hell out of hacking the /etc/X11/xorg.conf file). Click the Configure... button on the middle right and select Twinview. Be sure to back up your xorg.conf file before clicking Save to X Configuration File at the bottom and then exiting out of the settings manager. Hit Ctrl+Alt+Backspace to restart the X server.

Unfortunately, Beryl on Twinview made windows appear without titlebars or borders. I also got this message in the terminal when I disabled the session startup scripts and tried to run beryl-manager in the terminal:

beryl: No GLXFBConfig for depth 32
beryl: No GLXFBConfig for depth 32
beryl: No GLXFBConfig for depth 32

So, to the xorg.conf file! Under the Screen section, add this line:

Option "AddARGBGLXVisuals" "true"

I restarted the X server again and everything worked fine. Well, let me qualify that: at least nothing was obviously wrong. Some things are still somewhat slow like window resizing and scrolling. It appears that
others are having similar problems. However, this works well enough for me.

Features/Cool things to do

All these commands (and the themes) are completely configurable... just fool with the settings by clicking on the red stone in the system tray and selecting one of the managers... here are just some of the default settings
  • Ctrl+Super_L: water drop on desktop (hold down keys and move mouse for trail)
  • Shirt+F7: Window wake
  • Shirt+F9: Raindrops
  • Super+Mouse Wheel: Zoom
  • Alt+Mouse Wheel: Make a window transparent/opaque
  • Super+N: Make a window negative
  • Super+M: Make the whole screen negative
  • Alt+Left Mouse Button: Drag a window
  • Alt+Click Wheel: Resize a window
  • Ctrl+Alt+Left/Right: Spin the cube
  • Ctrl+Alt+Left Mouse Button: Drag the cube
  • Alt+Tab: Switch applications
  • F10: Expose-like effect
Here's where to configure desirable features in the Beryl Settings Manager:
  • A 3D world: Have windows separated in a third dimension from each other (drag and rotate the cube to see!)
  • Animations: Flames, Magic Lanterns and such
  • Scale: Expose-like effect
Some Beryl demos on YouTube

Tuesday, December 05, 2006

Bash prompt customization

Using old UNIX machines is a pain sometimes. The 10-year-old features just don't mesh with the current ones, and it just doesn't feel right. Also, the prompt might not display any useful information. Heresy, I say! Follow these steps to make yourself feel more at home. Some information taken from this article.

To get an Ubuntu-like prompt (assuming bash is installed):
  1. Edit the .bashrc file with an editor like vi
  2. Add this as the last line: export PS1='\u@\h:\w$ '
Other prompt configuration options:
  • \! History number of current command
  • \# Command number of current command
  • \d Current date
  • \h Host name
  • \n Newline
  • \s Shell name
  • \t Current time
  • \u User name
  • \W Current working directory
  • \w Current working directory (full path)
To get easy access to some obscure directory: alias [name]="cd [absolute directory path]"

You can also edit the .login file, which executes immediately when you log in. (It might go by a different name depending on the shell... see here for details)

Use set -o emacs (the default) or set -o vi to set your command line editing mode of choice.

And remember kids, don't forget to write the other users if on a public machine! (Or maybe talk, or wall if you're the admin).

More links