Starting User Application
Copying user application to NeuralPlex
Section titled “Copying user application to NeuralPlex”The user application can be manually transferred to the NeuralPlex via Ethernet-over-USB. If the filesystem is read-only, you will need to re-mount the drive as read-write before transferring:
# Mount drive as read-writeroot@neuralplex:~# mount -o remount,rw /
# After you copy the file, mount the drive back to read-onlyroot@neuralplex:~# mount -o remount,ro /
# On development machine:$ scp my-awesome-app root@192.168.5.100:/opt/my-awesome-app
Starting user application manually
Section titled “Starting user application manually”Add the permission to execute the application with the following commands:
root@neuralplex:~# chmod +x /opt/my-awesome-approot@neuralplex:~# /opt/my-awesome-app
Starting user Application Automatically
Section titled “Starting user Application Automatically”To start your application automatically, a systemd service is available and enabled by default. This service will automatically restart if the user application crashes. The systemd service is shown below:
root@neuralplex:~# vi /etc/systemd/system/startup-app.service[Unit]Description=Start Qt Application serviceAfter=network.target
[Service]Type=simpleEnvironment="WAYLAND_DISPLAY=/run/wayland-0"Environment="XDG_RUNTIME_DIR=/run/user/0"Restart=alwaysRestartSec=1ExecStart=/usr/bin/startup-app.sh
[Install]WantedBy=multi-user.target
As seen from the ExecStart
command, the systemd service makes a call to /usr/bin/startup-app.sh
. Should you require modifying the app that starts at boot, you will need to modify this file:
root@neuralplex:~# vi /usr/bin/startup-app.sh#!/bin/bash
# Start app on screen #1 and send to background/opt/neuralplex-demo/bin/neuralplex-demo-1 &
# Start app on screen #2/opt/neuralplex-demo/bin/neuralplex-demo-2
Enable/Disable Service
Section titled “Enable/Disable Service”To enable or disable the default Startup-App service, run the following command:
# Disableroot@neuralplex:~# systemctl stop startup-app
# Enableroot@neuralplex:~# systemctl start startup-app
# Restartroot@neuralplex:~# systemctl restart startup-app