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

New Idea/Help Needed - es_systems.cfg Selector

Scheduled Pinned Locked Moved Ideas and Development
emulationstaionsystem listessystems.cfg
51 Posts 7 Posters 13.4k 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.
  • M
    meleu @TMNTturtlguy
    last edited by meleu 7 Aug 2017, 08:07 8 Jul 2017, 07:01

    @TMNTturtlguy EUREKA!

    I've found what was causing the problem in the script and submitted a PR: https://github.com/TMNTturtleguy/change_es_systems/pull/2

    When I found the bug I had one of those how-could-I-didn't-notice-that moments... :-)

    • Useful topics
    • joystick-selection tool
    • rpie-art tool
    • achievements I made
    C 2 Replies Last reply 8 Jul 2017, 07:10 Reply Quote 2
    • C
      cyperghost @meleu
      last edited by cyperghost 7 Aug 2017, 08:16 8 Jul 2017, 07:10

      @meleu Well and I thought how can meleu do that! An endless loop without break parameter
      Like duck and cover
      Well done brother :D
      I already made a pull request with breaks loop with argument
      https://github.com/crcerror/change_es_systems/blob/crcerror-patch-1/change_es_systems.sh

      EUREKA

      1 Reply Last reply Reply Quote 1
      • C
        cyperghost @meleu
        last edited by cyperghost 7 Aug 2017, 10:10 8 Jul 2017, 07:22

        @meleu Can you cleanup code a bit more please?

        • Remove unneeded sudo on cp/rm >> done @meleu nice catch
        • Instead of copy and delete I would use mv command only >> sorry early in the morning I ment symbolic linking
        • No need to work in subfolders
        • Add path to point to es_systems.cfg path and then ln -s path$&"\es_syststems_hacked" path$&"\es_systems.cfg"

        This will also help if someone loads this script and the systems are not installed then nothing happens and ES will not break because v1 up to v4 delete config file first - Can be problematic imho!

        Then we push it together to v5 and the code is much cleaner and easier to maintain

        I commented your push Done

        M 1 Reply Last reply 8 Jul 2017, 08:46 Reply Quote 1
        • M
          meleu @cyperghost
          last edited by 8 Jul 2017, 08:46

          @cyperghost said in New Idea/Help Needed - es_systems.cfg Selector:

          I commented your push

          and I replied there. :)

          • Useful topics
          • joystick-selection tool
          • rpie-art tool
          • achievements I made
          1 Reply Last reply Reply Quote 1
          • C
            cyperghost
            last edited by 8 Jul 2017, 09:25

            @meleu
            I commented my post above. Got a hard week with some nightshifts.
            You're right in moving system files ... therefore I still do not recommend not to copy/delete those files I would rather link those.

            The original es_systems.cfg should be kept as es_systems.bak.
            I also think that this file will be automatically be copied if es_systems.cfg gets lost. So it's alwyas fail safe!

            I think it's just the right moment to thank you for investigate even small bash sniplets. I never used bash and I always learn lots from you and I appreciate the help from you (and lots of others users here!)

            Öhmm... a downvote? I think you are using your mobile phone :D right?

            M 1 Reply Last reply 8 Jul 2017, 09:29 Reply Quote 1
            • M
              meleu @cyperghost
              last edited by 8 Jul 2017, 09:29

              @cyperghost said in New Idea/Help Needed - es_systems.cfg Selector:

              a downvote? I think you are using your mobile phone :D right?

              Damn! Sorry, it was an accident (again)! 😌

              • Useful topics
              • joystick-selection tool
              • rpie-art tool
              • achievements I made
              C 1 Reply Last reply 8 Jul 2017, 09:31 Reply Quote 1
              • C
                cyperghost @meleu
                last edited by cyperghost 7 Aug 2017, 10:31 8 Jul 2017, 09:31

                @meleu

                Damn! Sorry, it was an accident (again)! 😌

                De nada

                Isn't the right thread here... How are your achivements in Terranigma?

                1 Reply Last reply Reply Quote 2
                • F
                  FlyingTomahawk
                  last edited by 8 Jul 2017, 10:39

                  Great that you guys got all figured out.
                  So what and where can I download this? I mean the fixed version.

                  C 1 Reply Last reply 8 Jul 2017, 11:07 Reply Quote 0
                  • C
                    cyperghost @FlyingTomahawk
                    last edited by 8 Jul 2017, 11:07

                    @FlyingTomahawk
                    That's @meleu tidy version.
                    https://github.com/meleu/change_es_systems/tree/patch-1

                    F 1 Reply Last reply 8 Jul 2017, 11:39 Reply Quote 1
                    • F
                      FlyingTomahawk @cyperghost
                      last edited by 8 Jul 2017, 11:39

                      @cyperghost

                      Thank you.

                      T 1 Reply Last reply 8 Jul 2017, 13:47 Reply Quote 0
                      • T
                        TMNTturtlguy @FlyingTomahawk
                        last edited by 8 Jul 2017, 13:47

                        @cyperghost @meleu thank you both for your help. Unfortunately my schedule remains very busy with little time to actually sit and work on my pi. I will take a look at all of this, but it looks awesome!

                        @cyperghost i will look at you other methods, but I am not sure why you feel my method is "dangerous" as this works with Es_systems.cfg that are copied and moved to a new location. If they get deleted by accident, the main unedited es_systems.cfg should always remain in its original location and be used by default if the .cfg file does not exist in the alternate location.

                        C 1 Reply Last reply 8 Jul 2017, 14:00 Reply Quote 0
                        • C
                          cyperghost @TMNTturtlguy
                          last edited by cyperghost 7 Aug 2017, 15:07 8 Jul 2017, 14:00

                          @TMNTturtlguy It is dangerous. Think about someone loads your script from your repro and starts it but it is not configurated manually. Then he looses his es_systems.cfgbecause all funktions codes do rm /opt/retropie/configs/all/emulationstation/es_systems.cfg first and then copy the changed files (if it exists) :)

                          So it may be better to get all config files in one folder and just symlink them. Is there no destination file present then symlinking does not work. That should minimize the risk in breaking something. The risk now is at all minimum.... if you know what to do :)

                          @cyperghost @meleu thank you both for your help. Unfortunately my schedule remains very busy with little time to actually sit and work on my pi. I will take a look at all of this, but it looks awesome!

                          Thank you in your effords for the nice theme.
                          I still learn how to get familiar with bash.

                          T 1 Reply Last reply 8 Jul 2017, 16:08 Reply Quote 1
                          • T
                            TMNTturtlguy @cyperghost
                            last edited by 8 Jul 2017, 16:08

                            @cyperghost

                            Thank you in your effords for the nice theme.
                            I still learn how to get familiar with bash.

                            This is why the community is so great, we all have so much we can offer and so many different skills, we can't do it all, but with a little help we can all create some really cool stuff!

                            @TMNTturtlguy It is dangerous. Think about someone loads your script from your repro and starts it but it is not configurated manually. Then he looses his es_systems.cfgbecause all funktions codes do rm /opt/retropie/configs/all/emulationstation/es_systems.cfg first and then copy the changed files (if it exists) :)

                            This should not be dangerous at all. Again, i haven't looked at your symlink solution, but my solution is not dangerous because if users do not follow the directions and try to run the script, the script will simply do nothing. The default and main es_systems.cfg file is located here: /etc/emulationstation/es_systems.cfg My script only runs in /opt/retropie/configs/all/emulationstation/es_systems.cfg which is the same as ~/.emulationstaiton/ just written out as the full path. As long as the user never deletes the main es_systems.cfg in the /etc/ folder, there is not risk or danger at all. Here is some more information on this from the wiki: Emulationstation Wiki

                            1 Reply Last reply Reply Quote 1
                            • T
                              TMNTturtlguy
                              last edited by TMNTturtlguy 7 Aug 2017, 17:24 8 Jul 2017, 16:18

                              @meleu I just tried your script and it does not execute without the sudo commands. BuZz had updated the retropie startup script a few weeks back and he was the one who instructed that I add the sudo command as he changed user permissions when executing scripts from the retropie menu. Have you tried this script on your build? When did you last update retropie script? Thanks

                              Edit: adding the sudo command back in to both the copy and remove seems to have worked. With my brief testing it appears that the script works well and all other restart functions work properly. I have to take my girls out for a while so i will test more extensively later.

                              M 1 Reply Last reply 8 Jul 2017, 16:56 Reply Quote 1
                              • M
                                meleu @TMNTturtlguy
                                last edited by 8 Jul 2017, 16:56

                                @TMNTturtlguy maybe you changed the ownership of those files with your previous script. If they're owned by user pi there's no need for sudo.

                                • Useful topics
                                • joystick-selection tool
                                • rpie-art tool
                                • achievements I made
                                1 Reply Last reply Reply Quote 1
                                • C
                                  cyperghost
                                  last edited by cyperghost 7 Aug 2017, 18:27 8 Jul 2017, 17:18

                                  @TMNTturtlguy @meleu Is 100% correct! Check if some of your config files belong to root... Seems so because you worked with sudo in your last script. So I falsly said to him that he better removes sudo commands what he already did :)

                                  But I think your script is very special ... I really can't imagine to use it :)
                                  It was real fun to play a bit around with and learn a bit new. So I appreciate every comment/tip/hack from more advanced people. I wasn't able to trigger bugs because I commented every file operation out and tested just the behaviour of function call, loop break and restart ability. I think meleu did the same.

                                  Two locations of es_systems....

                                  Yes I rember now, but I alway work in /etc/emulationstation > Seems that I like risk

                                  T 1 Reply Last reply 8 Jul 2017, 17:49 Reply Quote 1
                                  • T
                                    TMNTturtlguy @cyperghost
                                    last edited by 8 Jul 2017, 17:49

                                    @cyperghost @meleu when I get back on my pi I will repudiate my setup script, bet here is the info from buzz when working on this in the past. Thanks link text

                                    1 Reply Last reply Reply Quote 1
                                    • C
                                      cyperghost
                                      last edited by 8 Jul 2017, 18:06

                                      Yes but this behaviour was changed.
                                      https://retropie.org.uk/forum/topic/11050/restart-es-via-bash-script/7

                                      There is really no need to act as root. As long as your script works for you it is really no problem but it seems that user privileges causes some errors.

                                      T 1 Reply Last reply 8 Jul 2017, 19:20 Reply Quote 1
                                      • T
                                        TMNTturtlguy @cyperghost
                                        last edited by 8 Jul 2017, 19:20

                                        @cyperghost Ok, so i updated to the most current setup script and I still have permissions errors. Here is the error:

                                        rm: remove write-protected regular file "/opt/retropie/configs/all/emulationstation/es_systems.cfg" permission denied.

                                        Running the script from the retropie menu does not appear to be the issue, rather removing the file from /opt/retropie/configs/all/emulationstation/

                                        Where can i look to find out my permissions for this folder? Thanks

                                        1 Reply Last reply Reply Quote 0
                                        • C
                                          cyperghost
                                          last edited by 8 Jul 2017, 19:33

                                          @TMNTturtlguy Owner is pi:pi
                                          Permission to config files is 644 (Need not to be executed)

                                          pi@retropie:/opt/retropie/configs/all/emulationstation $ ls -l
                                          total 52
                                          drwxr-xr-x  2 pi pi  4096 Jul  3 20:46 downloaded_images
                                          -rw-r--r--  1 pi pi  1627 Jun 26 19:31 es_input.cfg
                                          -rw-r--r--  1 pi pi  1475 Jun 26 19:31 es_input.cfg.bak
                                          -rw-r--r--  1 pi pi 20476 Jul  8 19:25 es_log.txt
                                          -rw-r--r--  1 pi pi  1340 Jul  8 14:19 es_settings.cfg
                                          -rw-r--r--  1 pi pi  1470 Jul  7 23:15 es_settings.cfg.bak
                                          -rw-r--r--  1 pi pi  1641 Jun 26 19:31 es_temporaryinput.cfg
                                          drwxr-xr-x 34 pi pi  4096 Jul  8 18:42 gamelists
                                          drwxr-xr-x  2 pi pi  4096 Jun 24 13:02 tmp
                                          
                                          T 1 Reply Last reply 8 Jul 2017, 21:05 Reply Quote 1
                                          45 out of 51
                                          • First post
                                            45/51
                                            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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received