on Ubuntu 12.04, toss the .hex firmware file somewhere (in this bad example, /usr/share) and use a udev rule something like this for the Platform Cable USB II:

SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0013", MODE="666", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode"