Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation about how to set audio up with kasm #7

Open
ghost opened this issue Jun 26, 2024 · 12 comments
Open

Documentation about how to set audio up with kasm #7

ghost opened this issue Jun 26, 2024 · 12 comments

Comments

@ghost
Copy link

ghost commented Jun 26, 2024

Hi! I am looking for documentation about how to set audio up with kasm.

any chance you will provide some documentation ? That will help may people trying similar things.

also see
selkies-project/docker-nvidia-egl-desktop#32

@ne0YT
Copy link

ne0YT commented Jul 16, 2024

@thelamer hey :) please add an example configuration / setup for us so we can use it in our projects.
I want to use kasmVNC with audio and on a subfolder to make it possible to have multiple instances on a single subdomain.

@thelamer
Copy link
Member

The baseimage has audio the user just needs to click the speaker icon in the top bar to turn it on. As far as a subfolder that is also baked into the baseimage with the env var SUBFOLDER, IE:

docker run --rm -it \
  -p 3001:3001 
  --shm-size=1gb 
  -e SUBFOLDER=/test/ 
  linuxserver/webtop:debian-kde bash

Then land on https://yourIP:3001/test/

Please read through available options here:

https://github.com/linuxserver/docker-baseimage-kasmvnc

@ne0YT
Copy link

ne0YT commented Jul 16, 2024

@thelamer as I'm using KASM installed directly, how would I integrate audio ?
and genrally.. is there any way I can launch multiple instances on the same port but different path? or a way to deploy th esame app but with multiple different concurrent users?

@thelamer
Copy link
Member

The LSIO base images would be the easiest way, just build the same way we do using the baseimage and you will have KasmVNC compatibility, our init is here https://github.com/linuxserver/docker-baseimage-kasmvnc/blob/master/root/kasminit we bake in all their microservices and start them the same way they do.

If you want something more in line and compatible with all features (IE stuff like session recording is not included in our image for privacy reasons) you can base off their core images as well:
https://github.com/kasmtech/workspaces-core-images

Then you just FROM them and compatibility is baked in IE for a webtop: (the debian kde I referenced earlier)
https://github.com/linuxserver/docker-webtop/tree/debian-kde

Or in full native Kasm:
https://github.com/kasmtech/workspaces-images/blob/develop/dockerfile-kasm-debian-bookworm-desktop

You can build your own bases, but the advantage to using lsiobase/kasmvnc as your base is that you don't have to worry about any of it, it will just work.

@thelamer
Copy link
Member

Also make note of the settings we use to override init in our registry so it is all automatic for the user. https://kasmregistry.linuxserver.io/1.0/new/bHNjci5pby9saW51eHNlcnZlci93ZWJ0b3A6YWxwaW5lLWkz/

@gymnae
Copy link

gymnae commented Jul 20, 2024

Hi there, thanks for the notes. So Docker is part of of it in anyway? Would 100% native install without containers be possible on the host serving a kasmvnc enabled desktop?

@ne0YT
Copy link

ne0YT commented Jul 23, 2024

Hi there, thanks for the notes. So Docker is part of of it in anyway? Would 100% native install without containers be possible on the host serving a kasmvnc enabled desktop?
generally kasmvnc is it's own project wokring on non-docker setups:
https://github.com/kasmtech/KasmVNC
but it doesnt inlcude the audio-part..

and yeah I also would liek ot run it on my native kasm setup as I have other kinds of automation setup to run it for many users so the coolest thing would be if soemone can tell me how to make those two thigns happen without usign a docker setup (the dockers I tried are all pretty laggy smh while my nativ esetup with about 100 connecitons is perfectly smooth)

so I't love to have:
instead of accessing kasmhost.tld:port kamhost.tld:443/"theport"
while having audio

@yitzhakbg
Copy link

Hi there, thanks for the notes. So Docker is part of of it in anyway? Would 100% native install without containers be possible on the host serving a kasmvnc enabled desktop?
generally kasmvnc is it's own project wokring on non-docker setups:
https://github.com/kasmtech/KasmVNC
but it doesnt inlcude the audio-part..

