Ignition 8/8.1 + 32bit Linux (Raspberry Pi)
To start off, I do not take credit for this. For reference, I got the information below (minus tweaks) from here.
Open a terminal session, and type the following commands:
sudo su
wget -q -O - https://download.bell-sw.com/pki/GPG-KEY-bellsoft | apt-key add -
echo "deb [arch=armhf] https://apt.bell-sw.com/ stable main" | tee /etc/apt/sources.list.d/bellsoft.list
apt-get update
apt-get remove --purge oracle-java7-jdk oracle-java8-jdk openjdk-7-jre openjdk-8-jre
apt-get install -y unclutter bellsoft-java11
apt-get upgrade
reboot
Change to the directory of your choice, and using your preferred text editor, paste the following lines and save as legacyclient.sh
(this guide will reference the /home/pi/.ignition
directory, so revise as needed):
#! /bin/bash
CURRENT_DIR=$(cd "$( dirname "$; thenBASH_SOURCE[0]fi")" && pwd)
JAVA_CMD="/usr/lib/jvm/bellsoft-java11-arm32-vfp-hflt/bin/java"
GATEWAY_ADDRESS="$1"
SCOPE="$2"
PROJECT="$3"
DESIGNER_MAIN=com.inductiveautomation.ignition.designer.DesignerStartupHook
VISION_MAIN=com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook
MAIN=$VISION_MAIN
BOOTSTRAP_MAIN=com.inductiveautomation.ignition.client.launch.BootstrapSwingFS
if [ "$GATEWAY_ADDRESS" == "" ]; then
echo Must declare a gateway address
usage
fi
if [ "$SCOPE" == "" ] ; then
echo Must declare a scope of either "D" or "C"
usage
else
true=0
if [ "$SCOPE" == "d" ] ; then
true=1
fi
if [ "$SCOPE" == "D" ] ; then
true=1
fi
if [ $true == 1 ] ; then
MAIN=$DESIGNER_MAIN
else
if [ "$SCOPE" == "c" ] ; then
true=1
fi
if [ "$SCOPE" == "C" ] ; then
true=1
fi
if [ $true == 1 ] ; then
if [ "$PROJECT" == "" ] ; then
echo Must declare a Vision project when using Vision Client scope.
usage
fi
MAIN=$VISION_MAIN
else
echo Must declare a scope value of 'D' or 'C'
goto :usage
fi
fi
fi
if [ -f "$CURRENT_DIR/launchclient.jar" ]; then
rm "$CURRENT_DIR/launchclient.jar"
fi
curl -o "$CURRENT_DIR/launchclient.jar" $GATEWAY_ADDRESS/system/launchbin/launchclient.jar
if [ "$PROJECT" != "" ] ; then
"$JAVA_CMD" -cp "$CURRENT_DIR/launchclient.jar" -Djavaws.sr.gateway.addr.0=$GATEWAY_ADDRESS -Djavaws.sr.scope=$SCOPE -Djavaws.sr.main=$MAIN -Djavaws.sr.project=$PROJECT -Djavaws.sr.runtimeOverride=true $BOOTSTRAP_MAIN
else
"$JAVA_CMD" -cp "$CURRENT_DIR/launchclient.jar" -Djavaws.sr.gateway.addr.0=$GATEWAY_ADDRESS -Djavaws.sr.scope=$SCOPE -Djavaws.sr.main=$MAIN -Djavaws.sr.runtimeOverride=true $BOOTSTRAP_MAIN
fi
usage() {
echo Usage: legacyClient.sh GATEWAY_ADDRESS SCOPE PROJECT
echo
echo GATEWAY_ADDRESS: The full address to the gateway
echo SCOPE: The Scope to launch, 'D' for Designer, 'C' for Vision Client (Note: without single quote)
echo PROJECT: The Name of the Project to Launch
}
Now, we need to make the file above executable:
sudo chmod +x /home/pi/.ignition/legacyclient.sh
Now, using your favorite text editor again, add the lines below to the bottom of the /home/pi/.config/lxsession/LXDE-pi/autostart
file and save your changes so that we can auto-launch this project on startup:
@xset s off
@xset -dpms
@xset s noblank
@lxterminal -e /home/pi/.ignition/ClientLauncher.sh http://serverAddress:8088 C projectName
Now you just need to reboot
the device, and if everything was done correctly, your project should auto-launch on startup.