I would like to run a Python script at boot, just before to run ES.
Usually, eg with RaspBian, I did it in the /etc/rc.local file and it works fine.
With RetroPie it doesn’t work. The only solution I found is to run my script in the /etc/profile file.
The problem is my script is re-executed one more time each time I leave ES (with F4). Even if I go back later in ES. I guess that is because when leaving ES, it opens a new user session who run again the /etc/profile file.
Where should I put my script, to be ran only once at boot time?
Thx blaxzen, it’s a possibility. I didn’t thought about this option.
I’m not very at ease with Linux and I’m a little bit disoriented about the fact there are different ways to run something at boot time. I don’t know the pro and cons of each method (I’m still in autoexec.bat!).
That’s the nature of linux, if you do a bit of research you can find out exactly what each command does. Although there are multiple ways of achieving the same thing, some methods will be more right than others.
If the script you want to run is not retropie specific then you could post in the official raspberry pi forums, or check out the IRC channel for raspbian.
Necessary and Functional
These cookies are placed to make it possible to analyze this website (with Google Analytics) and optimize for the purpose of a.o. the usability.
Cookie names: _ga, _gat, _gid
These cookies are placed to show advertisements (of Google AdSense) and to get these close to your interest.
Cookie names: id, IDE, FLC, DSID, SNID, NID
These cookies are required to show the cookie notification bar, remember your cookie acceptance choice and apply this choice.
Cookie names: privacy_embeds, wpca_consent, woocommerce_cart_hash, woocommerce_items_in_cart, wp_woocommerce_session_, wp-settings-1, wp-settings-time-1