# Screenshot of Dashboard headless mode

**URL:** <https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738>\
**Category:** General\
**Created:** [10 November 2019 06:52 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738 "2019-11-10T06:52:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefanp](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stefanp](https://discourse.nodered.org/u/stefanp)\
**Post date:** [10 November 2019 06:52 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/1 "2019-11-10T06:52:23Z")

</div>

Hi guy,  
I am trying to take a screenshot in headless mode of the dashboard but till now I had no success.  
I can take screenshots of webpages without any problems. but when it comes to taking a screenshot of the dashboard or the node-red program environment I get a white or gray image.  
Till now I tried firefox and cutycapt.

In the exec node command line:  
firefox -screenshot pic.png [http://192.168.1.1:1880/ui](http://192.168.1.1:1880/ui)

or  
xvfb-run --server-args="-screen 0, 1024x768x24" ./CutyCapt --url=http://192.168.1.1:1880/ui --out=pic.png  
with cutycapt I tried a delay as well, but same result.

maybe someone of you already solved this problem?!  
I would be happy if someone could help me 😉

Stefan

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [12 November 2019 10:58 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/2 "2019-11-12T10:58:44Z")

</div>

So let me see if I understand. You are running node-red on machine `A` and it is a headless machine.

You want the NR instance on machine `A` to take a screen shot of the NR backend running on `A`

Is that correct?

---

<div class="post-metadata">

**Author:** ![stefanp](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stefanp](https://discourse.nodered.org/u/stefanp)\
**Post date:** [12 November 2019 20:03 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/3 "2019-11-12T20:03:47Z")

</div>

Hi zenofmud,

Yes that is correct. I am running NR on a raspberry and I want to take a screenshot of the dashboard on this maschine. I can take screenshot from other maschines (html sides, logins from routers,..) in the network, but not from the dashboard itself.

Stefan

---

<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:** [12 November 2019 20:34 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/4 "2019-11-12T20:34:52Z")

</div>

How can you take a screenshot if it hasn't got a screen?

---

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [12 November 2019 20:45 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/5 "2019-11-12T20:45:58Z")

</div>

On linux you can fire up an X instance without a screen attached. It comes in handy for remote management tools like VNC servers/viewers.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [12 November 2019 23:00 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/6 "2019-11-12T23:00:18Z")

</div>

If you want a screen shot why not open the pi’s version of NR on another machine and snap shot it?

---

<div class="post-metadata">

**Author:** ![stefanp](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stefanp](https://discourse.nodered.org/u/stefanp)\
**Post date:** [14 November 2019 06:21 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/7 "2019-11-14T06:21:07Z")

</div>

Hi zenofmud,  
In the end I have only the pi in a network that has NR running. The other network clients are sensors which send data via MQTT to the pi. The pi is in a remote area and the communication will be realized by Telegram. The pi should send a image of the dashboard when I ask for. All works till now except that I can not take a screenshot of the dashboard.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 November 2019 10:37 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/8 "2019-11-14T10:37:12Z")

</div>

maybe try using npm install node-red-contrib-web-page-screenshot I've never used it, but it might work. If you have issues you should contact the author.

MAKE SURE to read the requirements.

---

<div class="post-metadata">

**Author:** ![stefanp](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stefanp](https://discourse.nodered.org/u/stefanp)\
**Post date:** [14 November 2019 13:16 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/9 "2019-11-14T13:16:02Z")

</div>

Hi zenofmud,  
I have already tested the npm contrib and I had the same problem.  
Web pages work fine except the node red.

Best regards,  
Stefan

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 November 2019 13:34 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/10 "2019-11-14T13:34:53Z")

</div>

Sorry, I've run out of ideas.

---

<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:** [14 November 2019 13:48 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/11 "2019-11-14T13:48:58Z")

</div>

When you say you get a white or grey image do you mean there is nothing there at all node-red related, even on the editor page?

---

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [14 November 2019 13:58 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/12 "2019-11-14T13:58:08Z")

</div>

Have you tried chromium rather than firefox? I don't know what OS you're using, but default raspbian doesn't ship with firefox.

---

<div class="post-metadata">

**Author:** ![stefanp](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stefanp](https://discourse.nodered.org/u/stefanp)\
**Post date:** [14 November 2019 14:53 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/13 "2019-11-14T14:53:23Z")

</div>

Dear JayDickson,

Yes, I tried with puppeteer, that's the headless version of Chromium, but with no useful result.  
I am using Buster (Debian) OS.

---

<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:** [14 November 2019 15:11 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/14 "2019-11-14T15:11:47Z")

</div>

Did you see my question? I am wondering whether you are seeing the background but not the websockets stuff. Most web pages don't use that which would explain why other pages look ok.  
Also does that command work if you run it on a PC picking up the page from the pi.  
Just noticed that you have the ip as 192.168.1.1. Are you sure that is the address of the pi, it looks more like a router address? Try [http://localhost:1880](http://localhost:1880)

---

<div class="post-metadata">

**Author:** ![stefanp](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stefanp](https://discourse.nodered.org/u/stefanp)\
**Post date:** [14 November 2019 16:52 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/15 "2019-11-14T16:52:52Z")

</div>

Dear Colin,

I am really sorry, totally overlooked your reply!  
I have tested different IP addresses and I also tried the [http://localhost:1880](http://localhost:1880).  
I will make a screenshot of the dashboard and the program environment of NR and put it hear so you can see what the screenshot looks like.  
You have a good point, I think the websocket is the problem!

Screenshot with cutycapt of NR progam

 ![cutycapt_nr](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/5c8aac57802eafa4f636c2ad01bfee6d6abdac55.png)

Screenshot with cutycapt of dashboard

 ![cutycapt_dash](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/b5d0edf71f49c26a9c2bb5e6ffa14e58700996f3.png)

---

<div class="post-metadata">

**Author:** ![stefanp](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stefanp](https://discourse.nodered.org/u/stefanp)\
**Post date:** [14 November 2019 17:52 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/16 "2019-11-14T17:52:29Z")

</div>

These are the screenshots taken with firefox

NR program (192.168.1.15:1880)

 ![firefox_nr](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/1be4f8f185d0fc01bca6620c1be369a1818193c0.png)

dashboard (192.168.1.15:1880/ui/)

 ![firefox_dash](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/976778a834d734e2fbe6de1e4d2ccf707665d75a.png)

---

<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:** [14 November 2019 18:12 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/17 "2019-11-14T18:12:00Z")

</div>

Does it work if you use those commands in a PC rather than in the pi, but still giving the ip of the pi so it will pick the page up from there. Shut down any browsers first obviously.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [14 November 2019 18:19 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/18 "2019-11-14T18:19:34Z")

</div>

It a a dynamic app. Most of the page is built by javascript. If you do a right click view source, then look at the html in there you won’t see much. Unless the grabber you are using behaves like a real browser it may not render the javascript generated parts.

---

<div class="post-metadata">

**Author:** ![stefanp](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stefanp](https://discourse.nodered.org/u/stefanp)\
**Post date:** [14 November 2019 18:23 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/19 "2019-11-14T18:23:49Z")

</div>

Hey Colin,

I can not test the commands on a PC because I dont have Debian installed on any of my machines.

---

<div class="post-metadata">

**Author:** ![stefanp](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stefanp](https://discourse.nodered.org/u/stefanp)\
**Post date:** [14 November 2019 18:26 UTC](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738/20 "2019-11-14T18:26:21Z")

</div>

Hi dceejay,

Any ideas which headless browser could do it?

[Next page](https://discourse.nodered.org/t/screenshot-of-dashboard-headless-mode/17738.md?page=2)
