EasyManua.ls Logo

Apache Labs ANAN-G2 - 4.5 Running Software Automatically after Power Up

Apache Labs ANAN-G2
35 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ANAN-G2 Manual Page 26 of 35
4.5 Running Software Automatically after Power Up
It is possible to set programs to run automatically after power up. This is a standard linux function
and seek advice from websites covering the Raspberry Pi if in doubt. These instructions cover
running the p2app application, but others can be started similarly.
Please be careful when doing this: it requires administrator permission, and can cause harm if
incorrectly completed.
Use your favourite text editor to edit the /etc/rc.local file so it comes out like this:
pi@raspberrypi:~ $ sudo geany /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
cd /home/pi/github/Saturn/sw_projects/P2_app
./p2app &
exit 0
Then save and exit; p2app will auto-run at startup
To make it start using the balanced microphone input, replace one line with
./p2app -m xlr &
If you need to terminate the auto-running app you need to find its process id, then kill it
pi@raspberrypi:~ $ ps -ax | grep p2app
741 ? Sl 30.00 ./p2app
pi@raspberrypi:~ $ sudo kill 741