I have been running ubuntu linux in headless (command line only) mode for a while now and battling to get CFIMAGE working with BlueDragon. I was testing a modified example usage from the enthusiast wiki entry so you will need to replace my image names with your own and place the file in the same directory as the images to keep it simple
<cfimage action="edit" srcfile="img_0140.jpg" destfile="newPicture.gif" uridirectory="yes"
text="Copyright 2003" width="50%" height="50%" fontsize="20" fontcolour="violet"
position="SOUTH" nameconflict="overwrite">
<cfdump var="#cfimage#">
Running this code gave me the error NoClassDefFoundError
Most of the instructions I found explain that you need to add a line to your classpath file so
-classpath "$NEW_CLASSPATH" com.newatlanta.webserver.BlueDragon
becomes
-classpath "$NEW_CLASSPATH" -Djava.awt.headless=true com.newatlanta.webserver.BlueDragon
Then you are supposed to restart BlueDragon and lo, it works. Well for my installation it did not. You need X11 but it doesn't have to be running people will say, so I ran
apt-get install xorg-common
which documentation instructs you is the x.org version of the XWindows system which, for Ubuntu, replaces the X11 version. Great, but restart BlueDragon and I got a different error java.lang.UnsatisfiedLinkError so I gave up...
...until today. After seeing a message on the BD mailing list that looked suspiciously like my own issue, I picked it up again over lunch and after googling various ".so" files mentioned in the error message I came across some citrix users experiencing issues with the same missing file or bad dependencies libXp.so.3. I went to my root and did a find -name libXp.so* to see if the file existed on my system and it did not. I followed a few more threads and someone pointed out that they solved their citrix issue by running
apt-get install libxp6
. I did this on my machine, restarted BlueDragon and voila! Satisfaction! The dump gave me what I wanted and the new image file contains a watermark!
Oh, and for reference, I tried removing the headless argument from the BD startup script but it bombed again so it seems that line is still a required step. It's a shame I have the X11 piece installed first because I would be curious if you get it working without that step.