Install desktop environment on top of openHABian

Hi,

to be able to use the deCONZ application to see the graphical representation of my Zigbee Network I’d like to install a graphical user interface on my Raspberry Pi 4 with openHABian setup. I will use VNC to connect to that GUI, there is no monitor etc. connected to the Pi.

What is the recommended way to do that, if there is any? Can this be used? https://www.raspberrypi.org/forums/viewtopic.php?t=133691

There seems to be no raspi-config left on openHABian even though it’s still autocompleted when in a console :slight_smile:

If it tries to access the coordinator separate from openHAB there will be conflicts. OpenHAB expects exclusive access to the device.

Hm, what does that mean exactly? What’s the coordinator? And what device exactly?

Does that mean I should rather use a second Pi for deCONZ? That’s what I am doing currently just for testing, but it would seem somewhat overkill.

The Zigbee coordinator is the device ( USB stick? thjat coordinated te Zigbee mesh. openHAB communicates with the Zigbee network through the coordinator.

If the deCONZ application tries to use the dame device to graph the network, it will cause issues with openHAB, if it succeeds.

Is that really how it works? Does openHAB actually use the device (yea, it’s a USB dongle, Conbee II), or is it just deCONZ itself that uses it, and the deCONZ openHAB binding communicates with deCONZ? I mean, why/how would openHAB use the device directly if it was connected locally, and not use it when it is on a different server (like I have it set up now)?

In the deCONZ binding/thing I have to configure an IP address and a port, so I would assume that openHAB communicates that way, and not with the USB device.

1 Like

So if openHAB doesn’t use the USB device… is it ok to install a desktop environment, and if so, is there something I have to keep in mind?

I would advise another option.

I run Ubuntu on an old laptop. One of its uses is to connect to deconz.

OpenHAB does not connect directly to the usb. But you do need to shutdown the deconz service and restart the desktop service to connect if I remember correctly.

I would not recommend installing the desktop on openhabian. You risk making it run slow for one and two you risk other issues like conflict.

I don’t have an old laptop. And I think a separate Pi für deCONZ is still a little better than using an old laptop (if I understood correctly). :slight_smile:

So I guess I’ll stick to two RPis for now. Just wanted to cut the power consumption as much as possible. The Pi3B+ will probably cost me like 5 € per year on power :slight_smile:

OK, I assumed the OH Zigbee binding was used here. I guess if zigbee2mqtt is used, then things may operate differently.

Openhab communicates via the deCONZ REST API with the Conbee II stick.

1 Like

The recommendation clearly is to run any openHAB(ian) server headless, i.e. NOT to install any desktop/GUI.
I don’t know the app you refer to but If I wanted to run a Linux GUI program by all means I’d install an X11 server on my Windoze desktop as that’ll consume the least amount of resources on the openHABian server.

You only need the GUI if you want to do
Speciality configuration. Openhab does not require the GUI. I look at the GUI maybe once per year, and only when adding new devices. The new devices are ones that need special option configured. Standard devices don’t require the GUI to be added.

Yea, trying that now. Somehow when connecting via Putty to my openHABian Pi I get “X11 Forwarding refused”, on my Pi with Raspbian it works just fine.

I looked into /etc/ssh/sshd_config and X11Forwarding is set to yes. Is there anything in openHABian that would prevent X11Forwarding? There is no userspecific ssh config file that would prevent it.

You need to properly allow for X11Forwarding on the client, PuTTy or whatever you use. And the pageant (agent) if you use it.

I have, that’s why I said X11Forwarding works fine with Putty to the Pi that is running Raspbian. I am able to for example start gedit, which pops up on my Windows machine.

Using the same settings and connecting to my openHABian machine, I get “X11Forwarding refused” in the Putty log. That’s why I looked into the ssh config file in the openHABian machine, but that seems to be correct:

#GatewayPorts no
X11Forwarding yes
X11DisplayOffset 10 (tried it both with and without)
X11UseLocalhost yes (tried it both with and without)
#PermitTTY yes

So there must be something else on the openHABian machine that prevents X11Forwarding from working.

I got it to work now. Used this post here: https://ubuntuforums.org/showthread.php?t=2425628&p=13883458#post13883458

1. Created Xauthority file using below commands (second command does not work)
touch ~/.Xauthority
xauth generate :0 . trusted
xauth add ${HOST}:0 . $(xxd -l 16 -p /dev/urandom)
xauth list

2. Set this attribute in SSHD config and restart SSHD
X11UseLocalhost no

3. After this, when I login to the server, I can see DISPLAY env set properly and I am able to open remote Xapps 

Can now open the deCONZ app on my Windows machine :slight_smile:

1 Like