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

    Cannot use file paths with spaces and parentheses when configuring controls through retroarch

    Scheduled Pinned Locked Moved Help and Support
    controller confraspberry pi 4retroarch
    7 Posts 3 Posters 431 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.
    • H
      helloThere
      last edited by helloThere

      Pi Model or other hardware: 4 B
      Power Supply: 5.1V || 3 A
      USB Devices connected: keyboard, mouse
      Controller used: arcade buttons and joysticks via USB Encoder
      32 GB SD Card (retropie), 64 GB USB Flash Drive (roms)

      I was trying to follow this guide for manually configuring retroarch controls.

      I initially tried configuring the controls for a single ROM by typing

      sudo nano  /home/pi/RetroPie/roms/n64/Star Wars - Rogue Squadron (USA).n64.cfg
      

      into the command prompt. For some reason, that led to -bash: syntax error near unexpected token '('. Assuming the issue was the spaces and the parentheses, I renamed the rom to SWRogueSquadron and that brought up a file, but it was totally empty. Not sure if that is expected behavior.

      Editing the controller configuration system-wide (also in the link above) seems to work, but I was just curious if there is any way to edit the configuration for a single rom without having to change the name of the rom.

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

        @helloThere Wrap the path in quotes "path". Or use tab to autocomplete the filename which will quote the characters like ( to \(

        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

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

          Also you shouldn't use sudo here.

          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

          1 Reply Last reply Reply Quote 0
          • H
            helloThere
            last edited by

            Thanks, that did the trick.

            The file is totally empty, though. Shouldn't config files by default have at the very least a couple of commented lines?

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

              There are no per rom configs by default (not sure how there could be!). You are creating a new .cfg file in your example.

              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

              1 Reply Last reply Reply Quote 0
              • H
                helloThere
                last edited by

                Alright, thanks. I'm not super experienced with retropie.

                @BuZz said in Cannot use file paths with spaces and parentheses when configuring controls through retroarch:

                Also you shouldn't use sudo here.

                by the way, other than being kinda unnecessary, could using sudo in front of the file path cause any issues?

                1 Reply Last reply Reply Quote 0
                • ClydeC
                  Clyde
                  last edited by Clyde

                  That depends. First and foremost, it's a secure behaviour to only give yourself administrator rights (e.g. via sudo) when absolutely necessary. Also, if you happen to change the file's owner or permissions by accident in a way that the normal user can't access them anymore, it can cause further problems.

                  In short, by training yourself to use sudo only when necessary you avoid future problems and, at worst, security holes.

                  In your particular case, mere editing an existing file shouldn't make you any trouble, but if the file doesn't exist, you'll create it with the owner root instead of pi. Because a new file will be created with only write permissions for the owner, any application like an emulator that's run by pi wouldn't be able to write to this file afterwards.

                  Again, that may or may not be a problem depending on the file, but avoiding to use sudo will negate this uncertainty alltogether.

                  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.