Home/Support/Support Forum/How can I run a script or an application automaticaly once the linux boot has finished?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How can I run a script or an application automaticaly once the linux boot has finished?

0 votes
Hi,

I want to autorun a python script as root just when the yocto boot finishes.

I have tried to put the script on the /etc/init.d file and then use the command:
->update-rc.d script.py defaults 99

but when I restart the board it appears the following error:

/etc/init.d/rc: line 56: /etc/rc5.d/S99script.py: Permission denied

Do you know how to solve this or any other way to autorun a script on startup?

Thank you in advance
asked Apr 1 in Linux by pablovi96 New to the Community (25 points)

Please log in or register to answer this question.

1 Answer

+1 vote
 
Best answer
/etc/rc5.d/S99script should be a shell script that calls your python script. you cannot call python code directly from there
answered Apr 1 by LeonidM Veteran of the Digi Community (3,656 points)
selected Apr 2 by pablovi96
I have tried that and works. But the problem is that the scripts are executed before finishing the autologin and the booting and I want to execute it after that.

Any ideas of how to do it?
...