# Open new Terminal window in NodeRed

**URL:** <https://discourse.nodered.org/t/open-new-terminal-window-in-nodered/56899>\
**Category:** General\
**Created:** [19 January 2022 04:44 UTC](https://discourse.nodered.org/t/open-new-terminal-window-in-nodered/56899 "2022-01-19T04:44:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![namph-sgn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/namph-sgn/32/54561_2.png) [@namph-sgn](https://discourse.nodered.org/u/namph-sgn)\
**Post date:** [19 January 2022 04:44 UTC](https://discourse.nodered.org/t/open-new-terminal-window-in-nodered/56899/1 "2022-01-19T04:44:09Z")

</div>

I'm continuing the topic in this post: [Node Red open New terminal](https://discourse.nodered.org/t/node-red-open-new-terminal/41795)

I'm currently using Ubuntu 20.04  
I want to open a terminal and run commands when nodered startup.  
My flows:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/6/c6bfee037d4b8a932a60d71a3f62400cf5df170f.png)

My script:

> DISPLAY=:0 gnome-terminal --window -- /bin/sh -ec "./run\_commands.sh; exec bash"

The error I'm having:

# Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Could not connect: Connection refused

---

<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:** [19 January 2022 08:48 UTC](https://discourse.nodered.org/t/open-new-terminal-window-in-nodered/56899/2 "2022-01-19T08:48:45Z")

</div>

Welcome to the forum @namph-sgn

Does the command work if you run it in a terminal not in node red?

If it does not run in a terminal then Google the error message. If it does run in a terminal then how did you install node red?

---

<div class="post-metadata">

**Author:** ![namph-sgn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/namph-sgn/32/54561_2.png) [@namph-sgn](https://discourse.nodered.org/u/namph-sgn)\
**Post date:** [20 January 2022 03:06 UTC](https://discourse.nodered.org/t/open-new-terminal-window-in-nodered/56899/3 "2022-01-20T03:06:36Z")

</div>

Hello @Colin,  
Thanks for asking.  
The command works when I run it in a terminal. It open a new terminal windows and ran the commands without any errors.  
I install NodeRed from the install script found in [Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi).

---

<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 January 2022 09:41 UTC](https://discourse.nodered.org/t/open-new-terminal-window-in-nodered/56899/4 "2022-01-20T09:41:47Z")

</div>

Sorry, I don't know the answer in that case.

---

<div class="post-metadata">

**Author:** ![namph-sgn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/namph-sgn/32/54561_2.png) [@namph-sgn](https://discourse.nodered.org/u/namph-sgn)\
**Post date:** [24 January 2022 03:33 UTC](https://discourse.nodered.org/t/open-new-terminal-window-in-nodered/56899/5 "2022-01-24T03:33:52Z")

</div>

@Colin So after digging a little deeper, I came across this askubuntu thread: [Problem with "gnome-terminal" on Gnome 3.12.2 - Ask Ubuntu](https://askubuntu.com/questions/608330/problem-with-gnome-terminal-on-gnome-3-12-2)

I modified the script to:

> DISPLAY=:0 dbus-launch gnome-terminal --window -- /bin/sh -ec "./run\_commands.sh; exec bash"

Now it runs normally.  
I'm gonna close the thread.

---

<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:** [7 February 2022 03:34 UTC](https://discourse.nodered.org/t/open-new-terminal-window-in-nodered/56899/6 "2022-02-07T03:34:40Z")

</div>

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