RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Does EmulationStation load .bashrc?

    Scheduled Pinned Locked Moved Help and Support
    bashrcdevelopmentshell-variables
    5 Posts 2 Posters 590 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • brandflake11B
      brandflake11
      last edited by brandflake11

      Hello all,
      I am working on my update script for my Retropie-Airplane-Mode, and I am trying to get a variable to load when starting the pi. I have put

      export RAM_PIBOY_OSD=1
      

      into .bashrc as part of the installation process. This works when loading into a shell, the variable is recognized, but if you just boot into emulationstation with RetroPie, it doesn't seem like this variable is registered. Is there a better way to get a shell variable to be assigned when booting into EmulationStation?

      Thank you very much for your time and let me know if you need any clarifications.

      BuZzB 1 Reply Last reply Reply Quote 0
      • BuZzB
        BuZz administrators @brandflake11
        last edited by

        @brandflake11 .bashrc is loaded later. You can add it to /opt/retropie/configs/all/autostart.sh

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

        brandflake11B 1 Reply Last reply Reply Quote 0
        • brandflake11B
          brandflake11 @BuZz
          last edited by brandflake11

          @buzz Ah, thanks so much! I'll test this out and come back here if I have any other problems with this.

          EDIT: Questions about this: Does the export need to be before the emulationstation command? Also, if I open a terminal, will this variable still be assigned?

          Also, I put the command before the emulationstation command in

          /opt/retropie/configs/all/autostart.sh
          

          and it doesn't seem to have assigned the variable. My script also thinks it's not assigned. Does it need to be in both .bashrc and autostart.sh?

          BuZzB 1 Reply Last reply Reply Quote 0
          • BuZzB
            BuZz administrators @brandflake11
            last edited by

            @brandflake11 please post your scripts and the locations etc. If you want the export available in anything run from Emulation Station it needs to be exported before and it should be available. But it won't be available if you exit emulation station as that's a parent shell. So you would need it in bashrc then.

            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

            brandflake11B 1 Reply Last reply Reply Quote 0
            • brandflake11B
              brandflake11 @BuZz
              last edited by

              @buzz Here is a link to the script on github. It currently puts the export command in .bashrc, but I tested it on my machine by putting it in /opt/retropie/configs/all/autostart.sh with no luck of the script launched by emulationstation detecting the variable. The programming is in function RAM_PIBOY_CHECK.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

              Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.