# How to not have to manually refresh a dashboard ui on startup

**URL:** <https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233>\
**Category:** Dashboard\
**Created:** [30 June 2020 13:35 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233 "2020-06-30T13:35:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zoomer](https://avatars.discourse-cdn.com/v4/letter/z/bbce88/32.png) [@Zoomer](https://discourse.nodered.org/u/Zoomer)\
**Post date:** [30 June 2020 13:35 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/1 "2020-06-30T13:35:01Z")

</div>

Hello,

I am very new to node red and the linux operating system (3 weeks).I am using a raspberry pi 3 and I have been trying to make a temperature gauge with node red which hooks up to a small 5 inch tft screen. The idea is that when the pi boots up it automatically displays the dashboard i have made which shows temperature. However, i have to manually refresh the page when it starts to see the dashboard, which isnt ideal.

I was wondering if there was away that the dashboard loads up without me having to hit refresh on a tiny screen.

I am aware I might have missed out some details but hopefully you get the gist.

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [30 June 2020 13:43 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/2 "2020-06-30T13:43:32Z")

</div>

Hello @Zoomer, welcome to the forum.

So, can we assume that you already configured your Raspberry Pi in kiosk or full-screen mode ?

---

<div class="post-metadata">

**Author:** ![Zoomer](https://avatars.discourse-cdn.com/v4/letter/z/bbce88/32.png) [@Zoomer](https://discourse.nodered.org/u/Zoomer)\
**Post date:** [30 June 2020 13:46 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/3 "2020-06-30T13:46:53Z")

</div>

I have set it up in full screen mode. From what I understand Kiosk mode stops you from going out of the window which I don't want as I'm still in the early stages of making my flow.

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [30 June 2020 13:58 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/4 "2020-06-30T13:58:32Z")

</div>

> [@Zoomer](#):
>
> I have set it up in full screen mode

Good. In such case you probably added a line like below in the autostart file, right ?

@chromium-browser --start-fullscreen [http://127.0.0.1:1880/ui](http://127.0.0.1:1880/ui)

That would start the dashboard (without need to refresh).

---

<div class="post-metadata">

**Author:** ![Zoomer](https://avatars.discourse-cdn.com/v4/letter/z/bbce88/32.png) [@Zoomer](https://discourse.nodered.org/u/Zoomer)\
**Post date:** [30 June 2020 14:07 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/5 "2020-06-30T14:07:21Z")

</div>

Yes, exactly that. However, I reboot the pi and I get the message in the chromium browser.

"This site can't be reached"  
(Ip address) refused to connect  
try:  
-checking connection  
-proxy and firewall  
ERR\_connection\_refused

Then I press the reload, and it displays the dashboard.

I should add that I have not connected this up to the internet as I want it to run locally. Does this affect anything?

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [30 June 2020 14:35 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/6 "2020-06-30T14:35:09Z")

</div>

Your Node-RED instance is installed in the very same Raspberry Pi where you are trying to run the dashboard ? Perhaps Node-RED is installed in another machine ?

I can not imagine why your are getting those warnings.  
There are a couple of similar posts in the forum, like this one. Perhaps you can get some clue by reading those posts.

> [@Added the Ikea dimmer to the nodes](https://discourse.nodered.org/t/added-the-ikea-dimmer-to-the-nodes/22167):
>
> As new to Red Node when finally got it all up and running and one tutorial I then added the dimmer switch node, now all's just blank with 127.0.0.1 refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR\_CONNECTION\_REFUSED well i've done all that, surely it cant be a reinstall

---

<div class="post-metadata">

**Author:** ![Zoomer](https://avatars.discourse-cdn.com/v4/letter/z/bbce88/32.png) [@Zoomer](https://discourse.nodered.org/u/Zoomer)\
**Post date:** [30 June 2020 15:10 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/7 "2020-06-30T15:10:04Z")

</div>

Everything I am doing is on the raspberry pi as i do not know how to operate the pi from an external pc.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 June 2020 15:12 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/8 "2020-06-30T15:12:07Z")

</div>

I guess what is happening is that the browser is starting up before node-red gets going (the browser is running on the same pi I assume) so it can't connect and shows the errors. Then node-red gets going, but it is too late as the browser has already given up.

If that is the case there isn't much that node red can do about it as the browser isn't connected to node-red. You could try putting a delay in the browser auto start so that it waits for node-red to get going before starting up.

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [30 June 2020 17:07 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/9 "2020-06-30T17:07:31Z")

</div>

I guess the root cause well spotted by @Colin could be (hopefully) fixed with below solution. I did not try it though.

[Can I delay chromium in kiosk mode?](https://www.raspberrypi.org/forums/viewtopic.php?t=122143)

---

<div class="post-metadata">

**Author:** ![Zoomer](https://avatars.discourse-cdn.com/v4/letter/z/bbce88/32.png) [@Zoomer](https://discourse.nodered.org/u/Zoomer)\
**Post date:** [1 July 2020 08:17 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/10 "2020-07-01T08:17:38Z")

</div>

I have just booted it up this morning. I noticed I had to reload the page multiple times before it would run. I knew that before I had to wait a long time for the flow to actually work upon booting up the pi but the browser was ready before then. I'll take a look at what @Andrei has linked me. Thank you both for helping!

---

<div class="post-metadata">

**Author:** ![Zoomer](https://avatars.discourse-cdn.com/v4/letter/z/bbce88/32.png) [@Zoomer](https://discourse.nodered.org/u/Zoomer)\
**Post date:** [1 July 2020 08:42 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/11 "2020-07-01T08:42:56Z")

</div>

The solution that the user said worked for him was as follows.......

///  
Not sure if this would work but you could replace the chromium entry with a Bash script.

Code: [Select all](https://www.raspberrypi.org/forums/viewtopic.php?t=122143#)

```auto
#!/bin/bash
echo "Starting chromium in 5 seconds..."
sleep 5
chromium --noerrdialogs --kiosk http://127.0.0.1:3000/demo.html &

```

Save the above to /home/pi/start-chromium.sh (note the addition of & at the end of chromium line to start chromium as a background process, thus allowing the script to end immediately instead of waiting for chromium to close)

"Run chmod u+x start-chromium.sh" to give execute permission.

Replace chromium line in X startup script with "@/home/pi/start-chromium.sh"  
///

I'm really not that familiar with the terminal, I literally just copy what different threads say work and hope it doesnt mess things up. Is someone able to walk me through this? I was originally doing all the start-up stuff in this directory.

```auto
/home/pi/.config/lxsession/LXDE-pi/autostart

```

When doing the sudo nano stuff again to the directory which was said in the entry it says this is writing a new file. Is this correct to go forward?

also the last two lines in the entry I'm not sure what they mean.

Thanks  
Zoomer

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [1 July 2020 11:35 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/12 "2020-07-01T11:35:23Z")

</div>

> [@Zoomer](#):
>
> Is someone able to walk me through this? I was originally doing all the start-up stuff in this directory.
> 
> ```auto
> /home/pi/.config/lxsession/LXDE-pi/autostart
> 
> ```
> 
> W

Can try. It will be safer if you share the content of your autostart file here so we can be specific to your use case.

---

<div class="post-metadata">

**Author:** ![Zoomer](https://avatars.discourse-cdn.com/v4/letter/z/bbce88/32.png) [@Zoomer](https://discourse.nodered.org/u/Zoomer)\
**Post date:** [1 July 2020 12:04 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/13 "2020-07-01T12:04:13Z")

</div>

The contents of the autostart file is as follows:  
//  
@lxpanel --profile LXDE-pi  
@pcmanfm --desktop --profile LXDE-pi  
#@screensaver -no-splash  
@xset s off  
@xset -dpms  
@xset s noblank  
@chromiuim-browser --start-fullscreen [http://127.0.0.1:1880/ui](http://127.0.0.1:1880/ui)  
@point-rpi  
//  
Im not sure if anything can be placed in here to stop the browser loading before node red has set up the local webpage.

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [1 July 2020 12:13 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/14 "2020-07-01T12:13:21Z")

</div>

> [@Zoomer](#):
>
> Im not sure if anything can be placed in here to stop the browser loading before node red has set up the local webpage.

Before we start off please double check your file. There is a typo in the following line. Maybe you want to correct it and test again before doing any other changes.

@chromiuim-browser --start-fullscreen [http://127.0.0.1:1880/ui](http://127.0.0.1:1880/ui)

---

<div class="post-metadata">

**Author:** ![Zoomer](https://avatars.discourse-cdn.com/v4/letter/z/bbce88/32.png) [@Zoomer](https://discourse.nodered.org/u/Zoomer)\
**Post date:** [1 July 2020 12:50 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/15 "2020-07-01T12:50:49Z")

</div>

Sorry it is:  
@chromium-browser --start-fullscreen [http://127.0.0.1:1880/ui/](http://127.0.0.1:1880/ui/)

I'm having to type this out manually.

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [1 July 2020 12:57 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/16 "2020-07-01T12:57:28Z")

</div>

First step, riskless.

1- Go to your home directory, presumably `/home/pi` and create the bash file with nano editor (or whatever text editor you use)

cd /home/pi  
nano start-chromium.sh

2- Copy and paste below lines to the new file

#!/bin/bash  
echo "Starting chromium in 15 seconds..."  
sleep 15  
chromium-browser --start-fullscreen [http://127.0.0.1:1880/ui](http://127.0.0.1:1880/ui) &

3- Save the file and then run below command

chmod u+x start-chromium.sh

4- You can test it by entering below statement in the command line (from your home directory). This should launch your browser.

./start-chromium.sh

We have not modified (yet) the autostart, which is the next step after you confirm you are good to go.

---

<div class="post-metadata">

**Author:** ![Zoomer](https://avatars.discourse-cdn.com/v4/letter/z/bbce88/32.png) [@Zoomer](https://discourse.nodered.org/u/Zoomer)\
**Post date:** [1 July 2020 13:09 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/17 "2020-07-01T13:09:29Z")

</div>

--disable-quic --enable-tcp-fast-open --ppapi-flash-path=/usr/lib/chromium-browser/libpepflashplayer.so --ppapi-flash-args=enable\_stagevideo\_auto=0 --ppapi-flash-version=  
[3746:3746:0630/212154.833772:ERROR:zygote\_host\_impl\_linux.cc(89)] Running as root without --no-sandbox is not supported. See [https://crbug.com/638180](https://crbug.com/638180).

I am getting this error. I had to use sudo command as well to get this to work. (well not work)

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [1 July 2020 13:15 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/18 "2020-07-01T13:15:37Z")

</div>

Check who is the owner and what are the permission of the new file named `start-chromium.sh` with the `ls -l ` command

Normally the user should be `pi` not `root` (which may be troubled if you used sudo to create the file).

---

<div class="post-metadata">

**Author:** ![Zoomer](https://avatars.discourse-cdn.com/v4/letter/z/bbce88/32.png) [@Zoomer](https://discourse.nodered.org/u/Zoomer)\
**Post date:** [1 July 2020 13:19 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/19 "2020-07-01T13:19:08Z")

</div>

I right clicked on the file on the interface and on properties it says that root is the owner.  
Shall I create a new file?  
and do i need to delete the old one? if so how.

Thanks

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [1 July 2020 13:24 UTC](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233/20 "2020-07-01T13:24:23Z")

</div>

As a general rule don´t use sudo unless strictly required. It should be easy to change the owner of the bash file. Try:

sudo chown pi start-chromium.sh

and then check the result with the command `ls -l`

[Next page](https://discourse.nodered.org/t/how-to-not-have-to-manually-refresh-a-dashboard-ui-on-startup/29233.md?page=2)
