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

    Need to find and delete .swp file of Retroarch.cfg

    Scheduled Pinned Locked Moved Help and Support
    swap file
    15 Posts 2 Posters 1.5k 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.
    • V
      virg1
      last edited by

      Hi there. I was trying to remap my hotkey and exit Emulator buttons. I got to the screen via /opt/retropie/configs/all/Retroarch.cfg

      When I forgot to do sudo nano and could not exit this screen, I shut pi down. When I turned back on and went to edit properly I got the error message stating that I had a swap file.

      I know this needs to be deleted: /opt/retropie/configs/all/.retroarch.cfg.swp

      How do I find this using command line, been researching and cannot find the hidden file? Also how do I go about deleting it as I can’t find in ls -s or ls -a?

      Also when I do delete how do I exit this screen properly after editing my hot key and exit Emulator buttons?

      Thanks much racking my brain here and getting frustrated as this was a bone head move on my part!!

      Thanks Bryan

      dankcushionsD 1 Reply Last reply Reply Quote 0
      • dankcushionsD
        dankcushions Global Moderator @virg1
        last edited by

        sudo rm /opt/retropie/configs/all/.retroarch.cfg.swp

        1 Reply Last reply Reply Quote 0
        • V
          virg1
          last edited by

          Thanks let me give this a try!! Do you know what normally I should press to save changes in the Retroarch.cfg filen or to escape so this does not happen again?

          dankcushionsD 1 Reply Last reply Reply Quote 0
          • dankcushionsD
            dankcushions Global Moderator @virg1
            last edited by

            @virg1 i don't really know what situation you got yourself into. to exit nano it's ctrl+x

            1 Reply Last reply Reply Quote 0
            • V
              virg1
              last edited by

              Ok thanks let me try that ctrl x. Thanks again for all your help!

              1 Reply Last reply Reply Quote 0
              • V
                virg1
                last edited by

                Thanks much, that script removed the .swp file! I did go back into /opt/retropie/configs/all/Retroarch.cfg

                I tried the ctrl+x but nothing happens. Are there any other things I can try so that I don’t have to shut down pie again and create another .swp file? This file does not have the menu at bottom where there is write and exit amongst some other options

                Anything you can think of would be greatly appreciated!

                dankcushionsD 1 Reply Last reply Reply Quote 0
                • dankcushionsD
                  dankcushions Global Moderator @virg1
                  last edited by

                  @virg1 how are you opening it? please describe exactly what you're typing/doing.

                  1 Reply Last reply Reply Quote 0
                  • V
                    virg1
                    last edited by

                    Sure, and maybe this is the problem. The video I used to use to show me how to adjust hotkey and Emulator exit is no longer available, so all I have is a paper backup from i64x who originally posted.

                    From command line I type: edit /opt/retropie/configs/all/Retroarch.cfg

                    This goes right into file where I get stuck. There is more in the script which I can never get to and that may be because to Make a backup immediately it may need to include cp retroarch.cfg retroarch.cfg.bak

                    The final part of script is sudo nano retroarch

                    I think what maybe it should be is this, tell me if this makes more sense:

                    edit /opt/retroarch/configs/all/retroarch.cfg cp retroarch.cfg retroarch.cfg.bak

                    Then one maybe this copies next item I type would be:
                    Sudo nano retroarch

                    Does that make more sense and why I get stuck in this file and cannot exit? Thanks!!!

                    dankcushionsD 1 Reply Last reply Reply Quote 0
                    • dankcushionsD
                      dankcushions Global Moderator @virg1
                      last edited by

                      @virg1 said in Need to find and delete .swp file of Retroarch.cfg:

                      Sure, and maybe this is the problem. The video I used to use to show me how to adjust hotkey and Emulator exit is no longer available, so all I have is a paper backup from i64x who originally posted.

                      From command line I type: edit /opt/retropie/configs/all/Retroarch.cfg

                      well, firstly linux is case-sensitive, so using Retroarch.cfg will open a new file that isn't retroarch.cfg

                      second problem: edit is not nano. in all our documentation we reference nano, not edit. my exit tip above was nano.

                      This goes right into file where I get stuck. There is more in the script which I can never get to and that may be because to Make a backup immediately it may need to include cp retroarch.cfg retroarch.cfg.bak

                      The final part of script is sudo nano retroarch

                      what?

                      I think what maybe it should be is this, tell me if this makes more sense:

                      edit /opt/retroarch/configs/all/retroarch.cfg cp retroarch.cfg retroarch.cfg.bak

                      no...

                      Then one maybe this copies next item I type would be:
                      Sudo nano retroarch

                      Does that make more sense and why I get stuck in this file and cannot exit? Thanks!!!

                      to be honest, i'd take a step back and stop using these random deleted guides :) changing hotkey is something you can do via the emulationstation menu > 'configure input'. you shouldn't need to edit any files.

                      perhaps you should describe exactly what you're trying to change and we can give you a better solution.

                      1 Reply Last reply Reply Quote 0
                      • V
                        virg1
                        last edited by

                        I have a feeling by using edit I am making a copy of the actual file retropie needs! And this is because I am not including the rest of the detail to call it the .bak backup name.

                        1 Reply Last reply Reply Quote 0
                        • V
                          virg1
                          last edited by

                          Yeah to be honest you are right, my old documentation has gotten me in some trouble here I do admit :)

                          My problem is that I set my hotkey to select button and exit Emulator to start. So 5+1. What I noticed is that when I exit Emulator it drops back into loading up game quickly because I think I have start button to load game. It gets confused. Then the kids hit buttons and goes into menu where can change Emulator to use and what not

                          I want to change use hotkey of player 2 select button (so mapped to key 6) and exit Emulator to the player 2 start button (so mapped to key 2)

                          This way I think it will avoid the accidental of starting the same game over when you try to exit if hold player 1 start button down too long.

                          There is an easier way to change this then in the retroarch.cfg?

                          dankcushionsD 1 Reply Last reply Reply Quote 0
                          • V
                            virg1
                            last edited by

                            Also just to note the reason why I would go into this retroarch.cfg file is because I had x-arcade Tankstick and has to copy player one controls over then call player 2 and mapping. The jstick tool which I heard works great now was not when I set my cabinet up a few years ago. When I was in this retroarch.cfg file I would also edit the hotkey and exit emaultor

                            That’s honestly only reason why I would Monkey around on this file. When I made my arcade there was nothing I could find on how to get player 2 to recognize on the keyboard Emulator and why I had to turn to an outside source.

                            1 Reply Last reply Reply Quote 0
                            • dankcushionsD
                              dankcushions Global Moderator @virg1
                              last edited by

                              @virg1 said in Need to find and delete .swp file of Retroarch.cfg:

                              Yeah to be honest you are right, my old documentation has gotten me in some trouble here I do admit :)

                              My problem is that I set my hotkey to select button and exit Emulator to start. So 5+1. What I noticed is that when I exit Emulator it drops back into loading up game quickly because I think I have start button to load game. It gets confused. Then the kids hit buttons and goes into menu where can change Emulator to use and what not

                              I want to change use hotkey of player 2 select button (so mapped to key 6) and exit Emulator to the player 2 start button (so mapped to key 2)

                              This way I think it will avoid the accidental of starting the same game over when you try to exit if hold player 1 start button down too long.

                              There is an easier way to change this then in the retroarch.cfg?

                              well, player 2 can't use hotkeys. it's for player 1 only.

                              1 Reply Last reply Reply Quote 0
                              • V
                                virg1
                                last edited by

                                So maybe that is my issue even w/ keyboard Emulator. Does retropie know that key 2 and key 6 are bound to player 2 and why when now making changes to retroarch.cfg file the hotkey and exit Emulator buttons now working on the arcade machine? I figured out How I updated this in past so it was just a quick change

                                Funny thing is when mapped to key 1 and key 5 for
                                Emulation station exits outnof game just fine. When I launch into attract mode, that’s when the games keep restarting after exiting. So I have no choice now but to use key values that would not include player 1 start (key 1) as it restarts game most of time after exiting.

                                Honestly it’s odd how this works fine on emulations station but not on attract mode. This is why I really wanna use values on the player 2 side of usb encoder which you are saying cannot be done right?

                                Thanks for all your help!!!

                                1 Reply Last reply Reply Quote 0
                                • V
                                  virg1
                                  last edited by

                                  Sorry meant to say player 2 buttons key 2 and key 6 are NOT working even though updated and saved in the retroarch.cfg file. Maybe that is why, retropie only wants me to use player one side values even though you would think the whole keyboard could be used

                                  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.