three stacks of high society


Engineer and open source software advocate living and working in Austin, Texas

linux

FOSDEM over; Crisis averted

lots of beer on tap

I went to Brussels last weekend for FOSDEM 2008, which was held at ULB Campus Solbosh. The free event was a good way to check in with the overall Open Source community and to see all of the interesting things people outside my normal circles are working on.

Friday Night Beer Event
Things got off to an memorable start on Friday night. I timed my arrival so that I could attend the Friday night "Pink Elephant" beer event held at the Delirium Cafe. I met up with a colleague, and we had a few good beers while chatting with other FOSDEM attendees. Lots of people had their gadgets out for others to play with. I got to play with a EeePC and a Nokia 810 while my iPhone was passed around. I even picked up the presence of a OLPC OX-1 over wifi, but was never actually able to find it.

After a few hours of drinking beer and talking about software, we met up with a few more friends to go to dinner at an underwhelming yet wistfully overpriced restaurant in the middle of the tourist trap. I had another beer or two over dinner, and so when we left the restaurant, I was a little toasted.

For some reason (playing with my phone?) I was straggling behind as we walked out when these two guys sidled up to me and started dancing, singing yelling, and doing some weird line dance kick between my legs. In my drunken state, I was a bit confused but thought they were just drunk too and danced along. After a few moments of this silliness, they walked off. I luckily had a moment of clarity and thought it best to check my pockets. Wait, my wallet is missing. Yup, it really is still missing. The two guys hadn't taken more than 20 steps down the street, so I ran up to the nearest one, forcefully grabbed his shoulder, and demanded, "Give me back my wallet." He looked a bit surprised and immediately pointed to his accomplice. I turned to him and without a word, he reached into his coat pocket and handed over my wallet. I took it from his hands, and strangely enough, we just parted ways. The entire episode lasted probably 30 seconds or so, and my friends, who were only a few steps ahead, missed it all.

Talks
The next morning I was a bit slow getting up and got to FOSDEM about an hour late, missing the opening keynote (it didn't help that I stayed up for a few more hours playing poker with the hotel staffer and his friends, but that's another blog post). I pretty much spent Saturday in the Janson auditorium listening to the big talks - "How a large scale opensource project works" with Robert Watson, "Perl 6" with Patrick Michaud, and "Unicoding with PHP 6" with Andrei Zmievski. I also squeezed in some quick 15-minute "lightning" talks about smaller open source projects like Alfresco, OpenAFS, and Squeak.

I was even slower getting up on Sunday morning* and missed the Drupal opening talks by Dries. I did catch Kris Buytaert's "Drupal and MySQL High Availability", which was quite good. In addition, I took the opportunity to see a talk on CakePHP and Mozilla's upcoming Prism.

Thoughts
My colleagues in attendance weren't too enthusiastic about this year's FOSDEM. Their main complaint was that it has become a little too commercialized with seemingly marketing-oriented talks, rather than more in-depth code talks. While I can understand this sentiment, I think the problem is mainly with their expectations of FOSDEM. FOSDEM should be a venue for projects to open up to people outside of their core community. A code-driven, detailed talk about the intricacies of the Form API in Drupal 6, for example, would only be digestible by experienced members of the Drupal community, most of whom would be familiar with the FAPI in the first place. Higher-level talks allow small projects, such as Squeak and CakePHP, to attract people like me who have a passing interest and may even be pulled in enough to try the stuff out.

Some of the speakers were certainly better than others. FOSDEM (and Open Source in general) is a pretty international affair, and because the conference was conducted in English, there were varying levels of English public speaking abilities. Overall, however, I thought the speakers were quite good and spoke to the subject matters well. My only complaint is that FOSDEM seems to be outgrowing its britches. There were lots in attendance, and at times, it was a little bit difficult walking through the masses to get to the talks in time. That probably speaks to the growing popularity of OSS, which is always a good thing.

More photos from FOSDEM 2008.

*I discovered the Grand Casino Brussels on Saturday night and was there until almost 4 in the morning waiting on a seat at the Hold 'em table. Generally casinos in Europe are quite stuck up about dress code and appearances (to the point of making you rent an evening jacket), but I found Brussels casino to be very welcoming. You still won't find flip-flops and t-shirts like you would at some places in Vegas, but at least you can walk in reasonably dressed. Anyway, at 11PM I was #3 in line for a seat and only got to #1 by 3:30am before I had had enough and just left. They had two tables of €5/€10 NL Texas Hold'em, but apparently they sometimes also have €10/€20 limit as well.

