Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7742

Troubleshooting • Re: Cannot run a script at startup...

$
0
0
The "disk image" is something else (used in the past and the reason why I assumed it would be fine to have vlc on a small pi Zero)

For this project, I went with 32 Raspian lite OS (downloaded from raspberry website), installed on a new 32 gb SD card and into a pi zero.
Once there, I did everything to connect with ssh and then "apt install vlc".
Then wrote in the script from my original post, and it works if i prompt it with " ./startvlc"

Everything I tried to have it launch by itself so that I can use it as plug and play device on the move (i.e. without having to install a ssh connection) has failed.
And I don't understand since it seems like it should be a very straightforward set-up.
My guess is that the permissions are different when I prompt manually or when the pi starts up by itself.
(and which the .service log seems to confirm)
But I have no idea how to go about it.

I really only need the raspberry zero to prompt this " ./startvlc" by itself, perhaps when the startup is finished.
I thought crontab would do this.

Code:

@reboot  sleep 30 && /home/pi/startvlc
That's what I tried (with some variations, with stars, without stars, with different paths—even though this is the pwd one— and the same script again but saved with a .sh extension)...but nope.

Statistics: Posted by guillemet — Thu Mar 27, 2025 10:22 am



Viewing all articles
Browse latest Browse all 7742

Latest Images

Trending Articles



Latest Images