# Can't open image fullscreen from node-red

**URL:** https://discourse.nodered.org/t/cant-open-image-fullscreen-from-node-red/37807
**Category:** General
**Created:** [20 December 2020 18:50 UTC](https://discourse.nodered.org/t/cant-open-image-fullscreen-from-node-red/37807 "2020-12-20T18:50:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![coen17st](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/coen17st/32/34027_2.png) [@coen17st](https://discourse.nodered.org/u/coen17st)
#### Post date: [20 December 2020 18:50 UTC](https://discourse.nodered.org/t/cant-open-image-fullscreen-from-node-red/37807/1 "2020-12-20T18:50:07Z")

</div>

Hi,

I have Node-RED running on ubuntu dekstop locally and i want show a picture in fullscreen from a node-RED trigger, i thought that would be possible from the exec node but got these error

```auto
`Command failed: bash /home/mediacenter/.node-red/scripts/2.sh
Unable to init server: Could not connect: Connection refused

(eog:4320): Gtk-WARNING **: 19:32:36.916: cannot open display: `

```

when i run the command in the terminal is works as expected. Why does i not work from Node-RED?

This is my flow

```auto
[{"id":"a2d7b281.33cbe","type":"exec","z":"7f48333a.ec0c9c","command":"","addpay":true,"append":"","useSpawn":"false","timer":"60","oldrc":false,"name":"","x":410,"y":140,"wires":[[],[],["372535d6.3e8fda"]]}]

```

and this in the 2.sh file

```auto
#!/bin/bash

eog --fullscreen /home/mediacenter/media/instructions/1.gif

```

---

<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: [20 December 2020 22:07 UTC](https://discourse.nodered.org/t/cant-open-image-fullscreen-from-node-red/37807/2 "2020-12-20T22:07:15Z")

</div>

Welcome to the forum @coen17st.

Does it help if you use something like  
`bash -c "DISPLAY=:0 /home/mediacenter/.node-red/scripts/2.sh"`

If that does work there may well be a better way of writing it.

---

<div class="post-metadata">

### Author: ![coen17st](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/coen17st/32/34027_2.png) [@coen17st](https://discourse.nodered.org/u/coen17st)
#### Post date: [21 December 2020 07:57 UTC](https://discourse.nodered.org/t/cant-open-image-fullscreen-from-node-red/37807/3 "2020-12-21T07:57:31Z")

</div>

> [@Colin](#):
>
> -c "DISPLAY=:0

Thanks so much @Colin that works.  
I'm going to look up exactly what `-c "DISPLAY=:0` means and why it's needed in Node-RED and not locally in ubuntu

---

<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: [21 December 2020 09:37 UTC](https://discourse.nodered.org/t/cant-open-image-fullscreen-from-node-red/37807/4 "2020-12-21T09:37:40Z")

</div>

It is needed because you are running node red in a session that does not have a display associated with it. You would have the same issue if you tried to run the command from any application running in the background. For example if you used ssh to open a terminal on the node-red machine from another PC and ran the command from there.

---

<div class="post-metadata">

### Author: ![coen17st](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/coen17st/32/34027_2.png) [@coen17st](https://discourse.nodered.org/u/coen17st)
#### Post date: [21 December 2020 10:46 UTC](https://discourse.nodered.org/t/cant-open-image-fullscreen-from-node-red/37807/5 "2020-12-21T10:46:24Z")

</div>

Thanks a lot, i understand now

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [4 January 2021 10:46 UTC](https://discourse.nodered.org/t/cant-open-image-fullscreen-from-node-red/37807/6 "2021-01-04T10:46:40Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
