# Using 'exec' node without sudo

**URL:** https://discourse.nodered.org/t/using-exec-node-without-sudo/42595
**Category:** General
**Created:** [13 March 2021 20:10 UTC](https://discourse.nodered.org/t/using-exec-node-without-sudo/42595 "2021-03-13T20:10:45Z")
**Posts on this page:** 3
**Page:** 2

<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 March 2021 21:57 UTC](https://discourse.nodered.org/t/using-exec-node-without-sudo/42595/21 "2021-03-14T21:57:09Z")

</div>

> [@WhatDoor](#):
>
> DISPLAY:=0

Should be `DISPLAY=:0` as noted earlier. It is standard linux command line syntax for defining an environment variable (DISPLAY) and setting it to :0 and then calling the command that follows, hence `DISPLAY=:0`

---

<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 March 2021 22:11 UTC](https://discourse.nodered.org/t/using-exec-node-without-sudo/42595/22 "2021-03-14T22:11:28Z")

</div>

On further investigation it appears you can't use the display setting in spawn mode. Try making a shell script that runs your playerctl command (without the display setting). Then try calling that from the exec node, with and without the display setting in the two exec mode settings. If one of those doesn't work then I am out of ideas.  
I can't actually test it here as I haven't got a system I can try it on.

---

<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: [13 May 2021 22:12 UTC](https://discourse.nodered.org/t/using-exec-node-without-sudo/42595/23 "2021-05-13T22:12:19Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/using-exec-node-without-sudo/42595.md?page=1)
