[raspberry-vi] Auto-start shell/batch scripts on a pi?

  • From: Jacob Kruger <jacob@xxxxxxxxxxxxx>
  • To: "raspberry-vi@xxxxxxxxxxxxx" <raspberry-vi@xxxxxxxxxxxxx>
  • Date: Thu, 17 Nov 2016 19:19:32 +0200

Wondering what would need to do to implement a form of automatic script 
startup on the pi booting up?


And, sorry if this is a dumb question - will also google it - but, what 
is the equivalent of a .bat file on a pi/under linux? .sh? As in, if 
want to be able to launch a set of actions, or run a bit of python code 
from something like a single character command, etc., then is there a 
way to do something like this?


Ask since, among other things, if want to let guys use a raspberry pi as 
a portable recorder, using arecord, then it wouldn't have a full 
keyboard connected, so would need to work with the USB numpad, which 
would limit me to cursor/arrow keys, and the numpad keys - 1-0, +, -, /, 
* and enter, effectively.


For example, since can already get pi to boot up into command line by 
default, then would want to try implement something like a batch/script 
file called just 1, which would then change directory to a specific 
path, and, start recording, or something, and, the other issue there 
would be that to halt recording with arecord think you'd need to either 
work with interaction, or hit ctrl+C, so if could in fact get it to 
launch some python code, think should be able to catch keystrokes, and, 
then pass other commands/variants on to the shell, in the background, or 
something.


Thanks for any answers/suggestions


Jacob Kruger
Blind Biker
Skype: BlindZA
"Resistance is futile, but, acceptance is versatile..."

=========================================================== 
The raspberry-vi mailing list 
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of the 
Foundation.

Mike Ray, list creator, January 2013

Other related posts: