Changing Favicon

1,107 views
Skip to first unread message

Jamie Abbott

unread,
Oct 5, 2016, 9:40:57 AM10/5/16
to Node-RED UI
I've just upgraded to Dashboard 2.0 and tried to change the default favicon as I did previously with contrib-ui, with little success. I've changed 
/home/pi/.node-red/node_modules/node-red-dashboard/dist/icon.png
and 
sudo rm /usr/lib/node_modules/node-red/public/favicon.ico
The favicon for the main page has changed, but not for :1880/ui/#/0.

Two strange things: 
1) I sometimes see the new favion appear briefly before being replaced  by:

2) when checking the page source the and clicking on the hyperlink to icon.png I see the image above in chrome but when i download it it appears as the one i replaced! Using Chrome 53, cleared cache to no avail.

Jamie 

Thanos Tsakiris

unread,
Oct 6, 2016, 6:46:59 AM10/6/16
to Node-RED UI
If you have installed Node-red as root under /usr/lib/node_modules I would expect that node-red-dashboard should either be under /root/.node-red/node_modules/node-red-dashboard or (for some reason in my raspbian system I can't understand why) it is under /root/.node-red/node_modules/node_modules/node-red-dashboard

Check to see if you have such a directory and I think you should substitute /root/.node-red/node_modules/node_modules/node-red-dashboard/dist/icon.png with the one you want to make it appear in the dashboard page

Jamie Abbott

unread,
Oct 6, 2016, 7:40:30 AM10/6/16
to Node-RED UI
Check to see if you have such a directory and I think you should substitute /root/.node-red/node_modules/node_modules/node-red-dashboard/dist/icon.png with the one you want to make it appear in the dashboard page

Nope, no such directory I did a fresh install of raspbian lite and installed Node-red & Mossquitto only. A global find for *.png & *.ico doesn't pull up any other likely location either.

Jamie

Thanos Tsakiris

unread,
Oct 6, 2016, 8:47:45 AM10/6/16
to Node-RED UI
Did you also reinstall node-red-dashboard? How? simple npm install node-red-dashboard, sudo npm install node-red-dashboard or sudo npm install -g node-red-dashboard?

depending on the above will determine the location of the node-red-dashboard files (simple npm will put it under /home/pi/.node-red/node_modules while sudo npm will put it under /root/.node-red/mode_modules and finally sudo npm -g will put it under /usr/lib/node_modules/node-red/node_modules

Bear in mind that you should first do sudo ls -la /root to see what's in there and should you find a .node-red folder in there continue gradually to go deeper into the directory structure.

Thanos Tsakiris

unread,
Oct 6, 2016, 8:52:51 AM10/6/16
to Node-RED UI
slight mistake: if you use sudo npm install -g node-red-dashboard it will install under /ust/lib/node_modules/node-red-dashboard

Jamie Abbott

unread,
Oct 6, 2016, 10:33:09 AM10/6/16
to Node-RED UI
I used npm install node-red-dashboard under standard user pi, the path is /home/pi/.node-red/node_modules/node-red-dashboard

Jamie
Reply all
Reply to author
Forward
0 new messages