# Exec script to UI app

**URL:** https://discourse.nodered.org/t/exec-script-to-ui-app/14643
**Category:** General
**Created:** [22 August 2019 11:54 UTC](https://discourse.nodered.org/t/exec-script-to-ui-app/14643 "2019-08-22T11:54:12Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [23 August 2019 21:00 UTC](https://discourse.nodered.org/t/exec-script-to-ui-app/14643/2 "2019-08-23T21:00:52Z")

</div>

You are running a script using the GTK toolkit that requires access to a desktop GUI. In fact, you are using the LXDE's desktop terminal app to run a PYTHON programme and you don't need to do that.

Your script should simply be `python3 my_script.py`. And for that, you can simply add that command to a Node-RED `exec` node. The output of the script will be returned as a msg to Node-RED and you can output it or process it as needed.

---

_[View the full topic](https://discourse.nodered.org/t/exec-script-to-ui-app/14643)._
