Planet Foo-Projects

December 26, 2009

Brian Tarricone

Amazon MP3 Downloader on 64bit Gentoo Linux

(This is going to be a bit of a narrative. If you’re impatient, scroll to the “How-To” section at the bottom of the post.)

Today I decided to download an MP3 album from Amazon. I actually wanted all the songs on the particular album, and noted that you save a couple bucks by downloading the whole album vs. downloading each individual song. So click through, and find that it requires the Amazon Download Manager thingo.

Lame, I think. I click the download link, and it actually gives me some buttons to choose from that have to do with Linux. Huh. Nice work. However, I assume it’s closed-source proprietary crap. But hey, why not give it a try.

My choices are two .deb files, one for Ubuntu Jaunty, and one for Debian 5, or two .rpm files, one for Fedora 11, and one for OpenSuse somethingorother.

So I grab the Ubuntu one. I’m on Gentoo, so I “emerge dpkg”, and then run “dpkg -x amazonmp3.deb .” in an empty directory. I look in usr/bin that it created, and find a binary. But it’s a 32bit binary.

Crap.

I run ‘ldd’ on it, and of course it needs gtk and a bunch of other stuff that I don’t have 32bit libraries for. Like boost.

So I think, ok, I can install a 32bit chroot. So I download the stage3 Gentoo i686 tarball and unpack it in /opt/gentoo32. I also “emerge schroot” in my regular system, and set that up. I recently found schroot while using Ubuntu at work. It’s awesome. Eventually the stage3 tarball finishes up, so I schroot into my new 32bit environment and “emerge libboost”. After it’s finished, I note a problem. Amazon’s binary is expecting some weird version of boost that has “gcc42″ in the filename. Also, I just installed boost 1.35, and it wants 1.34. Out of desperation, I try to make symlinks to the correct file names, assuming it probably won’t work. I was right: it doesn’t work. Balls.

Then I think… well, why not install a chroot of 32bit Ubuntu Jaunty? I “emerge debootstrap” and pray… yep, it’s in portage, excellent. I install it, schroot into it, and apt-get a bunch of the libboost packages, and… holy crap, it works.

How-To

Here’s a step-by-step. This is for Gentoo, but it should work equally well on any system where you can install debootstrap and chroot. The following instructions assume you’ve installed them already.

As root on the “main” system:

# mkdir -p /opt/ubuntu-jaunty-32
# debootstrap --arch i386 jaunty /opt/ubuntu-jaunty-32 http://archive.ubuntu.com/ubuntu/
# cat >/etc/schroot/chroot.d/jaunty32.conf
[ubuntu-jaunty-32]
type=directory
description=Ubuntu Jaunty (32-bit)
location=/opt/ubuntu-jaunty-32
priority=3
users=$USER
groups=$USER,root
root-users=root,$USER
root-groups=root,wheel
personality=linux32
run-setup-scripts=true
run-exec-scripts=true
aliases=jaunty
[hit ctrl+d]
# cat >/etc/schroot/mount-defaults
/proc		/proc		none	rw,bind 	0	0
/proc/bus/usb	/proc/bus/usb	none	rw,bind		0	0
/sys		/sys		none    rw,bind		0	0
/dev		/dev		none	rw,bind		0	0
/dev/pts	/dev/pts	none	rw,bind		0	0
/dev/shm	/dev/shm	none	rw,bind		0	0
/home		/home		none	rw,bind		0	0
/tmp		/tmp		none	rw,bind		0	0
/var/run/dbus	/var/run/dbus	none	rw,bind		0	0
/usr/portage	/usr/portage	none	rw,bind		0	0
[hit ctrl+d]
# schroot -c jaunty
(32bit)# groupadd -r staff
(32bit)# apt-get update
(32bit)# apt-get install sudo curl libglademm-2.4-1c2a xdg-utils libboost-date-time1.34.1 libboost-filesystem1.34.1 libboost-iostreams1.34.1 libboost-regex1.34.1 libboost-signals1.34.1 libboost-thread1.34.1
(32bit)# dpkg -i $DOWNLOAD_DIR/amazonmp3.deb

Note that I didn’t just type all this verbatim… this was just my memory of what I did. So if something’s missing, please leave a note in the comments and I’ll update this.

Next you can try running “amazonmp3″ to test it. If that works, you can go back out to your “real” system (just type “exit” in that shell), and do this:

# mkdir -p /usr/local/bin
# cat >/usr/local/bin/amazonmp3
#!/bin/bash
schroot -c jaunty -p /usr/bin/amazonmp3 -- "$@"
[hit ctrl+d]
# chmod +x amazonmp3

This creates a script in your “real” system that will chain to the 32bit amazonmp3 binary in your Jaunty chroot. You can set up your browser of choice to automatically launch this script when you download .amz files. At this point you can try running “amazonmp3″ from your “real” system (outside the chroot) and see if that works.

There are also a few other things:

  1. If you are running a system that uses GDM to log in, you may need to add /var/run/gdm to the bind mounts in the mount-defaults file or else apps started in your chroot won’t be able to connect to your X server.
  2. If you’re using non-default gtk2 theme engines on your “real” desktop”, you’ll need to install them in the chroot (via apt-get) as well. Well, ok, you don’t have to, but if you don’t, the Amazon app will look uglier than it should.
  3. Remember to always pass the “-p” option to schroot. If you don’t, the environment in the chroot will get reset, which means you’ll lose your DISPLAY env var, and you won’t be able to connect to the X server without manually setting it.
  4. When I first ran the apt-get command in the chroot, I got some weird errors at the end of the process about some packages not being configured because another package (gtk, I think) that it depended on hadn’t been configured yet. Just running the same apt-get command a couple times fixed it, strangely.
  5. Make sure your “real” system has /usr/local/bin in the PATH.

Anyhow, that’s it. Works like a charm.

by Brian at December 26, 2009 08:49 AM

October 23, 2009

Moritz Heiber

Moon

Just a quick recommendation: If you happen to be so lucky as to have a theater screening of Duncan Jones' "Moon" near you .. go see it. It's a brilliant movie with quite a lot of plot twists you either haven't seen in a long while or ever before. The general idea of the plot probably has been around in one or two scifi-novels but I don't reckon in any movie adaptions thus far. This movie really nails it's topic. I don't want to spoil too many beans, but .. if you're into HAL and you always thought he was too mean to actually appear anywhere near a space mission you'll definitely be enjoying this one extra ;-)

read more

by moe at October 23, 2009 10:43 AM

September 13, 2009

Moritz Heiber

Picasso's napkin

The story goes that Picasso was sitting in a Paris café when an admirer approached and asked if he would do a quick sketch on a paper napkin. Picasso politely agreed, swiftly executed the work, and handed back the napkin — but not before asking for a rather significant amount of money. The admirer was shocked: “How can you ask for so much? It took you a minute to draw this!” “No”, Picasso replied, “It took me 40 years”

This goes out to all the friends and colleagues who had their work under-appreciated, regarded with spite or even thrown out completely because they demanded a reasonable pay for it.

When I do work for anybody I don't just sit in front of a computer. I sit in front of a computer because YOU couldn't. I sit in front of a computer because my knowledge and the time I already spent sitting in front of computers entitles me to sit in front of YOUR computer. I sit in front of YOUR computer because I have sat in front of computers for the past 15 fucking years and yes, that time, inevitable, to me, is lost in a sense that I cannot spend it on anything else ever again.

