RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    System Environment Variable pointing to RetroPie dir?

    Scheduled Pinned Locked Moved Ideas and Development
    environmentvariable
    8 Posts 3 Posters 1.2k 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.
    • L
      logiseye
      last edited by

      Hey,

      is there some kind of system environment variable (or similar method) to get retropie's dir?
      I've just noticed some 3rd party scripts tend to use a hard coded path (e.g. /home/pi/RetroPie), which of course isn't always right. On my odroid I had to create the retropie user on my own, so it's not called pi but retropie instead.

      An envvar would allow 3rd party tools to easily and dynamically locate the retropie dir.

      1 Reply Last reply Reply Quote 0
      • HoraceAndSpiderH
        HoraceAndSpider
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • HoraceAndSpiderH
          HoraceAndSpider
          last edited by

          @logiseye said in System Environment Variable pointing to RetroPie dir?:

          Hey,

          is there some kind of system environment variable (or similar method) to get retropie's dir?
          I've just noticed some 3rd party scripts tend to use a hard coded path (e.g. /home/pi/RetroPie), which of course isn't always right. On my odroid I had to create the retropie user on my own, so it's not called pi but retropie instead.

          An envvar would allow 3rd party tools to easily and dynamically locate the retropie dir.

          Can you not create a symlink from /home/pi to /home/RetroPie ?

          https://askubuntu.com/questions/600714/creating-a-symlink-from-one-folder-to-another-with-different-names

          L 1 Reply Last reply Reply Quote 0
          • L
            logiseye
            last edited by logiseye

            Of course I could, but why not add a clean solution to RetroPie?
            edit: And if someone else uses yet another directory, I'd have to add another symlink.

            J 1 Reply Last reply Reply Quote 0
            • J
              jdrassa @logiseye
              last edited by

              @logiseye scripts should be able to use ~/RetroPie. That will point to the RetroPie directory in the home directory of the current user.

              Get latest build of EmulationStation for Windows here

              1 Reply Last reply Reply Quote 0
              • L
                logiseye @HoraceAndSpider
                last edited by logiseye

                @horaceandspider Just tried your tip. Unfortunately e.g. UAE config maker fails, since not only /home/pi is burned in, but also the username pi (e.g. chown pi:pi gets called). And amiberry does seemingly not like symlinks.

                Is pi the default so maybe I should resetup my system?

                @jdrassa said in System Environment Variable pointing to RetroPie dir?:

                @logiseye scripts should be able to use ~/RetroPie. That will point to the RetroPie directory in the home directory of the current user.

                As long as they don't run as root, that's correct.

                J HoraceAndSpiderH 2 Replies Last reply Reply Quote 0
                • J
                  jdrassa @logiseye
                  last edited by

                  @logiseye pi is the default user when running on raspberry pi, but it can be anything on other systems. I would recommend contacting the the creator of the script and request that they make it more generic.

                  Get latest build of EmulationStation for Windows here

                  1 Reply Last reply Reply Quote 0
                  • HoraceAndSpiderH
                    HoraceAndSpider @logiseye
                    last edited by

                    @logiseye said in System Environment Variable pointing to RetroPie dir?:

                    @horaceandspider Just tried your tip. Unfortunately e.g. UAE config maker fails, since not only /home/pi is burned in, but also the username pi (e.g. chown pi:pi gets called). And amiberry does seemingly not like symlinks.

                    @logiseye scripts should be able to use ~/RetroPie. That will point to the RetroPie directory in the home directory of the current user.

                    All the paths on UAE Config Maker can be changed using the command-line options:

                    --scandirs
                    --outputdir
                    --rom-path

                    The RetroPie Menu script, you are correct, does use a chown to 'pi' but that can be manually edited, and the script is only provided for less technical users, and is not really the suggested running method.

                    I will look at switching to ~/RetroPie by default however which seems a clean solution

                    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.