Go to advanced search

by JustM3
Tue May 02, 2017 6:13 pm
Forum: Troubleshooting
Topic: execute script by pi after startup
Replies: 9
Views: 1144

Re: execute script by pi after startup

Try this then: CODE: SELECT ALL python /home/pi/ledmatrix/ledmatrix.py /home/pi/ledmatrix/image.png & As noted above the environment is different, and its already root. In you case it doesn't run in your home directory and so has no idea where the "ledmatrix" folder is - so you must give it the ful...
by JustM3
Tue May 02, 2017 5:54 pm
Forum: Troubleshooting
Topic: execute script by pi after startup
Replies: 9
Views: 1144

Re: execute script by pi after startup

use .bashrc to auto run commands [auto login also helps] Thanks for the respons! It helped me a bit further. I tried to use .bashrc and it works as soon as I asses the terminal (by ssh). But I need the script to run automatically (almost) as soon as I power-up my raspberry pi. The place where I wan...
by JustM3
Tue May 02, 2017 7:34 am
Forum: Troubleshooting
Topic: execute script by pi after startup
Replies: 9
Views: 1144

Re: execute script by pi after startup

jahboater wrote:Where is the .png file? perhaps put the full path in, something like this:-
The image is located in the same folder as the script is placed.

When I run the script manually (when I'm located in the folder) the Terminal, it wil work. It looks like:

Code: Select all

Sudo python ledmatrix.py image.png
by JustM3
Tue May 02, 2017 6:05 am
Forum: Troubleshooting
Topic: execute script by pi after startup
Replies: 9
Views: 1144

Re: execute script by pi after startup

dwhite0 wrote:which shell are you running? try .bashrc?
I feel stupid, but what does a shell do/how does it work? And how can I see witch shell is running and how do I change the running shell?
by JustM3
Mon May 01, 2017 3:29 pm
Forum: Troubleshooting
Topic: execute script by pi after startup
Replies: 9
Views: 1144

execute script by pi after startup

Hi, I want to execute a script on my rpi3 after startup. I tried tot use /etc/rc.local and put this line between fi and exit0. sudo python /home/pi/ledmatrix/ledmatrix.py image.png & The .png file is a image that displays on the matrix board. When I put the line below in rc.local, it will show a tes...

Go to advanced search