Local root exploit in Linux kernel 2.6.17 to 2.6.24.1

Pretty scary stuff, even if you trust all of your users:

victor@mercury ~ $ ./exploit
-----------------------------------
Linux vmsplice Local Root Exploit
By qaaz
-----------------------------------
[+] mmap: 0x100000000000 .. 0x100000001000
[+] page: 0x100000000000
[+] page: 0x100000000038
[+] mmap: 0x4000 .. 0x5000
[+] page: 0x4000
[+] page: 0x4038
[+] mmap: 0x1000 .. 0x2000
[+] page: 0x1000
[+] mmap: 0x2ac3dee3c000 .. 0x2ac3dee6e000
[+] root
mercury ~ # whoami
root

What's really amazing is that news of this vulnerability didn't really hit the mainstream web until today, but yet on Friday there was already a kernel patch. There's even an in-memory hotfix that you can use (I tried that too - it works) if you prefer to wait until an official kernel makes it downstream. Open source is amazing.

Had this been proprietary software, no one would have known about it except for the all the people exploiting it. Servers all over the world would get owned, and the software company wouldn't even discover it for a few more weeks. Or worse, they would know about it, but would hope to keep it hush-hush until the next Patch Tuesday.

Gentoo upgrade to Apache 2.2

I upgraded my server's apache from 2.0 to 2.2 today (see Overview of new features in Apache 2.2) and it was painless except for a few minor hiccups. I like to keep my server's packages up to date with Gentoo's stable packages not just for new features but mainly to make package upgrades as easy as possible. I find that by staying up to date with upstream stable packages, upgrades are more incremental and rarely cause as much difficulty as having to upgrade from multiple major versions behind.

With Gentoo, the Apache 2.2 upgrade came with a routine:

emerge --sync
emerge -uDav world

I noticed the new Apache version, checked out the other packages listed, and then hit enter to proceed. At the end of the compilation, Gentoo reminded me there are new config files in /etc to merge. Luckily for me, I've maintained a clean separation of Apache configuration directives and VirtualHosts, so I was able to accept all of the major configuration directive changes without modification (2.2 mostly just moves around the default directives to more logical locations). Staying up to date and close to upstream shows its benefits here.

Apache restarted without complaining, but attempts to access any of my virtualhosts resulted in a 403 Forbidden:

[Sat Sep 08 13:30:55 2007] [error] [client 89.14.247.41] client denied by server configuration: /home/victor/public_html/

This was caused by Apache 2.2's /etc/apache2/modules.d/00_default_settings.conf:

<Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
</Directory>

