I was trying to connect a 7" LCD display panel to Raspberry PI 2. Nothing is displayed. The manual says to edit /boot/config.txt file.Logged in as user 'pi', I am not able to edit it. How to edit this file?
I was trying to connect a 7" LCD display panel to Raspberry PI 2. Nothing is displayed. The manual says to edit /boot/config.txt file.Logged in as user 'pi', I am not able to edit it. How to edit this file?
You will need to edit it as 'root' and not as 'pi'
https://www.raspberrypi.org/documentation/configuration/config-txt/
You should be able to use the 'sudo' command to elevate your privileges to superuser to edit the file
https://www.raspberrypi.org/documentation/linux/usage/root.md
e.g.:
sudo nano /boot/config.txt
The file is located in /boot. So I would recommend to type
cd /boot
first. Then you can edit the file:
nano config.txt
however, the permissions on that file do not allow the "pi" user to change it. You'll be in read-only mode, you cannot save changes back to the file you started with. So you'll have to run the edit(nano) command as root with the sudo command:
sudo nano config.txt
That should do it.
I should've answered: "Look buddy, doesn't work is an ambiguous statement. Does it sit on the couch all day? Is it unemployed? Please be specific! Define 'it' and what it isn't doing."
Linux is better than windows in that it usually gives you a hint as to what is wrong. On Windows you get a "can't display website" message when something goes wrong with displaying a website. The cause could be "out of memory on the local system", "the local system cannot do any networking at all", "something went wrong with looking up the IP address for the name you gave", "some router on the internet says that it SHOULD know how to forward the packets to the requested destination, but at the moment, cant forward it...." or "the remote host is up, can be reached, but there is no webserver running". On Linux all these give a different message and so you know who to contact about your problem, or if it is "out of your control, try again later is the only option".
So when you "can't edit the file", it would be useful if you told us what you tried and if you got an error message or something like that.
(The reason I say to cd into the right directory is that if things go wrong, I hope to get feedback that the cd already goes wrong. That would usually indicate a mis-typing of "/boot", most likely the wrong slash ( \ vs / ) .)
ThanQ...Dave.
I was not knowing the text editor is 'nano'. It looks similar to 'vi'. Does it also work like 'vi'? I mean commands...
Sorry, if I annoyed you...
But I didn't say "it doesn't work". I said "I am not able to edit". Also asked "How can I edit it". Since the Linux is better than Windows an expert will know that one can't edit as 'pi' and one has to assume 'su' role. That's what Dave did. Thanks to him.
Generally, when I am trying to help, I try to extract from the question what he would have done. If something is not clear I will ask for the details. My attitude is to help.
There is a very quick overview of Nano at:
https://www.raspberrypi.org/magpi/edit-text/
Steps 04 - 06 show you how to open, copy and paste, and save in the Nano text editor.