Please read the release notes carefully since this update requires adjustments to your Raspberry Pi configuration!
Settings in config.js aren't loaded after reboot of RasPi
LincolnClay last edited by LincolnClay
@morozgrafix Thanks for the feedback. I did a re-install without the all the
sudocommands. However I am running into a new problem now. After some other installations earlier I turned my raspberry off. When I turned it on again, and did a
npm startfrom /MagicMirror MM started but it doesn’t seem to get the config.js file from /MagicMirror/Config. I have changed the file to match my local weather etc. When I start MM now after a full shutdown, I get the standard info displayed on MM. I did a
sudo haltbefore I unplugged my raspberry.
Edit: Getting the following errors:
@LincolnClay before reinstalling did you delete MagicMirror directory from
/home/pidirectory? I just want to make sure that your
piuser has full access to files inside of MagicMirror directory. You can check who owns MagicMirror directory by running following command in the terminal:
ls -l /home/$USER
which will give you output similar to this:
drwxr-xr-x 2 pi 4.0K Jan 21 14:30 foo/ drwxr-xr-x 2 root 4.0K Jan 21 14:31 foo1/ drwxr-xr-x 14 pi 4.0K Jan 8 14:52 MagicMirror/
as you can see in the example above directory
MagicMirrorare owned by
foo1is owned by
root. To change ownership from
pithis command needs to be executed (in the example below it will change ownership of
rootto currently logged in user):
sudo chown -R $USER /home/$USER/foo1/
basically it does translates to this: Running as root user (one who currently owns
foo1directory and has write permissions) change owner (‘chown’) recursively (
-R) to currently logged in user (
piin our case) for directory
foo1. After running this command
foo1will belong to
ls -l /home/$USERshould produce results similar to this:
drwxr-xr-x 2 pi 4.0K Jan 21 14:30 foo/ drwxr-xr-x 2 pi 4.0K Jan 21 14:31 foo1/ drwxr-xr-x 14 pi 4.0K Jan 8 14:52 MagicMirror/
QUESTION: When you changed
/home/pi/MagicMirror/config/config.jsdid you actually save that file? I’m trying to understand what you mean by “I get the standard info displayed on MM” Does it show default settings? Did it ever show info with your local weather?
I also see some Xlib: errors or warnings in your logs and I have no idea where that coming from.
P.S. It maybe worth opening your own thread with exact steps that you already did for easier troubleshooting and not to highjack another thread.
LincolnClay last edited by
@morozgrafix I really appreciate in depth answer. I am sorry for hijacking this thread, I had no intention to do so. I in fact closed my thread because I thought your last suggestion resolved my issues permanently. This was before I realized I got a new issue after rebooting my raspberry.
Regarding your questions:
Yes, I deleted the MagicMirror directory from
/home/pi, before the re-install.
I checked if pi had full access and it did.
drwxr-xr-x 15 pi pi 4096 Jan 21 23:10 MagicMirror -rwxr-xr-x 1 pi pi 38 Jan 21 14:37 mm.sh -rwxr-xr-x 1 pi pi 38 Jan 21 14:43 mm.sh.save drwxr-xr-x 154 root root 4096 Jan 19 18:18 node_modules
Regarding if I saved the
/configfolder files: Yes, I copied the edited text from
/home/pi/MagicMirror/config.jsand pasted it in
config.js.sampleboth where saved. What I meant was after I have edited these files, MM starts with my desired weather and news info, which I input in the
/configfiles. So before reboot, MM is not displaying any default settings.
When the raspberry is rebooted, MM now starts with default settings, even though the files in
/configis exactly the same as before the reboot. (still in
/home/pi/MagicMirror/configwith edited text as before).
@LincolnClay I’m not really sure why MM code is not picking up your
By the way
config.js.sampleis just a sample config that can be copied into
config.jsand it comes along with MM code and doesn’t really play any role when MM starts up, so there is no need to modify that file in any way.
/home/pi/MagicMirror/config/config.jskeeps your desired changes, I wonder if you somehow have 2 different locations where MM is installed and configured. (I noticed that you have
/home/piwhich seems a bit odd.)
I’m assuming you are starting MM with pm2 on a startup. Can you please show post contents of your
/home/pi/mm.shfile (you can run
cat /home/pi/mm.shand copy/paste contents of the output) and also run
pm2 show mmand copy/paste output here?
Sorry I’m kind of running out of ideas without knowing more information.
P.S. I’ve forked our conversation into a separate topic, this way we will not highjack original topic.
LincolnClay last edited by
@morozgrafix sorry for the late reply, I didn’t want to waste your troubleshooting the MagicMirror files, my suspicion was that these problems where caused by my autoboot fix for vnc-server. Which indeed was the issue. After a new clean install NOOBS install with a lot of less
sudo'sthan the first time. Everything now works perfectly. I am definitely not the right person to talk about this stuff, but I think the problem was caused by a " No session for PID XXXX" error at every launch.
Anyways, I really appreciate you taking your time to help. I wouldn’t have found all my problems and fixes without it
cool, glad you managed to get it resolved and up and running.