pitony
Posts: 3
Joined: Sun Apr 03, 2016 12:05 pm

can't edt cnfg txt file

Sun Apr 03, 2016 12:14 pm

hello all
new to both the forum and pi, have installed 7" monitor but display is upside down.
edited txt file with new line
lcd_rotate=2
tried to save file but the file cannot be re written to.

any advice on how to get access to edit and save to the txt file would be really helpfull.

thanks in advance

tony

have searched forum but cannot find relevant info. not too technical but can follow instructions OK.

darkbibble
Posts: 602
Joined: Mon Mar 09, 2015 5:20 pm
Location: corby, england

Re: can't edt cnfg txt file

Sun Apr 03, 2016 12:56 pm

load up terminal, switch to the folder the file is in, then type "sudo nano filename"
Q; How many Windows users does it take to fix a Linux problem??
A; Whats a Linux problem

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5623
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: can't edt cnfg txt file

Sun Apr 03, 2016 12:58 pm

pitony wrote:hello all
new to both the forum and pi, have installed 7" monitor but display is upside down.
edited txt file with new line
lcd_rotate=2
tried to save file but the file cannot be re written to.
any advice on how to get access to edit and save to the txt file would be really helpfull.
thanks in advance
tony
have searched forum but cannot find relevant info. not too technical but can follow instructions OK.
What editor are you using? Are you editing on the Pi itself? If using an editor from the command line did you precede the command with sudo? Eg.:

Code: Select all

sudo nano /boot/config.txt
(I suspect you have a "file permissions problem")
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

Re: can't edt cnfg txt file

Sun Apr 03, 2016 1:01 pm

Two ways:

On a PC (or Apple or Android device) open using word, or native text editor:

Insert micro sdccard in to reader, then open 'config.txt' file, make changes, save file. Then insert sdcard into pi.



In a terminal screen on pi itself:

Code: Select all

sudo nano /boot/config.txt
To SAVE changes:
Hold 'Ctrl' and 'x' at same time, then 'y', then 'enter'

Then, in terminal:

Code: Select all

sudo reboot
DNPNWO

pitony
Posts: 3
Joined: Sun Apr 03, 2016 12:05 pm

Re: can't edt cnfg txt file

Sun Apr 03, 2016 1:28 pm

He all

many thanks for the replies, i used the terminal and have now got a display the right way up.

forums are great

regards

tony

Return to “Beginners”