But you're right. I chose to. Because I thought it might come in handy. Nonetheless, right now, I gathered enough experience to manage whatever ridiculous situation YOU have gotten yourself into. Probably by "trying it yourself" or, at first, trying to talk somebody less experienced into accepting a ridiculously lower pay in exchange for their, probably still sufficient, services.

I have never demanded payment from anybody EVER whose tasks muttered out for me in the first place (I emphasize on "first place" because conditions around computers tend to change whenever somebody with actual experience and knowledge assesses a certain problem or situation. You wouldn't expect anybody to repair your car for half the price because his assessment of the damage done differs from your own to a pretty high extend, would you?) , either in speech or writing, I didn't satisfy to the full extend. Computers are complicated and fragile. And one should probably exterminate Microsoft, Apple or any other company trying to suggest otherwise to the paying imbeciles they call consumers.

Computers can do miraculous work. In a fraction of the amount of time a human would need to accomplish the same. But that comes at a very steep price. The learning curve for computer related work doesn't go down over time. On the contrary: It sets for record highs. Which means its getting harder and harder to keep up the longer you try to advance into any given direction. Because, not only need you to keep up with the changes introduced to the "regular" model you learned in the past. You also need to keep up with future development .. which has been accelerating rapidly and will be accelerating rapidly for decades to come (mainly because computers from three years ago are about as powerful as 1/10 of today's). At one time you might just know what to do with a certain program or library. Yet, two versions later you may very well hit the ground hard because strings tying your program's code into another programmer's work have been broken, cut or crippled and you have to start all over again (Granted, usually you do not have to start from scratch but never underestimate the magnitude of changes introduced by upstream development. Plus, a day has only so many hours and you're probably not able to keep up with every new release and every change introduced to software you use while living a healthy life). It takes an enormous amount of time, money, sweat, tears and sobering beverages to get through all this. And in the end you're still socially inept, you probably don't have a girlfriend and the pizza-delivery-guy is the closet you have to a relative.

Of course, I'm stretching it. A lot of people manage very well without accepting these pretenses and still are successful and are able to earn a living working with computers. But as a matter of fact, many aren't. And I'm not blaming their hideous social lives or unhealthy eating habits on you or the job you're about to give them. Anybody should be grateful for a job opportunity that suits them (and here's a little hint for all the morons complaining about their work situation: Don't accept job offers that look like you're not going to enjoy them. Cancel your contract if you do not enjoy working with your current contractor. Quit working at the company you endure a ride to through morning traffic every day just to basically live in agony chained to your cubicle. There are literally hundreds of thousands of job opportunities springing up by the SECOND each and every day. I mean, look at me. I don't own a company, I don't do advertising, I don't hand out CVs, I don't even (legally) call myself a contractor. Yet, I do own about 600 - 800 bucks each month fixing or working with computers. Now, just think about the amount I COULD actually make if I was to proactively pursue this career opportunity). You always have a choice. And if people choose to turn into social wrecks and eat fast food all the time that's their problem.

What I'm trying to say here is: Yes, we all do know how to fix your computers. Yes, we can do it fast, efficient and (sometimes) without anybody even noticing there had been a glitch in the first place. But, although it might look like we're just pushing a few keys and it only takes an hour to resolve what has been a mess for weeks and given you nightmares for countless nights that doesn't mean we should be credited with the same amount a "barista" (I just love them rebranding the term "mindless worker drone" into something sounding so fashionable. Kudos!) at Starbucks gets for producing about 5 frappocinowhateverthefucklattes an hour.

When we sit in front of a computer screen we do our work. And its conscious work. And its honest work. And it might not be obvious to you. Because in about 99% of cases we work on WHAT YOU FUCKING SEE IS NOT WHAT YOU FUCKING GET (WYFSINWYFG!)! And if you're not comfortable with that then GO HUMP A RHINO or LEARN TO DO IT YOUR FUCKING SELF. And if you think you can get the same quality value at a lower price from someone somewhere else at some time .. your are mistaken. Because, as with all businesses, the cheaper they are the lower their quality value is in the end. Plus, I get to tell you I FUCKING TOLD YOU SO (and I can really make it hurt. Seriously.).

So, the next time you reach out to someone with, to you, exuberantly skillful geeky computer hands to fix a problem you couldn't get around to fixing yourself .. remember what he had to put up with in order to get to the point where his hands are actually as geeky, skillful and qualified enough to handle whatever problem you throw at him.

Of course, don't be stupid. Check his references, maybe even talk to some of his former employers to find out if he's the right match for you, your company and your problem or position. Even contracting the best specialist at hand might not be the right choice in case it turns out he doesn't quite fit in.

Don't go for degrees. Degrees, in this rapidly accelerating, computerized economy, have the same face value as a blank sheet of paper. Instead, try googling your future employee. If he has been working with computers before and, supposedly, is the expert he claims to be chances are Google has thousands of citations, code snippets and other information that lead to an informed decision about whether or not to bargain with him.

Oh, and, keep in mind the next time I work for you: You called me. You wanted me to fix something you couldn't fix by yourself. It might be blatantly easy for me. It wasn't for you. Otherwise I wouldn't be sitting in front of YOUR computer but in front of my own. And me being able to do what I do has cost me countless hours, days, weeks and years of life and still will for a long time.

And you better be fucking paying up for it. Thank you very much.

read more

by moe at September 13, 2009 11:37 AM

August 18, 2009

Brian Tarricone

Code Comments

I’m a bit of a minimalist when it comes to commenting my code. This is probably in some ways a bad thing; code that is completely obvious to me in its function may be difficult to understand for others, and I’m often not so great at realizing this on the first pass.

So that leads me to the purpose of code comments:

The purpose of commenting your code is to inform readers of that code what a section of nontrivial or non-obvious code does.

At least, this is my definition. Opinions differ, I’m sure. I might also add to that a clarification: “readers” in this case may include yourself. Code you wrote may even be incomprehensible to you if a decent amount of time has passed.

From this definition you can also infer something else, that I believe it’s unnecessary to comment obvious code. In fact, I’d argue that it’s harmful to comment obvious code, because you’re making it harder to follow, and you’re adding a barrier in front of the reader being easily able to distinguish between trivial and nontrivial code at a glance. You also increase the length of the code fragment, which may make it more difficult to read and understand in its entirety (if you can’t fit the entire fragment on one screen, you’ll have to scroll back and forth to see the entire thing).

However, too often — very often, it turns out — I see things like the following:

/* take a reference */
g_object_ref(object);
/* free string */
g_free(str);

And one of my favorites:

/* set the label text to "Time Left:" */
gtk_label_set_text(GTK_LABEL(label), "Time Left:");

(Yes, I actually have seen something very similar to that, though I don’t remember what the label text was.)

How do these comments actually add anything useful to the file? Every time I see one of these, a little part of me dies inside.

Now, the last one is just silly. Even someone who has never developed using the gtk+ UI toolkit can figure out what that line of code does without the comment. If you can’t, then a code comment there probably isn’t going to be enough to help you overall in any case.

The middle one is equally silly, though it’s understandable that someone might not know that g_free() is the glib equivalent of free(). However, consider your audience: is an extra line of code for a comment really useful here?

The first one is not quite so easy for me to dismiss. It presupposes a few bits of knowledge:

  1. Understanding of what reference-counted memory management is.
  2. Familiarity with the “ref/unref” pair, as opposed to only being exposed to something like the OpenStep “retain/release” (or even the COM/XPCOM “AddRef/Release”) terminology
  3. At least passing knowledge of what a GObject is

Now, for code that makes heavy use of reference counting, I think presupposing #1 is not unreasonable. In this case, it doesn’t matter: the comment as presented will not help you if you don’t know what reference counting is.

Points #2 and #3 depend on your goals and potential audience. If you think that a decent number of readers may not be familiar with the “ref/unref” terminology, “take a reference” is probably enough to generate an “oh, duh!” moment in the reader’s head. As for #3, unless you intend your code to be able to act as a sort of GObject tutorial, that is, something that people aspiring to learn GObject programming might want to read, I think the comment there does not serve people unfamiliar with GObject. Regardless, most GObject-using code will probably be pretty confusing to someone who doesn’t know GObject, so whether or not you should comment g_object_ref() is going to be the least of your worries.

Now, I’m not going to claim that my code commenting is perfect… far from it. I could certainly stand to sprinkle comments a bit more liberally throughout my code. I tend to only comment public API (and then just a description of what the function does, not how it does it), and code fragments that are really nontrivial[1] and potentially hard to understand.

But there has to be a happy medium somewhere. While too-infrequent commenting can certainly make code harder to understand, I’d argue that too-frequent commenting is worse. It’s sorta like “the boy who cried wolf” in the sense that comments draw my eyes to them as a way of saying, “pay attention! This bit here is important!” (or tricky, or whatever). Overuse of comments just makes me start skipping over all of them, useful or otherwise.

[1] It’s worth noting here that this point further reduces my volume of comments. I generally prefer clear code over neat hacks, even if the neat hack represents a reduction in lines of code or a moderate increase in performance. If I write a section of code and then look at it again and see that it looks too complex, I’ll usually try to immediately rewrite it to be simpler.

by Brian at August 18, 2009 06:39 PM

August 07, 2009

Moritz Heiber

MacBook update

So, how's it been going the past few months you might be asking. Well, lets say .. I still don't regret having bought a MacBook. Up to this point actually, back in January I was thinking, I may very well be crying out loud for a sudden replacement wishing my old Linux installation back in an instant. Yet, that is not the case. Well, mostly. Lets break it down:

    read more

    by moe at August 07, 2009 12:07 PM

July 06, 2009

Brian Tarricone

New Laptop (aka Gentoo On MacBook Pro 5,5)

NB: I’ve cleaned up this guide and moved it, and I’ll continue to update it there. This blog post will not get any more updates.

Those of you who have chatted with me over the past… er… 18 months or so… know I’ve been wanting a new laptop for a while. Those of you who have chatted with me over the past 6 months know that I’d settled on a 13″ MacBook, but I wanted to wait until Apple’s next refresh/update before making the purchase.

Apple updated their laptop line at WWDC in June 2009, and I was pretty much perfectly sold on the 13″ MacBook Pro (one of the “updates” was to rebrand the 13″ aluminum unibody MacBooks as Pro models).

I was in Maryland for a wedding, and decided to take advantage of the lower tax rate (than California’s) and my sister’s educational discount (she’s a teacher). As a nice bonus of the edu pricing, I also got a free 8GB iPod Touch (which I really like a lot more than I expected to).

So ok, enough background.

Vital stuff: this describes my experience installing Linux on a June 2009 era MacBook Pro 13″. DMI reports that this model name is “MacBookPro5,5″. This guide may work for other similar systems, or it may not.

lspci output for this laptop:

00:00.0 Host bridge: nVidia Corporation Device 0a82 (rev b1)
00:00.1 RAM memory: nVidia Corporation Device 0a88 (rev b1)
00:03.0 ISA bridge: nVidia Corporation Device 0aae (rev b3)
00:03.1 RAM memory: nVidia Corporation Device 0aa4 (rev b1)
00:03.2 SMBus: nVidia Corporation Device 0aa2 (rev b1)
00:03.3 RAM memory: nVidia Corporation Device 0a89 (rev b1)
00:03.4 RAM memory: nVidia Corporation Device 0a98 (rev b1)
00:03.5 Co-processor: nVidia Corporation Device 0aa3 (rev b1)
00:04.0 USB Controller: nVidia Corporation Device 0aa5 (rev b1)
00:04.1 USB Controller: nVidia Corporation Device 0aa6 (rev b1)
00:06.0 USB Controller: nVidia Corporation Device 0aa7 (rev b1)
00:06.1 USB Controller: nVidia Corporation Device 0aa9 (rev b1)
00:08.0 Audio device: nVidia Corporation Device 0ac0 (rev b1)
00:09.0 PCI bridge: nVidia Corporation Device 0aab (rev b1)
00:0a.0 Ethernet controller: nVidia Corporation MCP79 Ethernet (rev b1)
00:0b.0 IDE interface: nVidia Corporation Device 0ab5 (rev b1)
00:10.0 PCI bridge: nVidia Corporation Device 0aa0 (rev b1)
00:15.0 PCI bridge: nVidia Corporation Device 0ac6 (rev b1)
00:16.0 PCI bridge: nVidia Corporation Device 0ac7 (rev b1)
02:00.0 VGA compatible controller: nVidia Corporation Device 0863 (rev b1)
03:00.0 Network controller: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller (rev 01)
04:00.0 FireWire (IEEE 1394): Agere Systems Device 5901 (rev 07)

Install Media

I decided to put Gentoo (the x86_64 version) on it. So, I grabbed the latest minimal installer (dated 20090618) and booted it. I was disappointed to find that the keyboard didn’t work after boot, so I couldn’t go anywhere with it. I Googled around a bit, but wasn’t able to find anything (except for the possibility of the usbhid driver failing to load due to an unrecognised option, which I thought a bit unlikely). After some head-scratching, I downloaded the install/live CD of Ubuntu 9.04, and booted that. To my happiness, the keyboard was working fine.

rEFIt

Backing up a little… Before booting the Linux CD, first I installed rEFIt from inside MacOS X. I didn’t burn the rEFIt bootable CD; I just went ahead and used the Mac installer which did the job without rebooting. After that I could still boot other CDs by holding down the “c” key while booting, but if I didn’t, I got a nifty boot menu with MacOS X listed.

Dual Boot

I decided I wanted to keep my MacOS X partition, so I fired up Disk Utility and resized the HFS+ MacOS partition down to 40GB. Yes, amazingly, current Leopard (10.5.7) Disk Utility can resize the startup volume while MacOS is running, without needing to use the installer DVD or reboot at all. It just resizes it live and you’re done. It was very quick, too.

BIOS Mode and Partitioning

I’ve read various sources that said that the proprietary nvidia drivers would not work with the machine in native EFI mode (though this seems to suggest otherwise, but I haven’t tried it), so it would have to be booted in BIOS mode. Unfortunately, this makes partitioning the drive a little annoying, as I wanted to keep MacOS X to dual-boot. The GPT partition table layout has a legacy MBR mode for booting BIOS-mode OSes (in our case, grub is the legacy OS).

The MBR compatibility mode only supports four primary partitions, and no extended partitions, so the partition with your kernel on it needs to be one of the first four. Since Apple takes up the first two partition slots (I’m told MacOS X will boot without the first partition, but it’s unclear as to whether or not missing that partition will screw up Apple-supplied updates later), that leaves two left. Plenty. Three and four ended up being /boot (96MB), and / (around 60GB). Initially, I was debating leaving out the swap partition, but Linux’s suspend to disk (aka hibernate) requires a swap partition, so I allocated 4GB for it. The rest of the space I allocated for /home. I used ext3 for the root and home partitions, since I don’t trust ext4 yet, and tools for manipulating ext4 volumes from other OSes are currently nonexistent. For the boot partition I used ext2, and set ‘noauto’ in the mount options so it doesn’t get mounted unless I tell it to. Note that *all* of these partitions should be primary partitions. GPT doesn’t use anything else. Grub will only be able to see my first two Linux partitions (/boot and /), but that’s fine, as the kernel will be on /boot, and once Linux comes up it will know how to read the real GPT partition table to find the rest of the partitions.

GPT Resync

After partitioning, I rebooted and selected the GPT/MBR partition table sync item from the rEFIt boot menu. This turned out to be unnecessary for me (I think gparted did it for me?), but this might be needed in some cases.

Gentoo Install

After partitioning, I pretty much followed the normal Gentoo install procedure (downloading a stage3 tarball, unpacking it to the root partition, chrooting, setting up a new kernel and various stuff, installing grub, and rebooting). It was remarkably painless. After the reboot, the rEFIt boot menu had an entry for Linux (with a cute penguin icon) next to the MacOS X entry, so I selected that and booted.

Kernel

I started off with the gentoo-sources-2.6.30-r1 kernel (and just today updated to -r2 with no trouble). Here’s my kernel config. I set up the uvesafb framebuffer console driver, which seems to work great.

Video

I installed nvidia-drivers-180.60. Previous versions did not compile against the 2.6.30 kernel. I created a minimal /etc/X11/xorg.conf file that only had 4 lines in it to set the video driver to “nvidia” and let the X server auto-config the rest. It appears to work fine; came up the first time at 1280×800 automatically. I didn’t test the external monitor support, as I don’t have any DisplayPort devices, and I didn’t buy the DVI adapter.

Display Backlight

The backlight didn’t work at first, because it looks for specific MBP models, and this new laptop has a newer model number. I simply patched the ‘mbp-nvidia-bl’ driver (update: see below for a better patch) in the kernel to add “MacBookPro5,5″ as a recognised model. However, the backlight controls for some reason do not work while X is running. I suspect the nvidia driver to be at fault here, but more investigation is needed. I’m going to give nouveau a try at some point to see if this fixes any issues (though of course I’ll lose 3D accel with that).

Update (2009/07/14): The ‘nvclock’ program is able to set the backlight brightness while X is running, so I ‘ported’ the code that does that to the kernel driver. It’s not the best patch in the world, but it’s here if you want to give it a try. I’m told that this is not really a correct way of fixing the problem, as it’s not reasonable to poke at memory addresses owned/reserved by another driver (nvidia, in this case). So expect that some weirdness might occur if you use my patch.

Keyboard Illumination

The keyboard illumination works. The ‘applesmc’ driver detects it and creates a LED-class device (you can see it in /sys/class/leds). The ‘pommed’ daemon is supposed to support this, but I haven’t tried it yet because it requires patching to support the “MacBookPro5,5″ string. Otherwise I can manually set the keyboard lighting via the sysfs interface (just to verify it works). The ‘pommed’ daemon will monitor the light sensor and adjust the keyboard brightness accordingly. I needed to patch it to get it to recognise the new model string. Apparently upstream already has a patch and support will work in the next release. I also patched it to increase some ridiculously-stupid battery-wasting 200ms timeouts into equally-useful 2s timeouts. Ideally it shouldn’t poll at all, but I don’t care enough to put in the work to make that happen.

Touchpad

The touchpad works with the ‘bcm5974′ kernel driver and xf86-input-synaptics X.org driver. Note that to make X.org correctly use the synaptics driver when you aren’t providing an xorg.conf file, you need a very recent version of the hal-info package (otherwise it will use the evdev driver). I also have a custom .fdi file to specify some extra options for the driver. Left click works, and 2-finger clicking for right click and 3-finger clicking for middle click work as well. Two-finger horizontal and vertical scrolling work fine. One major annoyance is drag and drop: with MacOS running, I can click and hold with my thumb, and drag with my index finger (while keeping my thumb still). With Linux, I have to click and drag with the same finger, which is very awkward. I filed a feature request about this.

WiFi

The WiFi works, but unfortunately not with the open source ‘b43′ driver, as that driver does not yet support Broadcom 802.11n chipsets. Broadcom provides a closed-source proprietary driver which seems to work decently, though the speeds I’m getting aren’t great, and it has a lot of trouble finding my 5GHz 11n AP sometimes (it finds the 2.4GHz 11g AP just fine though). Udev initially assigned the device the “eth1″ name, which I didn’t like, so I edited /etc/udev/rules.d/70-persistent-net.rules to change it to “wlan0″. NetworkManager works, though intermittently it won’t be able to find any APs (despite the fact that “iwlist wlan0 scan” shows APs). I anxiously await support from the ‘b43′ driver.

When compiling the Broadcom ‘wl’ driver, be sure to read the README on their website. The compilation is a little weird as they only provide a stub Makefile for use with the kernel’s build system. You’ll probably want to add ‘wl’ to /etc/conf.d/modules (or /etc/modules.autoload.d/kernel-2.6) to get loaded on startup. You may want to add ‘b43′ and ’ssb’ to the blacklist in /etc/modprobe.d to be safe. If even the ssb driver gets loaded (even if b43 is not loaded), wl won’t work.

One oddity: wl requires the full suite of lib80211 helper modules, including the crypto ones. For some reason these don’t get built properly unless you compile another driver into the kernel that needs them, like CONFIG_HOSTAP (you can just compile it as a module).

Bluetooth

The bluetooth chipset is detected, using the standard ‘btusb’ driver. I haven’t tested functionality yet because Bluez 4 is giving me issues.

iSight Camera

The iSight works just fine with the ‘uvcvideo’ module. Interestingly, on this laptop I did not have to extract the firmware from Apple’s MacOS X driver. Oddly, sometimes the driver for it fails to load properly, complaining about not finding a “video chain” or something similar, but removing and reloading the driver usually fixes it (very occasionally a reboot seems to be required).

Sound

I haven’t been able to get sound to work yet. The snd-hda-intel driver appears to detect the device, and I can unmute it and change the volume, but playing .wav files using aplay doesn’t produce sound. I didn’t get any output from the dual-purpose audio in/out jack either. I’ve tried the patch here, as well as trying ALSA’s git repository, but no luck. My current guess is that Apple decided to use a new sound chip. I filed an issue report with ALSA here. My bug hasn’t appeared to gain any attention, but someone else’s post to alsa-devel has gotten some response, so it looks like this is being worked on.

Update (2009/07/10): There’s now experimental support for the Cirrus Logic codec in the hda-cirrus branch of Takashi Iwai’s sound-unstable-2.6 tree. I imagine this’ll end up in 2.6.31 or .32. I haven’t tried it yet, but it’s been reported to work on the MacBookPro5,5 (and was indeed the motivation for writing the codec support).

Update (2009/07/12): The new driver works for me, though the sound-unstable-2.6 tree is based on 2.6.31rc1 as of this writing, so it’s a little bit of a pain because neither the Broadcom wl driver nor the nvidia binary driver compile correctly against it. I whipped up a couple patches and submitted them to Gentoo’s bug tracker (for broadcom-sta, for nvidia-drivers), so hopefully they’ll get included in the portage tree soon (and presumably added to future releases). Here’s my new kernel config; you just need hda-intel with Cirrus Logic codec support. You could also compile it into the kernel, but I’ve left it as modules for now.

Suspend/Hibernate

Untested.

Update (2009/07/16): I wish I’d tested this first off, because suspend at least worked perfectly out of the box. No tweaks necessary. I just installed pm-utils and suspended via HAL (using xfce4-power-manager in my case). I imagine calling ‘pm-suspend’ from the command line would work as well.

Miscellaneous

Shutdown and reboot do not work. The system just halts and locks up. You’ll need to hold down the power button for 5 seconds to shut it off. On a rare occasion shutdown will actually power off the unit, but reboot has never worked. I suspect that dropping the BIOS emulation and booting in EFI mode will solve this problem.

USB works fine for mass storage devices, at least. The SD card reader is detected as a usb-storage device, and works as it should.

Firewire drivers load (I used the kernel’s “new” firewire stack) and detect the chipset just fine, but I don’t have any devices to test it with.

This laptop has an accelerometer (aka Apple Motion Sensor). It appears to work; I can read the machine’s orientation via sysfs, but I don’t know if there are any daemons that will watch it and park the heads on the hard drive if the laptop gets shaken/dropped. There are also other nifty things you can do with it that I haven’t tried.

All things considered, I’m pretty happy. I haven’t gotten to a point where I can give meaningful battery life numbers, but I’ll try to get to that soon. The machine seems to run pretty cool and quiet, even while compiling for a while. My only major outstanding issue is sound.

BIOS mode vs. EFI mode

In order to get shutdown and reboot working, I’ve been trying to boot in EFI mode, with no success yet. I’ve tried the latest SVN versions of grub2, but I’ve had a lot of trouble. rEFIt only seems to find grub.efi if I put it on the HFS+ MacOS X partition; if put it on the Linux partition, it doesn’t work. Running rEFIt’s EFI console and poking at the disk partitions seems to indicate that it’s failing to read the ext3 partitions for some reason.

Grub2 otherwise just seems very buggy. The config file parsing doesn’t appear to work (when grub2 loads, it prints messages about “menuentry” being an invalid command). Despite the fact that linux.mod is loaded, “linux” isn’t being recognised as a valid command. In fact, after I use many commands once, successive uses claim that the command is invalid. Even the “help” command doesn’t work (fortunately, hitting the tab key lists valid commands). I’ve mostly given up on grub2. One of the nice things about grub2 is that, if you boot in BIOS mode, you can dump your main and video BIOS images which grub2 can later load/emulate on bootup in EFI mode, which presumably would allow the nvidia drivers to work correctly.

So next I’ll be giving elilo a try. It apparently doesn’t have support for loading BIOS images, but maybe I can get that to work eventually.

by Brian at July 06, 2009 09:28 AM

July 02, 2009

Brian Tarricone

iTunes Protected vs. Unprotected

Dear lazyweb,

A friend of mine has released an album on the iTunes store, and I want to buy it to support her. Of course, I don’t want to buy it there if it’s a DRM-protected AAC file. Anybody know how you can tell before you buy? I checked both using iTunes on a Mac, and on the iTunes Store app on my iPod Touch, but I can’t seem to figure it out.

It seems her album is also sold on Amazon (cheaper, even), and they sell 256kbps MP3s, so I’ll probably end up doing that regardless. But it would be nice to know if you can figure this out for Apple’s store too.

Update: It appears everything on the iTunes store is now DRM-free. Interesting.

by Brian at July 02, 2009 08:41 PM

June 17, 2009

Brian Tarricone

On In-Kernel Drivers

It’s pretty well-known that the Linux kernel developers advocate getting your drivers into the main line kernel tree. Doing so ensures that your driver always gets fixed to conform to the latest “correct” internal interfaces when they change, and in-kernel device drivers always get distributed with the kernel, so you get automatic end-user distribution for free.

While I agree with that (without touching the question of whether or not a stable driver binary API/ABI would be useful), I’m not entirely sure it’s the best thing in the world for some types of device drivers.

While reading a post by Carl Worth on recent (perceived?) driver stability issues with the Intel video driver for Linux, I came across this bit of insight:

It used to be that getting the latest Intel driver just meant updating an xf86-video-intel module or upgrading an xserver-xorg-video-intel package. But now it’s essential to get a recent kernel as well… And these fixes aren’t in a major kernel release until 2.6.30 which appeared only today.

This is a problem that perhaps highlights some types of drivers that may be served better by being maintained outside the main line Linux kernel tree. Of course, this is only true while the driver is actively maintained and maintainers are able to quickly update the driver for new kernels (without breaking backward compatibility) as in-kernel interfaces change.

He also notes that distribution maintainers tend to update critical parts of the system (like the kernel) less often than userspace portions (like X.org video drivers). Since the xorg-video-intel driver depends on an in-kernel driver, it’s easy for these two things to become out of sync on an end-user’s system without testing. Or, frustratingly, the maintainer of the userspace package for a video driver might be unable to update to a newer version of the userspace driver because the kernel packager doesn’t wish to upgrade the entire kernel to become compatible with that userspace package (which is an entirely reasonable position to take).

And with more video drivers expected to move toward having significant kernel portions, this problem can only get worse. What if the latest userspace package for drivers A and B both depend on kernel 2.6.30, and the maintainer of package A wants to update, but the package B maintainer doesn’t (perhaps there’s a bad bug in the latest version of B)? Even if the A package maintainer can convince the kernel maintainer to update, doing so might break things for other users.

Now, sure, having dependency issues like that is nothing new, but I submit that this is a bit different. The kernel contains so much “unrelated” functionality that it has the potential to be a root dependency of many unrelated packages. For example, if a video player depends on a particular version of a codec library, you can often update that codec library without causing issues with other video players (ignoring, for a moment, ffmpeg’s inability to maintain a stable API). But updating the kernel because a userspace video driver requires a new kernel version could potentially cause problems with anything ranging from a USB storage device, to a hard disk controller, to an audio card.

Now, of course, the Intel video driver has been undergoing some very large changes lately. In theory, these things will settle down, interfaces will stabilize, and you can expect the tight coupling between the kernel version and userspace package version to relax a bit. But perhaps during this transition period it might make sense to avoid merging kernel code like this at all, and instead do separate releases of (in this case) the DRM modules that are paired to the userspace package. I imagine it wouldn’t be too much of a burden for distro packagers to disable building the in-kernel versions of these drivers, and instead ship an extra module package that the userspace driver packages can depend on.

by Brian at June 17, 2009 11:14 PM

March 18, 2009

Brian Tarricone

Git Weirdness, Part 2

Ok, now this is just ridiculous:

[brian@machine1 airconfig $] pwd
/home/brian/src/airconfig
[brian@machine1 airconfig $] git branch -a
  advanced-ip-settings
* master
  nm-frontend
  notification-rework
  reconnect
  origin/master
  origin/pre-hal
[brian@machine1 airconfig $] cd .. && mkdir t && cd t
[brian@machine1 t $] git clone ../airconfig
Initialized empty Git repository in /home/brian/src/t/airconfig/.git/
[brian@machine1 t $] cd airconfig
[brian@machine1 airconfig $] git branch -a
* master
  origin/HEAD
  origin/advanced-ip-settings
  origin/master
  origin/nm-frontend
  origin/notification-rework
  origin/reconnect

Ok, that makes sense! Now:

[brian@machine1 airconfig $] cd ..
[brian@machine1 t $] rm -rf airconfig
[brian@machine1 t $]  git clone file:///home/brian/src/airconfig
Initialized empty Git repository in /home/brian/src/t/airconfig/.git/
remote: Counting objects: 1272, done.
remote: Compressing objects: 100% (486/486), done.
remote: Total 1272 (delta 778), reused 1270 (delta 776)
Receiving objects: 100% (1272/1272), 360.40 KiB, done.
Resolving deltas: 100% (778/778), done.
[brian@machine1 t $] cd airconfig
[brian@machine1 airconfig $] git branch -a
* master
  origin/HEAD
  origin/advanced-ip-settings
  origin/master
  origin/pre-hal

What. The. Fuck.

Yes, the git-clone man page tells me that, when using a local pathname (and not using a file: URI), it assumes the other repo is local and uses hardlinks between the repos. But hey, if I specify –no-hardlinks when cloning, I still get all branches if I use the “../airconfig” method.

And if I go to machine2 and do “git clone machine1:src/airconfig” I get the same broken result with the file:// method.

Git, I think you rock. But why does your user interface suck so much? And why do you just appear to be broken right now? I can’t seem to find anything else in the man page to help here. (I’m using git 1.6.1.3 if that matters.)

by Brian at March 18, 2009 12:55 AM

March 17, 2009

Brian Tarricone

Git Weirdness

So I have a git repo on my machine at home, that’s cloned from a repo on git.xfce.org. I was doing some work in it the other day — in a private branch, not published to git.xfce.org — and I wanted to continue working on the private branch from another machine. But… it won’t work. Let’s say ‘machine1′ has the repo with the private branch, and ‘machine2′ is where I want to work today.

So, on machine2, I cloned from the master repo on git.xfce.org:

[brian@machine2 src $] git clone git@git.xfce.org:kelnos/airconfig
[... stuff happens...]
[brian@machine2 src $] cd airconfig
[brian@machine2 airconfig $] git branch -a
* master
  origin/master
  origin/pre-hal

Ok, cool, that’s what I expect. So I ssh over to machine1 (the one I eventually want to pull from), and I check out my list of branches there:

[brian@machine1 airconfig $] git branch -a
  advanced-ip-settings
  master
* nm-frontend
  notification-rework
  reconnect
  origin/master
  origin/pre-hal

Ok, cool. the ‘nm-frontend’ branch is the one I want to pull to machine2. So on machine2, I do this:

[brian@machine2 airconfig $] git remote add machine1 machine1:src/airconfig
[brian@machine2 airconfig $] git pull machine1 nm-frontend
fatal: Couldn't find remote ref nm-frontend
fatal: The remote end hung up unexpectedly

Uh… what? Do I have the wrong syntax? Ok, let me just try to pull everything from the remote:

[brian@machine2 airconfig $] git pull machine1
remote: Counting objects: 1085, done.
remote: Compressing objects: 100% (301/301), done.
remote: Total 1085 (delta 774), reused 1085 (delta 774)
Receiving objects: 100% (1085/1085), 323.43 KiB | 14 KiB/s, done.
Resolving deltas: 100% (774/774), done.
From machine1:src/airconfig
 * [new branch]      advanced-ip-settings -> machine1/advanced-ip-settings
 * [new branch]      master     -> machine1/master
 * [new branch]      pre-hal    -> machine1/pre-hal

And then at the bottom it prints out a message about not knowing which local branches to merge stuff into. That’s fine, no big deal. But… how come it pulled 3 of my local branches on machine1, but left off 2 of them (‘notification-rework’ and ‘nm-frontend’). No combination of src:dest refspecs seem to do the trick. Pulling one of the 3 branches it seems to like using the syntax I used above seems to work fine, but it can’t see the one I want. What am I doing wrong…?

by Brian at March 17, 2009 01:29 AM

March 03, 2009

Brian Tarricone

Xfce 4.6.0 Released

I’m a bit late with this, but we finally got Xfce 4.6.0 out the door. Others have written much more about this than I have, so feel free to read about it on our blog aggregator.

by Brian at March 03, 2009 09:01 PM

February 23, 2009

Moritz Heiber

Commercials during Oscar Night

JESUS FUCKING CHRIST!
I mean, seriously, I've seen a lot of commercial breaks. I've seen loads. Thousands. Prolly even more. But SEEEEERIOUSLY ABC .. a break after each and every presenter or show sniplet? I've been watching for roughly 1 1/2 hours now .. and I think I caught my twelfth or so commercial break. Please, for fucks sake, keep it down. >:-(

by moe at February 23, 2009 03:02 AM

February 12, 2009

Brian Tarricone

Ruby for Web Development

I recently started a new web dev project, and decided to use it to better learn Ruby. However, I don’t want to use Rails. I’d like to keep it simple. I also prefer to know a lot about the inner workings of a particular technology before I go and use a large framework that hides a bunch of details from me.

However, I want to use ActiveRecord. ORM seems to be all the rage these days, promising to abstract the annoying details of database access behind OO natural for your chosen language. It also helps avoid common errors and pitfalls with regard to constructing SQL queries and the like.

So, ActiveRecord. I install it on my laptop with “emerge ruby-activerecord”, and there I go. One “require ‘activerecord’” in my script later, and, awesome, it starts working.

Then I start working on my web host (DreamHost, if you’re wondering). It can’t find ActiveRecord. But it’s obviously installed, because I know DH supports Rails out of the box, and I don’t think you can have an install of Rails without ActiveRecord. So I poke, and then realise it might be installed as a Ruby “gem.” Ok, so I put a “require ‘rubygems’” above my activerecord require. Nice, now it works. Then I think, well, what if I put this somewhere that doesn’t require rubygems? Not hard to work around automatically:

begin
  require 'activerecord'
rescue LoadError
  require 'rubygems'
  require 'activerecord'
end

Nice, ok, that works. It’s probably a foolish micro-optimisation, but whatever.

Then I notice… ugh, this is super slow. Even on the web host, it can take a good two seconds for the “require ‘activerecord’” statement to execute. Yeah, I know, ruby is kinda slow. But 2 extra seconds each time someone hits basically any page of the website? Ugh.

So…. FastCGI. I know DH supports it, so I head over to the control panel and enable it for the domain I’m working on, and start googling around to figure out how to use FastCGI in a ruby script.

Unfortunately, there aren’t too many resources on this. Fortunately I found a couple sample dispatch scripts, one of which I ended up basing mine off of.

But then there was a problem. Inside my app, I use ruby’s CGI class to access CGI form variables and other stuff. Since the FastCGI stuff overrides and partially replaces ruby’s internal CGI class, there’s a problem. Doing “cgi = CGI.new” inside a ruby script that’s being served through FastCGI throws a weird exception. But I wanted to try to retain compatibility for non-FastCGI mode. And I couldn’t figure out how to get the ‘cgi’ variable from the ruby dispatch script into my app’s script, since I was using ‘eval’ to run my script. The dispatch script I saw used some weird Binding voodoo. Up at the top level we have:

def getBinding(cgi, env)
  return binding
end

I had no idea what that was doing, so I looked it up. Apparently the built-in “binding” function returns a Binding object that describes the current execution context, including local variables and function/method arguments. Ok, that seems really powerful and cool. So I look down to the sample dispatch script’s eval statement, and I see:

eval File.open(script).read, getBinding(cgi, cgi.env_table)

Ok, so it appears it tries to eval the script while providing an execution context that contains just ‘cgi’ and one of its member vars. I only sorta understand this. So I ditched the “cgi = CGI.new” line in my app’s script. But I got a NameError when just trying to use ‘cgi’. Huh? What’s going on? So I get rid of the getBinding() call entirely, and just let it use the current execution context, and suddenly everything works right. Weird.

Well, sorta. Now, remember, I want to preserve compatibility with running as a normal CGI. So the normal CGI needs to create its own ‘cgi’ object, but the FastCGI one should just use the one from the dispatch script. So I came up with this:

begin
  if !cgi.nil?
    mycgi = cgi
  end
rescue NameError
  require 'cgi'
  mycgi = CGI.new
end

Ok, that seemed to work ok. After that block, ‘mycgi’ should be usable as a CGI/FCGI::CGI object regardless of which mode it’s running under.

So I play around a bit more, and suddenly notice that my POST requests have stopped working. I dig into it a bit, and realise that my POST requests are actually just fine. What’s happening is that, somehow, the FCGI::CGI object completely ignores $QUERY_STRING on a POST request, while ruby’s normal CGI object will take care of it and merge it with the POST data variables. You see, to make my URLs pretty, I have normal URLs rewritten such that the script sees “page=whatever” in the query string. So when I did a POST, the page= would get lost, and so the POST would end up fetching the root web page rather than the one that should be receiving the form variables. I’m not sure if this is “normal” behavior, or if the version of the fcgi ruby module on DreamHost has a bug. Regardless, we need a workaround. So I go back to my last code snippet, and hack something together:

begin
  if !cgi.nil?
    if cgi.env_table['REQUEST_METHOD'] == 'POST'
      CGI.parse(cgi.env_table['QUERY_STRING']).each do |k,v|
        cgi.params[k] = v
      end
    end
    mycgi = cgi
  end
rescue NameError
  require 'cgi'
  mycgi = CGI.new
end

Ick. But at least it works.

So far, I’m liking ruby quite a lot. It’s a beautiful language, and seems well-suited for this kind of work, especially since I want to get something that works up and running relatively quickly.

We’ll see, however, how many more gotchas I run into.

by Brian at February 12, 2009 08:02 AM

January 20, 2009

Moritz Heiber

"Dancing With The Devil" or "Why I Bought A MacBook"

Now, almost none of you guys know what I did two weeks ago: I bought a new machine for daily use. And while I pondered the opportunities back and forth, in the end the decision was pretty easy actually. I bought a MacBook.

read more

by moe at January 20, 2009 01:16 PM

December 11, 2008

Brian Tarricone

Licensing Suckage

I just got an email from a developer who works on the nifty cairo-dock application, pointing me to a thread about licensing issues.

A bunch of months ago, he’d emailed me asking about how to best use code from my Xfce Mailwatch Plugin in cairo-dock to add mail-checking capabilities. At the time, I was pretty stoked that someone else had actually found my code useful enough to incorporate into their program, and offered my encouragement.

Sadly, though, licensing ugliness has reared its… well… ugly… head.

When licensing code under the terms of the GNU GPL or LGPL, the FSF suggests (and most people follow) that you license under “or (at your option) any later version” terms, which means that, while you initially license the code under the version of the GPL or LGPL of your choice, someone can later take your code and relicense it under the terms of a later version of the same license. This also makes the code automatically compatible with future versions of the license.

You might think this sounds pretty good for convenience and licensing compatibility, and you’d probably be right.

However, this isn’t so great from a philosophical perspective, at least from my philosophical perspective. The problem I have is this:

Licensing a work under “GPL version 2 or later” terms means that I am implicitly agreeing with any new restrictions that the FSF dreams up (or any existing restrictions the FSF wants to drop), forever. I’d basically be saying that I agree with something that doesn’t exist yet, and could take any shape or form imaginable.

Don’t get me wrong: in general, I think the FSF is good people, and I agree with their message for the most part.

But I don’t know them, personally, and I don’t agree with them 100%. And I don’t know who’s going to be running the FSF next year, or in five years, or in 20 years. So how can I know, or even have reasonable belief, that their philosophies and values will align with mine such that I’ll agree with future versions of their licenses? There are already parts of version 3 of the GPL and LGPL that I don’t completely understand or agree with, so why should I expect that versions 4, 5, or 10 will be completely to my liking?

The short answer is: I can’t.

And so, for the most part, I release my software under “GPL version 2 only” terms. (Because I’m a bit lazy and don’t want to make a big stink, I’ll release code under “or any later version” terms if I’m contributing to an existing code base that uses those terms.)

it really pained me to have to answer that email saying that my code’s licensing (GPLv2-only) wasn’t compatible with theirs (GPLv3-or-later), but it’s the truth, and there’s not much I can (or want to) do about it.

The only solution I can think of (I’m not a lawyer, of course) that allows them to use my code is that they relicense their code under GPLv2-or-later terms. Of course, then they lose any restrictions that the GPLv3 has over the GPLv2, which I assume they’d prefer to have, since that’s how they’ve licensed their code.

(Before anyone says it, another possible solution would be for me to relicense under LGPLv2.1. The problem with that is one I’ve discussed before: section 3 of the LGPLv2.1 explicitly allows a recipient of the code to relicense the code under regular GPLv#-or-later terms, regardless of the only/or-later status of the original LGPL licensing. This of course completely defeats the intent of my rationale above.)

And so, the OSS licensing mess has caused yet more pain to people who just want to share code and avoid duplicating effort. I love the GPL. I really do. But I also hate it.

by Brian at December 11, 2008 11:56 AM

December 09, 2008

Brian Tarricone

Backlight Change Notification?

Is there a decent (non-polling) way to get notified when a laptop panel’s backlight brightness changes? HAL exports methods to set and get the brightness level, as well as query the number of possible levels, but there doesn’t appear to be a way to get notified if the level changes. Calling org.freedesktop.Hal.LaptopPanel.GetBrightness() every five or ten seconds or so sounds like an awful idea, of course.

I’ve heard plans to use the XBACKLIGHT randr 1.2 property to do backlight setting, but I don’t think any drivers use this yet. Polling /sys is just as bad (why doesn’t sysfs or procfs support inotify, dammit!), and obviously isn’t portable anyway (not that HAL is particularly portable these days either).

by Brian at December 09, 2008 03:11 AM

October 30, 2008

Brian Tarricone

Xfce Commit Messages on IRC

This is a little dumb, but kinda fun. A week or 2 ago I set up a CIA bot in #xfce-commits on Freenode. If you have nothing better to do with your life than watch Xfce commit messages scroll by, feel free to join and idle with the rest of us losers.

by Brian at October 30, 2008 07:52 PM

August 29, 2008

Jens Luedicke

Anna Vandas ‘You’re Here’

(via)

by Jens at August 29, 2008 07:33 PM

August 26, 2008

Jens Luedicke

Photography


by Jens at August 26, 2008 10:57 AM

June 22, 2008

Jens Luedicke

Comment Spam

I turned off the comment and trackback function for all previous posts. As Wordpress doesn’t support this directly, I had to update the wp_posts table directly.

by Jens at June 22, 2008 10:19 AM

December 02, 2007

Benedikt Meurer

Thunar 0.9.0, exo 0.3.4 and thunar-volman 0.2.0 release

I just released new versions of &lt;a href="http://thunar.xfce.org/"&gt;Thunar&lt;/a&gt;, exo and &lt;a href="http://www.foo-projects.org/~benny/projects/thunar-volman/index.html"&gt;thunar-volman&lt;/a&gt; with several bugfixes and new translations. They are part of Xfce 4.4.2, which will be released tomorrow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11492822-79474827643118861?l=xfce-diary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content>

by Benedikt Meurer at December 02, 2007 03:49 PM

November 18, 2007

Moritz Heiber

Music

Hey, I know I haven't been exactly busy blogging lately. But since Auke lost all my previous postings (:-P) I figured it would be a good time for a fresh start. Right now, there's tons of stuff I could probably talk about. I'm not much of blogger I guess. But recently I "discovered" a couple of amazingly good tracks I'm listening to frequently lately...

read more

by moe at November 18, 2007 09:00 PM

October 20, 2007

Jens Luedicke

Warlord, Inc.

I’d like to see the government get out of war altogether and leave the
whole field to private industry.
– Joseph Heller

Zum Thema passend aus der taz vor ein paar Tagen:
Warlord, Inc.

by Jens at October 20, 2007 02:47 PM

September 11, 2007

Auke Kok

Early adopters pay the price, Apple evading taxes? iPhone perils...

I read the news about apple & AT&T dropping the iPhone price by 200$. Of course at first I laughed at the suckers who fell for the obvious trap, but it poses a more interesting dilemma for "early adopters".

Today AT&T also announced that they sold the first 1 million iPhones. Given the fact that they can now comfortably sell them at 200$ below the original price, they will at least have already made 200 million. It's much more likely that the 100 million that they will give back in the form of store vouchers was a deal between AT&T and Apple so that AT&T can fund Apple's development cost in a very interesting tax-evading method. This borders the lines of money-laundering and very sleazy money schemes if you ask me.

Not to mention that those same suckers won't be able to buy $100 worth of stuff in the Apple store without at least spending 50$ more on something else, feeding the everlasting loop of greed of Apple, sucking stupid rich people into it's vile trap. I'm just kidding, it's all business as usual, right?

So, in the end the early adopters on average are going to spend the base amount of the phone, plus 100$ (since they're not getting the full 200$ divergence back, only half), and end up spending on average 10-25% more than that in the Apple store when they redeem their credit. The end score: on average, Joe Sucker still only gets back 75$, which is becoming quite marginal.

Here's what Apple should have done: sold the first 1 million phones under the 400$ price point. Apple would have probably made enough money to cover the basics, and they would have sold the units within a month, instead of 6 months. Advertising would freak out, people would instantly get one (now!) instead of postponing and waiting out, and the fact that for e.g. other hi-tech products this works quite good (think of hi-quality game betas being handed out for free), would be a win-win situation for both Apple and the consumer.

In the end, Apple and AT&T decided to bill the early adopters completely unfairly, and gets more press and more revenue by doing this flip-somersault that will end up just increasing their revenue anyway, and in a dubious legal way if I may say so.

read more

by sofar at September 11, 2007 01:42 AM

July 30, 2007

Jens Luedicke

Doping

Ich kann mir gut vorstellen das gewisse Anti-Doping Zeloten nicht davor zurückschrecken würden bei Doping-Proben Hand anlegen (lassen) um positive Resultate zu erzielen.

by Jens at July 30, 2007 01:03 PM

July 15, 2007

Jens Luedicke

HEDI SLIMANE

HEDI SLIMANE DIARY

(via)

by Jens at July 15, 2007 05:01 PM

July 05, 2007

Jens Luedicke

Apple iProduct

Apple iProduct

(via)

by Jens at July 05, 2007 12:42 PM

April 15, 2007

Benedikt Meurer

A Visual Tour of Xfce 4.4.0

&lt;p align="justify"&gt;I just wrote a short summary of the major changes that went into the upcoming &lt;a href="http://www.xfce.org/"&gt;Xfce 4.4.0&lt;/a&gt;. The article is available &lt;a href="http://foo-projects.org/~benny/articles/xfce44-visual-tour.html"&gt;here&lt;/a&gt; (and will also be published on the new Xfce website later).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11492822-116939959941647800?l=xfce-diary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content>

by Benedikt Meurer at April 15, 2007 05:49 AM

Thunar 0.8.0 and libexo 0.3.2 releases

&lt;p align="justify"&gt;I just released Thunar 0.8.0 and exo 0.3.2 as part of the long awaited &lt;a href="http://www.xfce.org/"&gt;Xfce 4.4.0&lt;/a&gt;, which will be released in a few hours. The separate tarballs are provided for users of Xfce 4.2.x refusing to upgrade to Xfce 4.4.x, and users of other desktop environments. This is the final release of Thunar, but since not all items from the roadmap were completed, it is not yet the 1.0.0 version.&lt;/p&gt;&lt;p align="justify"&gt;You will need at least libxfce4util 4.2.2, GTK+ 2.6.4, shared-mime-info 0.15 and desktop-file-utils 0.10 to build and run Thunar. In addition Gamin or FAM are highly recommended to enable file system monitoring in Thunar. For HAL support on Linux, the libhal-storage-devel package is required (0.5.0 or above). Furthermore if you want to use the trash panel applet, you will need the Xfce Panel 4.4BETA1 or above and D-Bus 0.34 or above. The README file contains a complete list of dependencies and optional packages.&lt;/p&gt;&lt;p&gt;The official announcement is available at:&lt;br /&gt;&lt;a href="http://thunar.xfce.org/news.html#2007-01-21"&gt;http://thunar.xfce.org/news.html#2007-01-21&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Several screenshots are available at:&lt;br /&gt;&lt;a href="http://thunar.xfce.org/screenshots.html"&gt;http://thunar.xfce.org/screenshots.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The source tarballs and the graphical installers can be downloaded from:&lt;br /&gt;&lt;a href="http://thunar.xfce.org/download.html#0.8.0"&gt;http://thunar.xfce.org/download.html#0.8.0&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Installation instructions and documentation are available at:&lt;br /&gt;&lt;a href="http://thunar.xfce.org/pwiki/"&gt;http://thunar.xfce.org/pwiki/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Please report bugs to the Xfce Bug Tracker (product &lt;i&gt;Thunar&lt;/i&gt;) at:&lt;br /&gt;&lt;a href="http://bugzilla.xfce.org/"&gt;http://bugzilla.xfce.org/&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11492822-116939926278817097?l=xfce-diary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content>

by Benedikt Meurer at April 15, 2007 05:49 AM

thunar-volman 0.1.0

&lt;p align="justify"&gt;I just released the first version of the Thunar Volume Manager. It adds automatic management of removable drives and media to Thunar, without adding another daemon to your desktop sessions. It requires Thunar 0.5.1svn or above, HAL 0.5.0 or above and D-BUS 0.32 or above.&lt;/p&gt;&lt;p&gt;Website:&lt;br&gt;&lt;a href="http://www.xfce.org/~benny/projects/thunar-volman/index.html"&gt;http://www.xfce.org/~benny/projects/thunar-volman/index.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Documentation:&lt;br&gt;&lt;a href="http://thunar.xfce.org/documentation/C/using-removable-media.html"&gt;http://thunar.xfce.org/documentation/C/using-removable-media.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Release notes:&lt;br&gt;&lt;a href="http://developer.berlios.de/project/shownotes.php?release_id=12027"&gt;http://developer.berlios.de/project/shownotes.php?release_id=12027&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Download:&lt;br&gt;&lt;a href="http://developer.berlios.de/project/showfiles.php?group_id=910&amp;release_id=12027"&gt;http://developer.berlios.de/project/showfiles.php?group_id=910&amp;release_id=12027&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11492822-116889658522820398?l=xfce-diary.blogspot.com' alt='' /&gt;&lt;/div&gt;</content>

by Benedikt Meurer at April 15, 2007 05:49 AM