UNCG-DAISY / Instagrain

A camera for measuring sediment grain sizes with edge ML
MIT License
20 stars 2 forks source link

Launch program at start-up #114

Closed dbuscombe-usgs closed 1 year ago

dbuscombe-usgs commented 2 years ago

Run.sh can be very hard to launch in the field, eg when wet or sandy. It can take 10 or more tries to launch by double click. I'd prefer the program launched at startup

ebgoldstein commented 2 years ago

yes, this was an early issue #9 which we decided to close b/c it was annoying.. but its worth figuring out now..

jacobstasiewicz commented 2 years ago

Worked on this for a while, should be as simple as adding a single line to crontab but it is not. Do you have any ideas on this?

ebgoldstein commented 2 years ago

@dbuscombe-usgs - ideas?

ebgoldstein commented 2 years ago

I will also look into this..

ebgoldstein commented 2 years ago

I have tried.. i am trying rc.local.. but it is not working... I found this: https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup/all

which suggests the reason its not working is that i am trying to use graphical elements before its possible...

ebgoldstein commented 1 year ago

this is now done via instructions here: https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup/all

ebgoldstein commented 1 year ago

i.e., in terminal type:

mkdir /home/pi/.config/autostart nano /home/pi/.config/autostart/instagrain.desktop

in nano, type this:

[Desktop Entry]
Type=Application
Name=Instagrain
Exec=/home/pi/Desktop/RUN.sh

then control-x to save.. leave nano and reboot..

ebgoldstein commented 1 year ago

there might also be other options, listed in: https://raspberrypi.stackexchange.com/questions/98944/launch-a-gui-tkinter-program-on-boot