Exec Binding open browser

Hello i’m trying to open Firefox on the same machine that runs openhab.
The docu says to check if the user openhab can run the process first.
So i tried with:

sudo -u openhab /opt/firefox/firefox

and i got :

Unable to init server: Verbindung ist gescheitert: Verbindungsaufbau abgelehnt
Error: cannot open display: :1

i’ve added the user openhab to my local users group but it does not solve the problem
How do i give openhab rights to access the local users display?
Any help is appreciated.

Exec binding does not have a shell. You might be able to use a shell script setting a DISPLAY entry for the Xserver.
How to accomplish that is way beyond the topics here and is best discussed on a Linux forum.


thx for the help. it’s working now, took some time to figure it all out =)

1 Like