Autostart in cli mode

I am a newbie to the PI, I am running a PI 2 in CLI mode, it is running a program controlling an Arduino Due. The program has been compiled and sits in a file in the Downloads folder.This is working well, however since the application will be in a remote location I do not want to take a laptop etc to the site if power cut occurs etc.

What I would like to do is run I assume a script file that initiates my program after networking access has completed following a reboot via power failure or remote turn on via a radio link.

What’s your program written in?

I think your best bet is to edit the file


You can add a line into rc.local to run your specific program.

Best, John

Thanks John
It’s written in C++, but guess that is irrelevant, just need to run the main program and an ini file say about 60 seconds after the PI has fully started.
Will check out your suggestions later when got over Mothers Day !!
BTW, tried replying to email received from this forum but it says address not recognised so I have to reply in forum?

Hey Andy, yep, gotta reply in the forums. Sorry!

Great, give it a shot. We have a quick tutorial on how to run a python program with contrab -e. It sounds like you know enough on how to modify the directions to work with a C++ generated binary.

Let me know if that helps; if it doesn’t, we’re always lookng for ways to improve. Thanks Andy!