RancherOS and sound module (missing /dev/snd)

Hi,

at the moment I playing with RancherOS as Desktop OS :slight_smile:

Created xorg / fluxbox container and starting terminal, file manager, chromium, … as container works fine, but how to setup pulseaudio, because /dev/snd is missing.

How to load needed modules with RancherOS?

I’m not entirely sure of the difficulties you’re running into but this person has posted a bunch of useful docker files for desktop users. Here’s her pulseaudio setup: https://github.com/jfrazelle/dockerfiles/tree/master/pulseaudio

Good luck,

– Ben Scherrey

To run as a Desktop OS (which I personally do), you need to use a different kernel. The best starting place is typically a ubuntu kernel. In fact I wrote a script that will take the debs and convert them into a tag.gz needed for the RancherOS build. https://github.com/rancher/os/blob/master/scripts/mk-kernel-tar-from-deb.sh

Thanks, @ibuildthecloud. Wie take a look.

@proteusguy
Thanks, I know her builds. Tested some and also built own based on repos dockerfiles :wink:

Is it possible to get hw detection by udev working inside a container? Pulseaudio uses udev to detect the sound card.

Do you have an example dockerfile for pulseaudio support, @ibuildthecloud?

UPDATE
Found that blog post about udev support and have to test it…


We have working sound (alsa, without pulseaudio) and wlan with a custom kernel and additional firmware by build a own iso.

@ibuildthecloud
Any plans to ship RancherOS with a more desktop friendly kernel? Would be great to Upgrade our “RancherOS Desktop” fun build with ros os upgrade instead of custom scripts / ISOs to upgrade / reinstall.

:grinning:

https://github.com/rancher/os-kernel/pull/12/commits/0e505d2f7dac1707057acf9e01c1c6211c34787c

1 Like

@pwFoo can you tell me how ro create xorg/fluxbox container? thank you

Hi @hobertony_7,

we try to separate services / images.

First one is a image with xorg with video drivers and a custom 10-input.conf to get keyboard and mouse working. Maybe you have to do some configuration to get x-server starting dependent on your distribution you use (alpine works fine, debian needs a xwrapper modification, …).

Based on that xorg image we build a fluxbox one with just fluxbox installed and a prepared xinitrc like that
`[…]
xinput enable Mouse0
xinput enable Keyboard0

exec startfluxbox`

“Mouse0” and “Keyboard0” matches the 10-input.conf xorg configuration. WIthout a working configuration you will have no keyboard and mouse. :wink:

A graphical docker container needs

  1. display env variable set “-e DISPLAY=$DISPLAY”
  2. each X Cointainer needs also shared /tmp/.X11-unix (share it as docker volume) to open a new app like chromium, keepassx, … which we all create as separated images / containers.
  3. Access to /dev/tty | /dev. To simplify we start with “–privileged” at the moment

We also install some additional packages like usb-utils (usb devices…), xhost (needed to allow containers like chromium, keepass to use the x-server!), xrandr (dual monitor setup), xterm (basic terminal support inside), …

@pwFoo thank you for your reply, now we also try to separate services into different containers。
I already know the approximate method:
1, create a image with xorg, of course, need some special configuration, and the x windows system run in this container。
2, base the image of xorg ,we craete a image with fluxbox, now in image we had install xorh and fluxbox.

when we run the image we should add “-e DISPLAY=$DISPLAY” "-v /tmp/.X11-unix:/tmp/.X11-unix “–privileged”.
but according to what you say, the xorg and fluxbox run in docker container, but "-v /tmp/.X11-unix:/tmp/.X11-unix "
mount “/tmp/.X11-unix” is on host.
May I have a look at your Dockerfile file?

Instead of -v /tmp/.X11-unix/:/tmp/.X11-unix just use -v /tmp/.X11-unix to create the volume which isn’t mounted at the host. Application containers can use it by --volumes-from <fluxbox container>.
/tmp/.X11-unix permissions have to be 1777 (with sticky bit!).

Would be great to separate also the fluxbox and xorg processes (for example connected by tcp), but I don’t know how to do that.

yea, I also want to know how do you playing rancheros as desktop os, if I can understand that the xorg/fluxbox and chromium in same container?

xorg, dbus, fluxbox, volumeicon, chromium and other apps running in separated containers. Basic Desktop (xorg, dbus, fluxbox, volumeicon is started as a RancherOS service.

Hi @pwFoo,
Your “Basic Desktop” (not so basic from my point of view…) seems amazing. This is exactly what I can’t manage to realise for my project, but I can’t find your’s on docker hub.
Have you already shared it?
If not, is it plained?
If also not, could you please give us (as I’m sure that others should be interested) a hint concerning the elements you mount as data volumes to be able to access the host’s hardware with xorg, dbus and fluxbox containers?
I am trying to build a container that will use the host’s screen to display apps like Xbmc/Kobi, so I could build a NAS that would also be a Media Center when needed ^^

At the moment I build some images which should be pushed soon to docker hub.

Local build works with xorg, fluxbox, dbus and volumeicon (with console alsamixer). A shared passwd / shadow inside a docker volume. Terminator (terminal with ssh, docker), pcmanfm (sftp, smb support) and chromium.

Display manager is replaced with a simple i3lock login :slight_smile:
slock, xlock or xscreensaver also could used instead of i3lock.

I have problems with missing --group-add and --tmpfs support within rancher-compose… So it will need a workaround and can’t run as RancherOS os-service.

Hi,have you push some images to docker hub?thank you

@pwFoo & @ibuildthecloud if you actually have a running Desktop build on containers/ros … I think that would make an interesting showcase for rancherOS & docker in general …

any plans you publish a how-to or something similar on this?

The next version of RancherOS will definitely have better support for desktop systems. As soon as the release comes out and I get a working desktop setup for myself, I’ll add a page about it in the docs!

2 Likes

Great! Can’t wait to get the next RancherOS release!!! :slight_smile:

We build images (dbus, xorg, fluxbox, chromium, …) and try to use unmodified RancherOS as base.