Skelingaton
Posts: 14
Joined: Sat Dec 28, 2019 3:18 pm

Getting Permission to Edit Config.txt

Fri Jan 17, 2020 1:02 am

I think I'm finally narrowing down my display problem on my Pi 4b but I've run into another issue. I found the config.txt file in my Pi boot directory but it won't let me save changes to it. I've read that you need to use a sudo command to access programs as the superuser but I don't know how to make this work for the config.txt file.

I've typed just Sudo into the command box and then tried opening the config file editing it and then saving but it still won't let me. I've also tried typing sudo boot/config.txt but it says command not found. It does the same thing when just typing just boot/config.txt. Also, when a line says to uncomment in the config.txt file does it mean to delete it out of there or just set the value to 0?

jahboater
Posts: 5412
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Getting Permission to Edit Config.txt

Fri Jan 17, 2020 1:11 am

Skelingaton wrote:
Fri Jan 17, 2020 1:02 am
I've typed just Sudo into the command box and then tried opening the config file editing it and then saving but it still won't let me. I've also tried typing sudo boot/config.txt but it says command not found. It does the same thing when just typing just boot/config.txt.
You need to use a text editor to alter a file. Examples are nano, vi, emacs etc. I suggest trying nano to start with.
Practice changing a local file in your home directory.

Code: Select all

nano file
To edit config.txt you will need:

Code: Select all

nano /boot/config.txt
This however will fail because you do not have permission to alter system configuration files.
The sudo command temporarily gives you that permission:

Code: Select all

sudo nano /boot/config.txt
Skelingaton wrote:
Fri Jan 17, 2020 1:02 am
Also, when a line says to uncomment in the config.txt file does it mean to delete it out of there or just set the value to 0?
It means remove the # character at the start of the line.

Skelingaton
Posts: 14
Joined: Sat Dec 28, 2019 3:18 pm

Re: Getting Permission to Edit Config.txt

Fri Jan 17, 2020 1:43 am

Well I figured out how to edit the text. Unfortunately changing the settings did not solve my problem of the video not outputting to my main TV. Really not sure what to do now.

User avatar
Botspot
Posts: 1025
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Re: Getting Permission to Edit Config.txt

Fri Jan 17, 2020 2:16 am

You risk being banned for a week if you post duplicate topics. Here is the duplicate topic.
I suggest you delete one of them to avoid moderator action.
Want to make your own Raspbian image?
  • Hard way: Mess with confusing terminal commands.
  • Easy way: Let Pi-Power-Tools do it all for you!
Boot your image in a VM, Flash from the Internet at top speed, Mount (to drop files in), Edit partitions, Shrink/Expand, Repair, and more. Enjoy! :)
https://github.com/Botspot/Pi-Power-Tools

Skelingaton
Posts: 14
Joined: Sat Dec 28, 2019 3:18 pm

Re: Getting Permission to Edit Config.txt

Fri Jan 17, 2020 2:22 am

Botspot wrote:
Fri Jan 17, 2020 2:16 am
You risk being banned for a week if you post duplicate topics. Here is the duplicate topic.
I suggest you delete one of them to avoid moderator action.
If I knew how I would.

User avatar
Botspot
Posts: 1025
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Re: Getting Permission to Edit Config.txt

Fri Jan 17, 2020 2:35 am

Skelingaton wrote:
Fri Jan 17, 2020 2:22 am
Botspot wrote:
Fri Jan 17, 2020 2:16 am
You risk being banned for a week if you post duplicate topics. Here is the duplicate topic.
I suggest you delete one of them to avoid moderator action.
If I knew how I would.
No problem. I was banned for a week once for dupli-posting, not fun!

Just push the report button on the top post, and say you want the topic deleted.
Want to make your own Raspbian image?
  • Hard way: Mess with confusing terminal commands.
  • Easy way: Let Pi-Power-Tools do it all for you!
Boot your image in a VM, Flash from the Internet at top speed, Mount (to drop files in), Edit partitions, Shrink/Expand, Repair, and more. Enjoy! :)
https://github.com/Botspot/Pi-Power-Tools

User avatar
rpdom
Posts: 16713
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Getting Permission to Edit Config.txt

Fri Jan 17, 2020 7:32 am

Botspot wrote:
Fri Jan 17, 2020 2:16 am
You risk being banned for a week if you post duplicate topics. Here is the duplicate topic.
I suggest you delete one of them to avoid moderator action.
You won't get banned for a duplicate post, just told not to do it again. Banning is for something more serious.

You can't delete posts one made (and replied to), but you can report them and ask the moderators to do it for you. Sometimes the duplicate gets locked along with a warning that duplicates are not allowed. This is to inform future posters that it is not right to post duplicates.
Unreadable squiggle

User avatar
Botspot
Posts: 1025
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Re: Getting Permission to Edit Config.txt

Fri Jan 17, 2020 1:14 pm

rpdom wrote:
Fri Jan 17, 2020 7:32 am
You won't get banned for a duplicate post, just told not to do it again. Banning is for something more serious.
I posted a duplicate, and got banned for a week. Never saw a warning, never saw it coming. Just basing off what I have experienced, and trying to keep users from having to learn the hard way too.
Want to make your own Raspbian image?
  • Hard way: Mess with confusing terminal commands.
  • Easy way: Let Pi-Power-Tools do it all for you!
Boot your image in a VM, Flash from the Internet at top speed, Mount (to drop files in), Edit partitions, Shrink/Expand, Repair, and more. Enjoy! :)
https://github.com/Botspot/Pi-Power-Tools

User avatar
rpdom
Posts: 16713
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Getting Permission to Edit Config.txt

Fri Jan 17, 2020 1:17 pm

Botspot wrote:
Fri Jan 17, 2020 1:14 pm
rpdom wrote:
Fri Jan 17, 2020 7:32 am
You won't get banned for a duplicate post, just told not to do it again. Banning is for something more serious.
I posted a duplicate, and got banned for a week. Never saw a warning, never saw it coming. Just basing off what I have experienced, and trying to keep users from having to learn the hard way too.
That is not the norm and I suspect you had done something else to justify a short ban. I have no idea what that might have been. The mods may like to comment.
Unreadable squiggle

GlowInTheDark
Posts: 439
Joined: Sat Nov 09, 2019 12:14 pm

Re: Getting Permission to Edit Config.txt

Fri Jan 17, 2020 1:24 pm

Or he just caught one of the mods on a bad day.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

jahboater
Posts: 5412
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Getting Permission to Edit Config.txt

Fri Jan 17, 2020 3:15 pm

GlowInTheDark wrote:
Fri Jan 17, 2020 1:24 pm
Or he just caught one of the mods on a bad day.
The forum rules are simple:
https://www.raspberrypi.org/forums/view ... 63&t=15137
A simple, unintentional, mistake by a new user is not reason for a ban.
Must be something else.
Back to topic, or I'll get banned :)

Return to “Troubleshooting”