Hello I'm newbie and I would like to know where can I modify the login of Node-RED because I would like to add a photo of my house at login but I didn't find the HTML.
Hi @Brandon!
Welcome to this community.
There's no login.html
. The dialog is created at runtime. It's source is defined in user.js
.
Thanks tomorrow I'm going to try edit it
If you want to modify the image in the login dialog box you can do that via your settings file - no need to edit the source code.
In your settings.js
file (typically ~/.node-red/settings.js
), search for the editorTheme
section.
Within that object add a login
property like this:
editorTheme: {
login: {
image: "/absolute/path/to/login/page/big/image" // a 256x256 image
},
// Don't miss the comma above to separate this from the other settings
The editorTheme.login.image
setting should be an absolute path to the image you'd like it to use. It should be a 256x256 image.
Reference:
https://nodered.org/docs/user-guide/runtime/configuration#editor-themes
Hello knolleary, first of all thank for helping.
I tryied but when I save it show me an error
Were you logged in as the user āBrandonā when you tried to edit the file?
In a terminal window you can check the permissions of the file using
ls -al /home/Brandon/.node-red.settings.js
And show us what it shows
I'm logged as Brandon I will reinstall the OS because I don't remember the user and pass of root user
If you are using a pi you donāt want to install with the root user. Just use the bash script in the documentation
I tought to install with my user but log in with the root user to edit some archives. Is is correct?
-rw-r--r-- 1 root root 21332 Sep 17 19:43 /home/brandon/.node-red/settings.js
Then something is wrong with your installation. None of the files or folders in /home/Brandon/
should be owned by root. They should be owned by user and group Brandon
.
It would not end up with root permissions unless you ran it with sudo, or logged in as root. I am not sure it would even then. Perhaps you ran node-red with sudo.
You need to change your complete home folder so all files are owned by you. Google should find the command to do that for you.
We do now optionally set the settings file to be owned by root as part of the install script. This is to help stop web attacks from rewriting the settings file and changing peoples node-red editor passwords etc as we have seen before.
So yes if that option is chosen then you need to use root to edit the settings file.