Sci-fi, comics, humor, photos…it’s all fair game.

Fixing Flash in Fedora Core 5

Monday, March 27th, 2006 Posted in Linux, Troubleshooting, Web | 6 Comments »

I upgraded two computers at work to Fedora Core 5. One was a network upgrade that went without a hitch.* The other was trashed so badly I had to do a fresh install.

I’ve run into a couple of gotchas, among them the fact that text is missing in Flash animations. I messed with my font settings, checked SELinux logs, tried switching from the binary installer to the RPM package, to no avail. I tracked down a Fedora mailing list post that pointed to a mozilla bug that had been languishing for a few months, then added what I knew—which was that it affected Flash regardless of the browser.

On Sunday, commenter Dawid Gajownik tracked down the problem: Flash hard-codes the paths where it looks for fonts, instead of letting the X server tell it where to look. Fedora Core 5 includes a new X server, which no longer puts things in /usr/X11R6. Apparently symlinking the old font paths to the new ones works around the problem:

[root@X ~]# mkdir -p /usr/X11R6/lib/X11
[root@X ~]# cd /usr/X11R6/lib/X11
[root@X X11]# ln -s ../../../../etc/X11/fs
[root@X X11]# ln -s ../../../share/X11/fonts

I tried it with absolute links (to /etc/X11/fs and /usr/share/X11/fonts) instead of relative, and it worked fine.

Also, if SELinux is in enforcing mode, you need to allow text relocations on the Flash library. More info on that in Dawid’s bugzilla comment.

So this should take care of Flash until Macrodobe releases an updated version. They’re apparently heading straight for 8.5 on Linux, which is why they haven’t released Flash 8.0 yet.

*Almost. It turns out the repodata on disc 1 isn’t enough for a network or hard disk installation. I copied all the discs onto an internal web server, then had to grab the repodata folder from a mirror. Would’ve been fine with the CDs except for the annoying problem that the CD drive on that machine doesn’t work. Once I had that, though, the upgrade went smoothly.

“Expected dict” Errors in FDF Acrobat Forms

Monday, October 24th, 2005 Posted in Troubleshooting, Web Design | 9 Comments »

Today I was trying to fix a problem in a section of a website that hadn’t been changed in roughly 5 years. The page in question retrieved data from a database and filled out an Acrobat form using FDF. Under some circumstances, Adobe Reader would generate an error message, “Expected a dict object.” Then it would freeze, and crash the web browser for good measure.

This site was built with ColdFusion, and used a then-freely-available library called PDFFormFiller.cfm (I can’t find any sign of it now) to generate the FDF code. After saving the offending FDF to a file (eliminating the browser as a factor), I started manually editing the code to see what happened.

The problem turned out to be parentheses appearing in the form data. FDF uses parentheses-delimited strings, and it was finding ) in the code and trying to parse what was left as FDF tokens. The solution was simple: just escape the parentheses as \( or \). Read the rest of this entry »

Painlessly Updating Adobe

Tuesday, May 17th, 2005 Posted in Computers/Internet | No Comments »

OK, I’m impressed. I’d always closed down whatever I was doing before, but I decided to just let Adobe Reader update itself while I had a manual open. It not only closed the application before installing the update, but it started itself up again, re-opened the document I was reading, and picked up right where I left off.

In general, I think that making every application re-invent the update wheel is kind of pointless when you have centralized update systems on every OS*…but I suppose sometimes re-inventing can lead to finding a better solution. Just last week I had to reboot Windows to uninstall Acrobat 6.

*Windows: Windows Update. Mac: Software Update. Linux: varies with distribution, but the most common are probably Apt, Yum, Up2date and YaST.