Try sudo nano /RetroPie/configs/all/retroarch.cfg (not actually sure this path is just right off the top of my head). You can also open it up in x by typing “startx” and opening the file manager.
Scroll to the bottom. Look for input_player1_joypad_index = “0″ Copy everything beneath it and paste it. In the copied set, change all instances of “player1” to “player2,” set “joypad_index = “1,” and put in the correct values for this controller!
Please stop using sudo for accessing all files. Using sudo in this way can be very dangerous.
Files in your home-directory shouldn’t require root rights to be accessible. If there’s a file that does require it, something is terribly wrong.
If you have to use sudo to access a file, it normally means that you can break your system (or atleast a part of your) if you’re doing something wrong. So always be sure about your changes if your system asks you for a root password.
About the gamepads:
Does your RPi register that there’s a gamepad connected via USB? You can check all USB-devices with lsusb.
Replug your gamepad while your RPi is running. After that check if dmesg has any useful information for you.
When I use lsusb I have on controller that is blank and works in both Emulationstaion and inside RetroArch. The other is called DragonRise Inc. Gamepad and it works in Emulationstation but when I try to configure it to Retroarch no matter what I do joyconfig will find my keyboard before it finds DragonRise and I don’t know how to switch priority to make it.