alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.52k stars 215 forks source link

[Request] Apache Guacamole (Clientless remote desktop) #276

Closed KairuByte closed 2 years ago

KairuByte commented 2 years ago

Not sure if you're currently taking on new addons, but I'm wondering if you'd be willing to give Apache Guacamole a shot?

It previously had an addon, but that addon was archived/abandoned a while ago, and I can't seem to find any working/updated forks.

Official docker image is here: https://hub.docker.com/r/guacamole/guacamole though that version seems to require three docker images total. None of the single docker image versions seem to be maintained.

Let me know if I can provide any more info!

alexbelgium commented 2 years ago

Hi, actually I've already a guacamole based addon : webtop by linuxserver. Due to how HA works, you can't share your screen but at best use guacamole to access the container os, which is what this addon does. Is that what you wanted?

I think you might do whatever you want with this one

KairuByte commented 2 years ago

I was actually hoping for a way to use the addon to connect to internal devices like other servers or machines through the guacamole server. I could be incorrect, but I don't think webtop can handle secondary machines?

alexbelgium commented 2 years ago

Ah, this wouldn't work... Docker prevents accessing secondary systems as I understand, you can just use guacamole within its own container. At least that's my understanding. Or else, you use my webtop addon to create a virtual environment from which you access your secondary environment using another system (for example, installing a local vnc on KDE)... But this is theoretical I've no idea how to do that concretely ;-)

KairuByte commented 2 years ago

There is an existing addon that partially works if you wanted to take a look, it's outdated and seems to have a few bugs, but even on modern HA it does boot up and connect to external machines. The main issue is that it's been abandoned, assumably because ingress had issues that could not be worked through.

Located here: https://github.com/bleakvin/hass-guacamole

alexbelgium commented 2 years ago

Mmh if this one works, then perhaps webtop... except that you would just use the guacamole part and not the underlying xorg desktop

When I look at the addon you mention, there is no special permissions at all, it's all pretty default! Webtop addon actually has much broader permissions

alexbelgium commented 2 years ago

if webtop doesn't work, I see an existing nice docker image here that perhaps could be transformed in addon : https://docs.linuxserver.io/images/docker-guacd - but I usually try as much as posisble to avoid duplication ;-)

KairuByte commented 2 years ago

I might be missing something, but I can't seem to find a way to get the current webtop addon to connect to anything other than the xorg desktop.

As for that docker image, I'm not sure it would be enough? I think the traditional setup is to run guacd in addition to the web client. I've seen a couple images that purport to combine them both, along with a sql server, but I'm not familiar enough with docker to properly speak on how.

alexbelgium commented 2 years ago

indeed, I've tried to create a guacd addon (which was easy) but it can't connect without the web client... I'll investigate when I will have more time

alexbelgium commented 2 years ago

Are you on x86? There seems to be a usable docker image : https://hub.docker.com/r/gamescrack/guacamole that I could convert in an addon

Edit : I've built a first version here "https://github.com/alexbelgium/hassio-addons-test" but still need to test it. Amd64 only

Edit2 : amd64 and aarch64

alexbelgium commented 2 years ago

Not working yet for the moment, I need to solve an s6 issue of changing the log location as /dev/log is read only

KairuByte commented 2 years ago

I appreciate the work! I'll keep an eye here for if/when I should give testing a shot. Thank you!

alexbelgium commented 2 years ago

Would this suit your usage : https://github.com/linuxserver/docker-remmina ? It would be much easier to create an addon with this

KairuByte commented 2 years ago

It may, I'm actually not sure. The thing that drew me towards Guacamole is that everything is handled over HTTPS so client PC's wont throw a fit, and packet shaping wont eat the connections. I can't seem to find any info on how remmina works, and if it would work in a similar way.

alexbelgium commented 2 years ago

OK, then let's wait for the guacamole docker container dev abesnier to respond... He has very kindly created a dev environment to see if he can help with making his container work in our environment here : https://github.com/abesnier/docker-guacamole/issues/5#issuecomment-1096370572

He has the most maintained and up to date fork of the guacd + guacamole docker image

alexbelgium commented 2 years ago

New version pushed in my dev repo. At least it installs and boots, still need to do some more tests

alexbelgium commented 2 years ago

Hi, the addon is up and running, and should be working!

alexbelgium commented 2 years ago

Hi, I'll close the request but feel free to let me know if you encounter any issue

KairuByte commented 2 years ago

I finally got a chance to give the new version a shot, but I can't seem to get the UI to open up. I'm trying to connect at http://[homeassistantip]:[configuredport]/ and http://[homeassistantip]:[configuredport]/guacamole/ but both result in refused connections. Any thoughts?

alexbelgium commented 2 years ago

Thanks, it's a stupid bug I had implemented ingress then removed it due to incompatibilities and forgot to reset the relevant elements. I'll remove them and push a new version

alexbelgium commented 2 years ago

New version pushed and tested working

KairuByte commented 2 years ago

Yup, seems to be working!

alexbelgium commented 2 years ago

Great thanks! I'll close it for the moment if it works