Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • matock
    Participant
    Post count: 2

    Hi,

    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 a lot.
    Matock

    Anonymous
    Inactive
    Post count: 57

    Hey there,

    check out this guide over at instructables:
    http://www.instructables.com/id/Raspberry-Pi-Launch-Python-script-on-startup/

    matock
    Participant
    Post count: 2

    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!).
    :=)

    Anonymous
    Inactive
    Post count: 57

    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.

    Good luck!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.