You can either override this manually in every vhost.d/*.conf file, or you can just change the "Deny from all" line to "Allow from all" and then make Deny rules manually in each vhost.d file (if you wish). I restarted apache and refreshed my test site, but there was now a new problem - .php files were being parsed as plain text, which meant Apache wasn't passing off .php files for processing.

I added "-D PHP5" to my /etc/conf.d/apache2's APACHE2_OPTS line, which tells Apache to load the PHP5 module. However, since my libphp5.so was built for my old Apache, I had to re-compile for Apache 2.2:

emerge -av php

I waited a few minutes, restarted apache, and now everything works beautifully.

Samsung ML-2010 printing using CUPS and Splix on Gentoo AMD64

Tags:

The Samsung ML-2010 is a great bargain laserjet printer. I bought it from NewEgg last year for $49 after a $50 mail-in rebate, which I quickly recieved. While it doesn't see too much more than 5-10 pages per week, I've never had to replace the toner cartridge.

Using the Splix driver, it works great under Linux, specifically Gentoo AMD64 (x86_64) in my case. Here's how you can get it to work, assuming you already have CUPS properly installed and working (most of this will apply to any distro):

Install Splix

emerge -av splix

After this finishes, you can go to http://localhost:631/, click on the Administration tab, then walk through the steps. When it asks for a PPD file, click on "Browse" and go to /usr/share/cups/model/samsung. There you will find a file called "ml2010.ppd". You may notice ml2010de.ppd, ml2010fr.ppd, and ml2010it.ppd, which respectively are German, French, and Italian translations of the driver. Use one of those if you prefer.

You should now be able to print from any CUPS enabled application. If you have trouble with CUPS, try the Gentoo Printing Guide.

Make it work with GIMP
If you've had trouble printing from GIMP, make sure you have the gimpprint compiled into GIMP by adding "media-gfx/gimp gimpprint" to your /etc/portage/package.use:

echo "media-gfx/gimp gimpprint" >> /etc/portage/package.use

Now delete your ~/.gimp-2.2/printrc file if you've messed around with trying to get GIMP to work before. Once you start GIMP, it will detect your CUPS printers and rebuild the file. Now your Samsung ML-2010 should be working, but it didn't for me. I had to do more.

Open up or create a new image, then click File->Print. You will then see your printers listed, click on your Samsung ML-2010, then "Setup Printer". Make sure "Postscript Level 2" is selected for "Printer Model," then where it says "Command", I had to remove the raw output (-oraw) option. Mine says:

lp -s -dSamsung_ML-2010_USB_1

Where "Samsung_ML-2010_USB_1" is your own CUPS device name (mine is plugged into USB_1). Click OK, then "Save Settings."

Happy Printing.

p.s. The above instructions should work for any Samsung printer that Splix supports.

Flash 9 sound on 64-bit Gentoo Linux

Tags:

I recently blew away my completely setup Gentoo desktop when I decided I needed to rebuild on a new RAID5 array. This meant that I got go through the entire Gentoo install, build, and configuration process from scratch, after not having had to do it for ages. I also took the opportunity to use LVM2 this time around, which I'll probably write about in a future post.

Either the Gentoo process has gotten much easier or I've gotten much better with Gentoo. It was a fairly painless install, and it turned out my only real hiccup was getting flash9 to output sound to ALSA. I knew I had correctly installed ALSA since all my other ALSA applications output sound perfectly - Amarok, Kaffeine, and even aplay from the CLI. I also knew that Flash9 was completely ALSA based instead of OSS, so as long as other ALSA apps were playing, Flash9 should be playing. After a day of thinking about it, I gave up and visited #alsa on freenode.

Adobe only supplies flash as a 32-bit binary, so running it on my 64-bit Gentoo system meant I had to either use net-www/nspluginwrapper in 64-bit Firefox or install it on 32-bit firefox. Gentoo supplies a 32-bit FF package called www-client/firefox-bin that works well on 64-bit environments and allows for native 32-bit plugins, so this is what I use. Well, on my previous install (before I wiped the disk) this 32-bit FF combined with flash9 worked beautifully, and I was able to browse Youtube all day long in full multi-media glory. However, this time around it would play the video without sound. I couldn't get any flash based audio to work - last.fm, pandora, youtube, etc.

It turns out the problem was an oversight on my part. Since the plugin and browser are 32-bit and my ALSA was natively compiled at 64-bit, the two couldn't really talk to each other. I just had to do a simple

emerge -av app-emulation/emul-linux-x86-soundlibs

After that, a restart of ALSA and Firefox, and I was back to full flash9 sound. Flash 9 beta two works very well under Gentoo, by the way.

For those curious, here are my system specs and a quick How-To:

  • AMD Opteron 165 @ 2.3ghz
  • Asus A8N-SLI Premium
  • SB Live! Value sound card
  • 64-bit Gentoo Linux

If you choose to install ALSA as a module rather than in-kernel, in /etc/make.conf:

ALSA_CARDS="emu10k1"

Replace emu10k1 with whatever the ALSA module for your card is. Check the ALSA list for what works for your hardware. Then 'emerge alsa-utils alsa-oss alsa-lib alsa-driver app-emulation/emul-linux-x86-soundlibs'.

My /etc/modules.d/alsa:

alias char-major-116 snd
alias char-major-14 soundcore

alias snd-card-0 snd-emu10k1
alias sound-slot-0 snd-card-0

alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

alias /dev/dsp snd-pcm-oss

options snd cards_limit=1

Add 'snd-emu10k1' to your /etc/modules.autoload.d/kernel-2.6. Make sure you do a 'modules-update -f' followed by a restart of alsa '/etc/init.d/alsasound restart'. You should be good to go.

Syndicate content

Random Flickr photos

IMG_0432 - The Island of ParosMerry ChristmasIMG_0728 - Flight home over the Swiss AlpsIMG_0477 - Paros, Naousa - Old timers hanging around the boats0289.jpg0321.jpg

Blame me for

ClemsonTALK - Clemson's largest forum
Clemson Wiki Project - Clemson oriented Wiki