and yeah I also would liek ot run it on my native kasm setup as I have other kinds of automation setup to run it for many users so the coolest thing would be if soemone can tell me how to make those two thigns happen without usign a docker setup (the dockers I tried are all pretty laggy smh while my nativ esetup with about 100 connecitons is perfectly smooth)

so I't love to have: instead of accessing kasmhost.tld:port kamhost.tld:443/"theport" while having audio

Would love to be informed about progress on this. Did you get it working?

@thelamer
Copy link
Member

You need to look at all the init that occurs in the docker container and run it:
https://github.com/linuxserver/docker-baseimage-kasmvnc/tree/master/root/etc/s6-overlay/s6-rc.d (all the run scripts in here)

Basically run KasmVNC how we run it https://github.com/linuxserver/docker-baseimage-kasmvnc/blob/master/root/etc/s6-overlay/s6-rc.d/svc-kasmvnc/run
Given you have pulseaudio running can skip this most likely:
https://github.com/linuxserver/docker-baseimage-kasmvnc/blob/master/root/etc/s6-overlay/s6-rc.d/svc-pulseaudio/run
And then you run Kclient on top of it:
https://github.com/linuxserver/docker-baseimage-kasmvnc/blob/master/root/etc/s6-overlay/s6-rc.d/svc-kclient/run
Inside the container we run it behind NGINX to handle auth and such here is the config:
https://github.com/linuxserver/docker-baseimage-kasmvnc/blob/master/root/defaults/default.conf

So in summary you need kasmvnc, pulseaudio, kclient, and NGINX running how we do it in the container.

I do need to point out that there is no inherent advantage to running KasmVNC or any of these things natively maybe outside of seccomp calls being supported, the system still uses a virtual frame buffer with XVFB to render the desktop and you are still limited on hardware access etc in the same way as the display is not real.
What I would do for remote access would be use the docker container and mount a bind volume in with any files you want access to.

@yitzhakbg
Copy link

yitzhakbg commented Aug 29, 2024 via email

@ne0YT
Copy link

ne0YT commented Oct 11, 2024

You need to look at all the init that occurs in the docker container and run it: https://github.com/linuxserver/docker-baseimage-kasmvnc/tree/master/root/etc/s6-overlay/s6-rc.d (all the run scripts in here)

Basically run KasmVNC how we run it https://github.com/linuxserver/docker-baseimage-kasmvnc/blob/master/root/etc/s6-overlay/s6-rc.d/svc-kasmvnc/run Given you have pulseaudio running can skip this most likely: https://github.com/linuxserver/docker-baseimage-kasmvnc/blob/master/root/etc/s6-overlay/s6-rc.d/svc-pulseaudio/run And then you run Kclient on top of it: https://github.com/linuxserver/docker-baseimage-kasmvnc/blob/master/root/etc/s6-overlay/s6-rc.d/svc-kclient/run Inside the container we run it behind NGINX to handle auth and such here is the config: https://github.com/linuxserver/docker-baseimage-kasmvnc/blob/master/root/defaults/default.conf

So in summary you need kasmvnc, pulseaudio, kclient, and NGINX running how we do it in the container.

I do need to point out that there is no inherent advantage to running KasmVNC or any of these things natively maybe outside of seccomp calls being supported, the system still uses a virtual frame buffer with XVFB to render the desktop and you are still limited on hardware access etc in the same way as the display is not real. What I would do for remote access would be use the docker container and mount a bind volume in with any files you want access to.

hey there
is it possible to run multiple of those on the same host while having working audio?
is there an easy way to do so when I need to start let's say 100 sessions?

@ne0YT
Copy link

ne0YT commented Oct 12, 2024

@thelamer
is there a reason performance is so extremely bad in comparison to running kasm directly?
even moving around a simple chromium-window is laggy, while I have no lags playing video when using kasm on the same host directly..

I tried this:

docker container run -p 3001:3001 --shm-size=1gb --security-opt seccomp=unconfined linuxserver/webtop:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants