Shallow Thoughts : : Nov

Akkana's Musings on Open Source Computing and Technology, Science, and Nature.

Thu, 23 Nov 2006

GIMP JPEG 2000 Plug-In

People keep showing up on GIMP's IRC channels and asking about JPEG 2000 support. There was a Summer of Code "Wavelet" project last summer which implemented JPEG 2000 support (among other things) but no one ever seems to know where to find it.

So I asked Simon, who was the mentor for that project. Turns out he had tarballs, but didn't think it was appropriate to link them from his own site, especially as they were somewhat tricky to compile.

The consensus among the developers was that it would be nice to have jp2 and the other wavelet plug-ins available on the GIMP Plug-in Registry. So I fiddled with them, fixed a couple of Makefile issues, added READMEs with author credit and building instructions, and uploaded them to the registry. The plug-ins are:

jp2
JPEG 2000 support
denoise
A noise removal plug-in
ihalf
Inverse halftoning -- remove halftones from printed images.

I haven't actually used these plug-ins (couldn't find a JPEG2k file to test) -- I just wanted to help make them available for people who need them.

While I was at it I updated my vastly out-of-date registry entries for Pandora and added an entry for my label/business card script.

Tags:
[ 13:54 Nov 23, 2006    More gimp | permalink to this entry | ]

Mon, 20 Nov 2006

Ubuntu "Edgy Eft" Installation Pitfalls

I just tried Ubuntu's newest release, "Edgy Eft", on the laptop (my trusty if aging Vaio SR17). I used the "xubuntu" variant, in order to try out their lighter weight xfce-based desktop.

So far it looks quite good. But the installation process involved quite a few snags: here follows an account of the various workarounds I needed to get it up and running.

Live CD Problems

First, I tried to use the live CD, since I've heard it has a nice installer. But it failed during the process of bringing up X, and dumped me into me a console screen with an (initramfs) prompt. I thought I had pretty good Linux creds, but I have to confess I don't know what to do with an (initramfs) prompt; so I gave up and switched to the install CD. Too bad! I was so impressed with Ubuntu's previous live CDs, which worked well on this machine.

Guessing Keyboard Layout

Early on, the installer gives you the option to let it guess your keyboard layout. Don't let it! What this does is subject you to a seemingly infinite list of questions like:

Does your keyboard have a squiggle key?
where each squiggle is a different garbled, completely illegible character further mangled by the fact that the installer is running at a resolution not native to the current LCD display. After about 15 of these you just give up and start hitting return hoping it will end soon -- but it doesn't, so eventually you give up and try ctl-alt-del. But that doesn't work either. Pulling the power cord and starting over seems to be the only answer. Everyone I've talked to who's installed Edgy has gone through this exact experience and we all had a good laugh about it. Come to think of it, go ahead and say yes to the keyboard guesser, just so you can chuckle about it with the rest of us.

Once I rebooted and said no to the keyboard guesser, it asked three or four very straightforward questions about language, and the rest of the installation went smoothly. Of course it whined about not seeing a network, and it whined about my not wanting it to overwrite my existing /boot, and it whined about something to do with free space on my ext3 partitions (set up by a previous breezy install), but it made it through.

X Hangs on the Savage

On the first reboot after installation, it hung while trying to start X -- blank screen, no keyboard response, and I needed to pull the plug. I was prepared for that (longstanding bug 41340) so I immediately suspected dri. I booted from another partition and removed the dri lines from /etc/X11/xorg.conf, which fixed the problem.

Configuring the Network

Now I was up and running on Xubuntu Edgy. Next I needed to configure the network (since the installer won't do it: this machine only has one pcmcia slot, so it can't have a CDROM drive and a network card installed at the same time). I popped in the network card (a 3com 3c59x cardbus card) and waited expectantly for something to happen.

Nada. So I poked around and found the network configuration tool in the menus, set up my IP and DNS and all that, and looked in vain for a "start network" or "enable card" or some similar button that would perform an ifup eth0.

