PrintFlow3D download


While it DID go fullscreen after sudo reboot… these pop up and after I get rid of them and reload page (Try again), it appears.


Darn, that’s going to be a bit of a dead end for you for a few minutes. Here is what is happening…
That last command in the file is getting executed so quickly, that the Photonic3d web server hasn’t had enough time to bootstrap itself and the web site isn’t yet available.

Instead we are going to try this in a slightly different way to make sure Photonic is running before we browse to it.

Photonic3D has the concept of a “Feature” which is nothing more than plugins that you can attach to it. Features only execute afterPhotonic3D has properly started. I’ll quick put together a CommandLineFeature to allow you to run commands after Photonic has properly started.

Do you know how to install from the development version of Photonic3D?


I can not say that I do :frowning: but if it is what is detailed here (, I am sure I can follow directions :wink:


It’s actually what is listed here:

I’ll be releasing a version soon in the development branch that gives the functionality you are looking for.


That is how I did mine currently :wink:


Good deal, just make sure you perform the latest development steps as my changes will only be in that version and not in the stable release.

You will want to uncomment out the following lines in the file:[{“taskName”:“Run kweb browser after a Photonic3D restart”, “taskClassName”:“org.area515.resinprinter.actions.osscript.ExecuteNativeOSCommandRunnable”, “cronString”:"@reboot", “taskSettings”:{“shellCommands”:[“kweb”, “-KZJE”, “{0}”]}}]

Let me know how it works! :slight_smile:


Where do I find the properties file?


As documented here:

You can find it in your user directory or in the install directory:

If it doesn’t exist in the user directory you can create it and it will use it. Whatever properties you add to the user directory will override the system directory. This allows you to setup user specific instructions for whoever starts Photonic3D and they won’t get overwritten on upgrades.


I have done what you have said to this point (I have since formatted SD card and reloaded the instead of Rasbian Stretch) and I got it working to a point. It auto loads to a page but still to the “Unable to load page” page. If I click try again, the localhost shows BUT 1/2 off screen.


Something, is attempting to browse to http://localhost:9091. That shouldn’t be there still… Could you show me your and file. Something isn’t setup correctly and the nail in the coffin is the old version: 1.0.16. That’s production version which isn’t correct. That means you didn’t pick up my changes last night.


I downloaded it this morning. I fell asleep after I wrote my last message… LOL


Great news. After all of that, we may want to start a new thread for additional issues. After your experience, you could also make a page in our wiki showing everyone what you did with very little Linux experience.



if [[ $UID != 0 ]]; then
echo “Please run this script with sudo:”
echo “sudo $0 $*”
exit 1

cpu=uname -m

if [ -z “$HOME” ] || [ “$HOME” == “/” ]; then


echo “Local Config: $CONFIG_PROPS”

if [ -f ${CONFIG_PROPS} ]; then
CONFIG_REPO=$(grep ‘^updateRepo’ “${CONFIG_PROPS}” | cut -d= -f 2 | awk ‘$1=$1’)
if [[ ${CONFIG_REPO} ]]; then

if [ -z “$1” ]; then
if [[ $1 =~ .Creation-Workshop-Host. ]] || [[ $1 =~ .Photonic3D. ]]; then

if [ “$2” == “TestKit” ]; then

#Its pretty hard to keep these updated, let me know when they get too old
if [ “${cpu}” = “armv6l” -o “${cpu}” = “armv7l” ]; then
elif [ “${cpu}” = “i686” ]; then
elif [ “${cpu}” = “x86_64” ]; then
elif [ “${cpu}” = “aarch64” ]; then

if [ ! -f “/usr/lib/jni/” ]; then
echo Installing RxTx
apt-get install --yes --force-yes librxtx-java

#This application will always need to have the display set to the following
export DISPLAY=:0.0
xinitProcess=ps -ef | grep grep -v | grep xinit
if [ -z “${xinitProcess}” ]; then
echo No X server running, starting and configuring one
startx &
xhost +x

#Copy the zip file from the current directory into the cwh directory for offline install
mkdir -p ${installDirectory}
mv ${downloadPrefix}.*.zip ${installDirectory}

#install java if version is too old
javaInstalled=which java
if [ “$javaInstalled” = “” ]; then
javaMajorVersion=java -version 2>&1 | grep "java version" | awk -F[\".] '{print "0"$2}'
javaMinorVersion=java -version 2>&1 | grep "java version" | awk -F[\".] '{print "0"$3}'

if [ “$javaMinorVersion” -lt 8 -a “$javaMajorVersion” -le 1 ]; then
downloadJavaFile=echo ${javaURL} | awk -F/ '{print $(NF)}'
echo Either Java is not installed, or an incorrect version of Java is installed. Installing from this URL: ${javaURL}
mkdir -p /usr/lib/jvm
cd /usr/lib/jvm
rm ${downloadJavaFile}
wget --no-cookies --no-check-certificate --header “Cookie:; oraclelicense=accept-securebackup-cookie” “${javaURL}”

    firstSnapshot=`ls -1`
    echo Unzipping and installing Java now
    tar xzf ${downloadJavaFile}
    secondSnapshot=`ls -1`
    javaInstallFile=`echo "$firstSnapshot"$'\n'"$secondSnapshot" | sort | uniq -u`

    if [ -z "${javaInstallFile}" ]; then
            echo "A new version of Java is available, please update this script with the proper download URLS from:"

    ln -sf /usr/lib/jvm/${javaInstallFile}/bin/java /usr/bin/java
    ln -sf /usr/lib/jvm/${javaInstallFile}/bin/javac /usr/bin/javac
    ln -sf /usr/lib/jvm/${javaInstallFile}/bin/keytool /usr/bin/keytool
    rm ${downloadJavaFile}


#Determine if a new install is available
echo Checking for new version from Github Repo: ${repo}
cd ${installDirectory}
LOCAL_TAG=$(grep repo.version build.number | cut -d = -f 2 | tr -d ‘\r’)
NETWORK_TAG=$(curl -L -s${repo}/releases/latest | grep ‘tag_name’ | cut -d" -f4)

echo Local Tag: ${LOCAL_TAG}
echo Network Tag: ${NETWORK_TAG}

if [ -f ${downloadPrefix} ]; then
OFFLINE_FILE=$(ls ${downloadPrefix}.
echo Performing offline install of ${OFFLINE_FILE}

    mv ${OFFLINE_FILE} ~
    rm -r ${installDirectory}
    mkdir -p ${installDirectory}

cd ${installDirectory}
mv ~/${OFFLINE_FILE} .
chmod 777 *.sh
elif [ -z “${NETWORK_TAG}” ]; then
echo “Couldn’t fetch version from GitHub, launching existing install.”
elif [ “${NETWORK_TAG}” != “${LOCAL_TAG}” -o “$2” == “force” ]; then
echo Installing latest version of ${downloadPrefix}: ${NETWORK_TAG}

    DL_URL=$(curl -L -s${repo}/releases/latest | grep 'browser_' | cut -d\" -f4 | grep -- -${NETWORK_TAG})
    rm -f "/tmp/${DL_FILE}"
    wget -P /tmp "${DL_URL}"

if [ $? -ne 0 ]; then
echo “wget of ${DL_FILE} failed. Aborting update.”
exit 1

    rm -r ${installDirectory}
    mkdir -p ${installDirectory}
    cd ${installDirectory}
    mv "/tmp/${DL_FILE}" .

    unzip ${DL_FILE}
    chmod 777 *.sh
    #grab dos2unix from the package manager if not installed
    command -v dos2unix >/dev/null 2>&1 || { apt-get install --yes --force-yes dos2unix >&2; }
    grep -lU $'\x0D' *.sh | xargs dos2unix
    #ensure the cwhservice always is linux format and executable
    grep -lU $'\x0D' /etc/init.d/cwhservice | xargs dos2unix
    chmod +x /etc/init.d/cwhservice
    rm ${DL_FILE}

echo No install required


echo Turning off screen saver and power saving
xset s off # don’t activate screensaver
xset -dpms # disable DPMS (Energy Star) features
xset s noblank # don’t blank the video device

if [ ! -f “/etc/init.d/cwhservice” ]; then
echo Installing CWH as a service
cp ${installDirectory}/cwhservice /etc/init.d/
chmod 777 /etc/init.d/cwhservice
update-rc.d cwhservice defaults

echo Determinging if one time install has occurred
performedOneTimeInstall=$(grep performedOneTimeInstall ${CONFIG_PROPS} | awk -F= ‘{print $2}’)
if [ -f “” -a [${performedOneTimeInstall} != “true”] ]; then

if [ -f “” ]; then

if [ “$2” == “debug” ]; then
pkill -9 -f “org.area515.resinprinter.server.Main”
echo “Starting printer host server($2)”
java -Xmx512m -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=n -Djava.library.path=/usr/lib/jni:os/Linux/${cpu} -cp lib/:. org.area515.resinprinter.server.Main > log.out 2> log.err &
elif [ “$2” == “TestKit” ]; then
pkill -9 -f “org.area515.resinprinter.test.HardwareCompatibilityTestSuite”
echo Starting test kit
java -Xmx512m -Djava.library.path=/usr/lib/jni:os/Linux/${cpu} -cp lib/
:. org.junit.runner.JUnitCore org.area515.resinprinter.test.HardwareCompatibilityTestSuite &
pkill -9 -f “org.area515.resinprinter.server.Main”
echo Starting printer host server
java -Xmx512m -Djava.library.path=/usr/lib/jni:os/Linux/${cpu} -cp lib/*:. org.area515.resinprinter.server.Main > log.out 2> log.err &
kweb -KZJE http://localhost:9091


#hostGUI is no longer used, the "skins" key should be used instead
skins=[{"name":"Main skin", "welcomeFiles":["index.html"], "resourceBase": "resourcesnew", "active": true}][{“taskName”:“Run kweb browser after a Photonic3D restart”, “taskClassName”:“org.area515.resinprinter.actions.osscript.ExecuteNativeOSCommandRunnable”, “cronString”:"@reboot", “taskSettings”:{“shellCommands”:[“kweb”, “-KZJE”, “{0}”]}}]

#Only enable this when there is at least one admin user!!!

hexCodeBasedProjectors=[{"name":"Optoma (HD141x)", "defaultComPortSettings":{"speed":9600, "databits":8, "parity":"None", "stopbits":"One"}, "onHex":"7E303030302031", "offHex":"7E303030302032", "bulbHoursHex":"7E30303135302031", "bulbHoursResponseRegex":"(?s:OK(?:0|1)(\\\\d{4}.*))", "bulbHoursConversion":"ASCII"},{$

#3d firmware autodetection is unreliable on these implementations
#None of this is used...
#connectToWifiSSIDCommand=["/bin/sh", "-c", "iwconfig {0} essid {1} key s:{2}"]
#discoverSSIDCommand=["/bin/sh", "-c", "iwlist {0} scan 2>&1| grep ESSID | awk -F\\"\\\\\\"\\" '''{ print $2 }'''"]
#discoverNetworkInterfaceCommand=["/bin/sh", "-c", "ifconfig | grep Link | awk '''{ print $1 }'''"]
#Windows (I'm not sure who would ever use this)
#connectToWifiSSIDCommand=netsh wlan connect name={1}
#discoverSSIDCommand=powershell -Command "netsh wlan show profiles interface=Wi-Fi | %'{ $_.Split('':'')[1].trim(); }'"
#discoverNetworkInterfaceCommand=blank for windows

#0=x(width), 1=y(height)
imagingCommand=["raspistill", "-t", "1", "-n", "-w", "{0}", "-h", "{1}", "-o", "-"]
#Hack of the year award if you uncomment the following line!! Hey, it works awesome for testing...
#imagingCommand=["cmd", "/c", "java -cp C:\\\\Users\\\\wgilster\\\\git\\\\Creation-Workshop-Host\\\\host\\\\srcbin org.area515.resinprinter.image.ServerTimeJPEG {0} {1}"]
streamingCommand=["raspivid", "-ih", "-w", "{0}", "-h", "{1}", "-n", "-t", "0", "-o", "-"]
#streamingCommand=["cmd", "/c", "type c:\\\\Users\\\\wgilster\\\\desktop\\\\stuff.mp4"]

#0=Process id
dumpStackTraceCommand=["kill", "-3", "{0}"]


#If the above option is true, all of the following must be specified

#Don't use "realm.clientUsername and realm.clientPassword" in this file, users are now stored in an implementation specific fashion designated by the property: UserManagementFeatureImplementation
#If you are interested in adding a user to your implementation specific user manager then add these two parameters to the located in the 3dprinters directory. This will migrate that user automatically.
#This class enforces all keys to have same password, char[])
#So we must have another keystore for users

#The following is an optional parameter.
#You only need to specify this parameter if you have a certificate signed by a CA.
#This certificate must be imported into into the keystore specified in the "keystoreFilename" key in this property file.
#The certificate must be imported into the keystore using the alias specified below.
#This MUST also be the hostname that the certificate was issued to.
#externallyAccessableName=Name of the alias AND hostname that CA issued cert to


#All of the following are for the email notification


You still have two problems.
#1 You are still using the old file I had you modify. That’s probably because my commands from here don’t overwrite the file when you run them. I’ve fixed the documentation to unconditionally overwrite the file.
#2 You are still running the old version from production(I can see the version is still 1.0.16). Make sure you run the development instructions(the ones for my repo), not the stable instructions.


Notice the version number in the bottom left corner of the screen? That’s what you want to be running.


Could it have been because I downloaded the img file from the downloads page and then used the dev instructions? So how am I to fix these issues? There are 2 images from the DL page, the system image and the Vendor Specific image. Which to use?


Got the proper version now :wink: just need to have it fit properly lol BTW, it takes FOREVER to load to the kweb screen.Another thing noticed is that when in Photonic, Display 0.0 is the only option so when you connect to printer, screen goes blank


Good deal. Yes, Display 0.0 is the only display available for Raspberry Pis. For some reason, the Raspberberry Pi folks didn’t decide to support two screens under XWindows and it doesn’t seem as though it’s planned for the future. This is pretty annoying, and it means that we had to write the low level display support directly into Photonic3D.

This explains the situation. Just choose the “Raspberry Pi Force TV” for your screen:


I don’t have the option for anything besides 0.0 and I am using the Raspberry pi image and not the Vendor specific image. Do I have to change that to get it to work? I did have it available the other day but I think that was using the new Stretch.