# Running a script using the exec node to reboot chromium!!

**URL:** <https://discourse.nodered.org/t/running-a-script-using-the-exec-node-to-reboot-chromium/5357>\
**Category:** General\
**Created:** [30 November 2018 16:42 UTC](https://discourse.nodered.org/t/running-a-script-using-the-exec-node-to-reboot-chromium/5357 "2018-11-30T16:42:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cjmaverickforever](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@cjmaverickforever](https://discourse.nodered.org/u/cjmaverickforever)\
**Post date:** [30 November 2018 16:42 UTC](https://discourse.nodered.org/t/running-a-script-using-the-exec-node-to-reboot-chromium/5357/1 "2018-11-30T16:42:51Z")

</div>

Using the exec node I'm able to run commands just fine, but when I try to run a script that loads chromium in kiosk mode using the matchbox window manager I get unable to open display errors.

When I run the same script in an SSH session it loads fine and chromium shows up on the Pi's local video output.

I'm just loading the script by running /home/pi/script.sh which contains the commands and parameters for the kiosk mode.

Is it possible to do this? I am doing this to get around chromium crashing to have it reboot the UI a few times a day, I would do a cron job but it has to reset at a specific time which is set inside node-red so I thought I could just have the exec node do it.

---

<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:** [30 November 2018 19:12 UTC](https://discourse.nodered.org/t/running-a-script-using-the-exec-node-to-reboot-chromium/5357/2 "2018-11-30T19:12:33Z")

</div>

The Linux environment for local user, the user that is running Node-RED, and ssh may all be different.

You will probably need to set the DISPLAY environment correctly. Google is your friend.

---

<div class="post-metadata">

**Author:** ![seth350](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/seth350/32/4617_2.png) [@seth350](https://discourse.nodered.org/u/seth350)\
**Post date:** [1 December 2018 02:30 UTC](https://discourse.nodered.org/t/running-a-script-using-the-exec-node-to-reboot-chromium/5357/3 "2018-12-01T02:30:50Z")

</div>

> [@Autostart Chromium After Node-Red Starts](https://discourse.nodered.org/t/autostart-chromium-after-node-red-starts/3958/2):
>
> UPDATE: Found some more neat commands for chromium. Running the script above does work, but you will, at times, be prompted with messages from chromium. Example: "Chromium is not your default browser" & "Chromium did not shut down properly, restore pages?" To hide these alerts you can use this command instead. Note that some of these commands may be redundant, I havn't played with it since I got this working. The --start-fullscreen command can probably be omitted because it is using the --ap…