Nada again. Eventually I gave up, called up a terminal, and ran ifup eth0, which worked fine.

Which leads me to ask:

Given that Ubuntu is so committed to automatic hardware detection that it forces you to run hal, which spawns large numbers of daemons that poll all your disks a couple of times a second -- why can't it notice the insertion of a cardbus networking card? And configure it in some easy way without requiring the user to know about terminals and networking commands?

Ubuntu Still Wins for Suspend and Hibernate

Around this point I tested suspend and hibernate. They both worked beautifully out of the box, with no additional twiddling needed. Ubuntu is still the leader in suspending.

sudo: Timestamp Woes

Somewhere during these package management games, I lost the ability to sudo: it complained "Timestamp too far in the future", without telling me which file's timestamp was wrong so that I could fix it. Googling showed that lots of other people were having the same problem with Edgy, and found an answer: use the GUI Time and Date tool to set the time to something farther in the future than the timestamp sudo was complaining about, then run sudo -k to do some magic that resets the timestamp. Then you can set the time back to where it belongs. Why does this happen? No one seems to know, but that's the fix. (I found some discussion in bug 43233.)

vim isn't vim?

I restored my normal user account, logged in as myself with my normal fvwm environment, and went to edit (with vim) a few files. Every time, vim complained:

"E319: Sorry, the command is not available in this version: syntax on"
after which I could edit the file normally. Eventually I googled to the answer, which is très bizarre: by default, vim-common is installed but vim is not. There's a binary named vim, and a package which seems to be vim, but it isn't vim. Installing the package named vim gives you a vim that understands "syntax on" without complaining.

Conclusion

That's the list. Edgy is up and running now, and looks pretty good. The installer definitely has some rough edges, and I hope my workarounds are helpful to someone ... but the installer is only a tiny part of the OS, something you run only once or twice. So don't let the rough installer stop you from installing Edgy and trying it out. I know I look forward to using it.

Tags: ,
[ 20:30 Nov 20, 2006    More linux | permalink to this entry | ]

Wed, 08 Nov 2006

Mercury Transits and Titan Occultations

Mercury transited the sun today. The weather forecast predicted rain, and indeed, I awoke this morning to a thick overcast which soon turned to drizzle. But miraculously, ten minutes before the start of the transit the sky cleared, and we were able to see the whole thing, all five hours of it (well, we weren't watching for the whole five hours -- the most interesting parts are the beginning and end).

I had plenty of practice with solar observing yesterday, showing the sun to a group of middle school girls as part of an astronomy workshop. This is organized by the AAUW, the same group that runs the annual Tech Trek summer science girls' camps. (The Stanford Tech Trek has a star party, which is how I got involved with this group.) It's the second year I've done the astronomy workshop for them; this year went pretty smoothly and everybody seemed to have a good time observing the sun, simulating moon phases, learning about the Doppler effect and plotting relative distances of the planets on a road map.

But what I really wanted to write about was the amazing video shown by last weekend's SJAA speaker, Dr. Ivan Linscott of Stanford. As one of the team members on the New Horizons mission to Pluto, he was telling us about Pluto's tenuous atmosphere. There isn't a lot of information on Pluto's atmosphere yet, but one of the goals of New Horizons is to take readings as Pluto occults the sun to see how sunlight is refracted through Pluto's atmosphere.

But that's no problem: it turns out we've already done more challenging occultation studies than that. Back in December 2001, Titan occulted a binary star, and researchers using Palomar's Adaptive Optics setup got a spectacular video of the stars being refracted through Titan's atmosphere as the occultation progresses.

This is old news, of course, but most of us hadn't seen it before and everyone was blown away. Remember, this is a video from Earth, of the atmosphere of a moon of Saturn, something most Earth-based telescopes would have trouble even resolving as a disk. Watch the Titan occultation video here.

Tags: ,
[ 23:38 Nov 08, 2006    More science/astro | permalink to this entry | ]