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

    How to edit config.txt using command line

    Scheduled Pinned Locked Moved Help and Support
    11 Posts 6 Posters 40.0k 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.
    • rbakerR
      rbaker @dazza
      last edited by

      @dazza

      To save a file you can use CTRL+O.

      To quit nano you can use CTRL+X. You will be prompted to save your file if it has changed and you can answer this prompt with either a Y or a N. If you’ve changed your mind at this point you can return the main edit screen using CTRL+C.

      I tend to use winSCP instead but I seem to remember these shortcuts appear at the bottom of nano but I cant be 100% certain.

      D 2 Replies Last reply Reply Quote 0
      • D
        dazza @rbaker
        last edited by

        @rbaker thank you very I will give it a go tomorrow. It had ^X Exit at the bottom of the page but I couldn't get it to work. I will try as you suggested when I get a chance and repot back

        P 1 Reply Last reply Reply Quote 0
        • P
          PaulCheffus @dazza
          last edited by

          @dazza
          ^X = Ctrl + X as mentioned above

          Cheers

          Paul

          1 Reply Last reply Reply Quote 0
          • R
            RetroResolution
            last edited by

            If you have the Raspbian lxde desktop installed and prefer to use GUI text editors, you'll need to bear in mind that files open with read-only permissions if you open them via the file manager.

            You can use the terminal to launch an editor with full superuser permissions so that you can easily edit, and most importantly save, them:

            sudo leafpad

            Or

            sudo leafpad /path/to/filename

            I cover using command line editors, such as nano, and GUI editors including leafpad and gedit in the following guide:
            Multipurpose Raspberry Pi – Part 2: Adding a Menu to Access RetroPie, Kodi, and the Raspbian Desktop

            If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

            RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

            1 Reply Last reply Reply Quote 0
            • D
              dazza @rbaker
              last edited by

              @rbaker dam can't seem to get the job done. I save it etc but still have white noise in emulationstation. I'm possibly not doing it correctly. Does anybody have a link to a video to show me how to do it correctly please?

              rbakerR 1 Reply Last reply Reply Quote 0
              • rbakerR
                rbaker @dazza
                last edited by

                @dazza I don't have a video but you should check that your modification to:

                /boot/config.txt
                

                is correctly typed. Here is the extract section containing the relevant bit from mine:

                # uncomment this if your display has a black border of unused pixels visible
                # and your display can output without overscan
                #disable_overscan=1
                disable_audio_dither=1
                # uncomment the following to adjust overscan. Use positive numbers if console
                # goes off screen, and negative if there is too much border
                #overscan_left=16
                #overscan_right=16
                #overscan_top=16
                #overscan_bottom=16
                

                To remove white noise, this is the only modification that I made. This removes the hiss when using the 3.5" jack. The next thing to try is to turn the volume down using option 4 in the retropie audio menu to about 70%. When the signal is then fed into your amp, it will be less noisy and the volume can then be controlled with the control on the amp. I actually have mine at 80% and there is no noise. The quality of the amp matters though. I returned a dedicated "arcade" amp costing £15. It was terrible. I just hacked apart a £10 usb powered speaker set and it's perfect.

                The only other thing that I can think of is that it is not saving your change? You may not be editing it correctly:

                sudo nano /boot/config.txt
                

                make the necessary changes

                Press Control-x
                Press y
                Press [enter]

                then.....

                sudo reboot
                

                Good Luck!

                D 1 Reply Last reply Reply Quote 0
                • R
                  RetroResolution
                  last edited by

                  I haven't disabled audio dither in config.txt, but I am using a small in-line rotary volume control between the 3.5" jack and my amp; it's basically just a variable resistor, which effectively removes the hiss when turned down enough.

                  The only issue really is that media playback (desktop, Kofi Media Centre etc) is somewhat louder than audio from the RetroPie emulators, and eliminating the hiss is a bit of a balancing act.

                  If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

                  RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

                  1 Reply Last reply Reply Quote 0
                  • D
                    dazza @rbaker
                    last edited by

                    @rbaker fantastic. I really appreciate your help. It worked a treat after the reboot. Thank you thank you thank you

                    1 Reply Last reply Reply Quote 0
                    • B
                      bradleyhollander
                      last edited by

                      Pls help how do I get to boot/configon retropie

                      1 Reply Last reply Reply Quote 0
                      • C
                        Chito
                        last edited by

                        In the terminal type
                        "cd /boot"
                        that will put in the boot directory, inside that directory is config.txt.
                        to open and edit it type
                        "sudo nano config.txt"

                        or you could open it from anywhere by typing "sudo nano /boot/config.txt"

                        What i would like to know is how could you turn this into a shell script?

                        1 Reply Last reply Reply Quote 1
                        • 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.