The Prog Blog
Monday, May 30, 2005
 
Getting Ubuntu 5.04 to Rip to MP3
Getting Ubuntu's installation of Sound Juicer to encode in MP3 format is a lot harder than it should be. Googling for a while returned this.
Tuesday, May 24, 2005
 
Test Post
Looks like the blog has disappeared. What happened?
Friday, May 20, 2005
 
Dynamic HTML Forms
Not too long ago, in a prior job, I needed to implement a variable-length list of attachments. Recently, I had to do it again, but I didn't have access to the code I wrote. I was all prepared to write down my final solution here, so I'd never be in this position again, until I found this, which covers it nicely.
Thursday, May 19, 2005
 
So This is Cool
Apparently HP is selling laptops with Ubuntu pre-installed, if only in Europe. Of course, that doesn't me the Ubuntu CDs that arrived here the other day will work perfectly with my 9-month-old HP laptop. But it does leave hope for the future, and will make me think of HP when I'm in the market for a new laptop.
Tuesday, May 17, 2005
 
Two Eclipse Quickies

  1. Using Ctrl-/ comments and uncomments a selection. This ought to be pretty obvious, but I just noticed it today. Now the trick is to remember to use it.

  2. How to run an Ant target the easy way: Use the "External Tools" option settings. You can configure a menu entry for each significant Ant target in your project, and then running it is as easy as clicking on the icon with the arrow and the toolbox.


Saturday, May 14, 2005
 
Synchronizing Calendar & Addressbook in Evolution
I've often hard a hard time synchronizing my calendar, tasks, and addressbook data between copies of Evolution on my laptop and on my desktop. Multisync seemed like a promising solution, but I could never get it to work right between two instances of the Evolution plugin, and it seemed to be more geared towards synchronizing between Evolution and a wireless or handheld device. Their current release doesn't support Evolution 2, although support is now in CVS (but I'm not sure when they're going to release again).

Here's what I'm using now. On both computers I have a directory called "syncfiles", and I use rsync to keep them synchronized (you could also use unison). I put copies of the directories in the .evolution tree corresponding to my contacts, calendar, and tasks "folders" in there, and then replace the actual directories under .evolution with symlinks back to the syncfiles directory.

Step-by-step instructions:
  1. Move the directory $HOME/.evolution/local/calendar/local/system (this is your "Personal" calendar) to $HOME/syncfiles, then rename it to "calendar".

  2. Make a link back in the .evolution directory:

    ln -s $HOME/syncfiles/calendar $HOME/.evolution/calendar/local/system

  3. If you have other calendars, you need to find which directory contains them. Try grepping the calendar/local directory for a unique string in one fo the calendar's events.

  4. Once you have the string (I'll refer to it as "blah@hostname"), move the directory $HOME/evolution/calendar/local/blah@hostname to $HOME/syncfiles, and rename it to an easy-to-remember name.

  5. Make a link back in the evolution directory:

    ln -s $HOME/syncfiles/easy-to-remember-name $HOME/.evolution/calendar/local/blah@hostname

  6. Repeat for Addressbooks and Tasks.
When you move from laptop to desktop, use rsync like this:
rsync -av --delete you@laptop:$HOME/syncfiles you@desktop:$HOME/syncfiles
Similarly, when moving from desktop to laptop, use rysnc like this:
rsync -av --delete you@desktop:$HOME/syncfiles you@laptop:$HOME/syncfiles
Update: After screwing something up with rsync, I gave Unison another try. It works a lot better, especially with the GUI.
Wednesday, May 11, 2005
 
How to Use the Citrix Client on Fedora Core 3

When I first tried to start up the Citrix ICA client on Fedora Core 3, it crashed. Hard. But it wasn't your ordinary segfault, it was something I hadn't seen before:

*** glibc detected *** double free or corruption: 0x0937d008 ***
After several false starts, including a pathetic attempt to understand the Citrix Program Neighborhood, I Googled the error message, and found a bit in the FC 3 Release Notes:
Should you have a program from a third party ISV that triggers these corruption checks and displays a message, you should file a defect report with the application's vendor, since this indicates a serious bug.
Very ominous. And since the ICA client is proprietary software with a very slow release cycle, I had very little confidence that this "serious bug" would be fixed anytime soon.

The crash was caused by some sanity checking done by this version of glibc, in order to prevent buffer overflows and other memory corruption nasties, so at first it seemed almost counterproductive to turn off the sanity checking. Indeed, when I tried the first option (MALLOC_CHECK_=0, or "no error message, no kill"), it simply segfaulted. On a lark, though, I tried the second option(MALLOC_CHECK_=1, "error message, no kill"), and it seemed to work. I have no idea why.

Unfortunately, this makes it difficult to use the ICA client browser plugin, which is used to launch Citrix connections from a web-based login page. For it to work, you have to pass MALLOC_CHECK_=1 to the browser so the plugin will see the environment variable. So instead, I decided to wrap the command-line client in a shell script, and use it to "open" Citirx connection files (MIME type application/x-ica) in the browser. Here's the shell script:

#!/bin/bash
MALLOC_CHECK_=1 /usr/lib/ICAClient/wfica.sh -file $1


Powered by Blogger