I have the server up and running with the demo sitemap, but cannot get designer to even show up. I followed the steps perfectly, but nothing happens when I click execute. I deleted all files and reloaded with the same result.
Try running it from the command prompt to see what errors are printed when it tries to start.
I find I have to run it with sudo because when I’m running Designer I’m running it as me but openHAB sets the permissions on the files to openhab:openhab and I don’t have permission to write to them.
openHAB sets permissions actively? I don’t think so!? Executing the Designer with sudo shouldn’t be promoted. Can you add yourself to group openhab or change the group to yours? I actually don’t think openHAB needs write permission on the configuration itself…
It does, or really the script /usr/share/openhab/bin/setpermissions.sh which gets called by the daemon start script does. (NOTE: this is for OH 1.x) I had an issue with is a while back as it was changing the permissions on all openhab related files, including those in ~openhab. I had some execs that sshed to another machine and the setpermissions.sh script was adding group read permissions to ~openhab/.ssh/*. Of course ssh doesn’t like it when your private key is group readable. Here is the original thread:
I’m not sure if this is still done by OH 2. Because I’m running in docker the user/group ids are all messed up for me right now anyway (see my Docker tutorial for details). I don’t see a setpermissions.sh script in the openhab folder on the docker image so either it is no longer done or done some other way. Can’t run an experiment right now to test for sure.
Nope. setpermissions.sh changes ownership to openhab:openhab and applies read only permissions to the group. So neither approaches would work.
I agree, running designer as sudo isn’t really a good solution. I should add that I use sudo to run designer as the openhab user, not root:
This also poses a problem for those who try to put shell scripts to be called by the exec binding in configurations/scripts as setpermissions.sh will strip the execute permissions off those files as well. A more appropriate spot would be ~openhab/scripts which I believe no longer gets touched by that script.
As I wrote my earlier comment it got me to thinking that at a minimum the group should have write permissions too so all we have to do is add the user to the openhab group and everything is fine. But I need to straighten out docker user id problem before I can do the research to see what is happening with OH 2 and whether this is still a problem. I do know that I have to run OH 2’s Designer as root right now, but I think that is more related to my Docker problems.
The permissions that matter and that we are talking about are those in the configurations folders, not Designer’s folders.
However, that doesn’t matter because the errors you are seeing makes me realize that the Designer downloads on the openhab.org site do not support ARM and wont run on the Pi.
This raises a good questions. @kai, @ThomDietrich do either of you know or can point us to someone who does know: is there a build of Designer for ARM?
Now what most people do is put their configs in a samba share and run Designer from a separate machine.
Ok, since my workstation is Ubuntu, I tried a few searches here on how to reach into the RPi from Designer on my workstation, but no success. Did I miss something?
No, there isn’t and never will be. The Designer is a desktop application and as such it isn’t meant to be run on a (usually headless) SBC and it is far to big for it as well.
You could create a Pull Request or Issue here: https://github.com/openhab/openhab-docs
However, of you were not familiar with Github, do not hesitate to write and post an additional paragraph or similar here as an answer and I’ll be sure to include it.