-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
Full containerized OS using containers #4383
Comments
AFAIK, none of these are absolutely essential, though some applications may misbehave without dbus. Well done for figuring out how to get pulseaudio installed instead of pipewire.
The initial resolution when starting a desktop session can be changed, ie:
The resolution is meant to be changed in response to changes to the browser window dimensions, not directly via BTW, you don't need to install these in a container:
|
I do need the audio. The problem is that even with a system dbus lqunched and pulseaudio installed instead of pipewire, audio isnt working at all :( For video, I will look into it, since it is absolutly ignoring my resolution settings and absolutly not doing dynamic scaling. That is why I tried to use xrandr to fix this issue without success |
So you're running as root inside the container? You may also want to set xpra/xpra/server/mixins/audio.py Line 35 in ba3d760
Since the xpra instance won't be interfering with another one since there aren't any.
What sort of scaling are you expecting it to do?
Oh, it just occurred to me that what you mean by "video" is the resolution of the virtual display. |
On a related note, is there an official xpra container available in any registry? |
Not yet, we should make one as this would be trivial. (based on Fedora) |
For the container side, I am running as a non-root user (the multiple warnings in the logs hint clearly in that direction, and I want my image to be as secure as possible). Therefore, I have given the permission to run dbus-daemon --syste command in the sudoers file for the container user. What I do is RUN as root, installed the aforementioned packages (xpra, xpra-html, pulseaudio ...), setup configuration files (i have copied the files found in I first tried to run "vanilla" ( modifications to the `05_features.conf, 20_audio.conf etc.), then started tinkering in the files to try to find my problem. I am now trying to run pulse audio with this config:
And this overwride command: I am now rebuilding the image, adding an XDG_RUNTIME_DIR set to I will try to use more precise wording. I was indeed speaking about the virtual display resolution :) |
As per https://github.com/Xpra-org/xpra/wiki/Reporting-Bugs, this is an essential piece of information, not something to be gleaned later.
Does it work if everything runs as root, including xpra? |
(still_ on it, just a LOT of things going on, I will keep you posted when I can give you a more thorough description 🔸 ) Thank you for everything ! |
Just to keep you updated. I have more stuff to share, not sure if it is the right format/place thought. Hope it will be fine for you here: I manage to make the sound work inside the fedora container. It was in fact my laptop that wasnt able to get the sound for some reason (mac m1 i guess), but other friends (other mac, m1/m2 for different sizes, as well as linux/win computers) confirmed sound was working on their computer so it work I guess. Once I confirmed the sound was working, I set my goals higher. What I did at first was a simple setup that run I now use s6-overlays to start a Just remember : Some elements cannot be set inside the Dockerfile since it will be overwritten at runtime (aka. when the container is started). For exemple, the services defined for s6 are executed AT-RUNTIME. Which means you can defined iptables, /etc/resolve.conf, /etc/hosts, and any other stuff as one-shot services to setup your environment correctly. For exemple, when the container is started, all How does this works:Overall
Inside a service directoryI encourage to read the s6-overlay github but basically, all services container a DBUSA system dbus seems to be necessary for a desktop environment to work properly. I therefore use the (lazy) allow-all.conf below for my system dbus (since it is run inside the container, it is not a security risk for the host system dbus itself):
and run the
where DBUS_SYSTEM_BUS_ADDRESS= Once again, any related XPRA specific setupxpra is run inside the container as an ( I use
Note : XPRA tries to isolate from the host. Which means any ENV variable defined in dockerfile is not passed to xpra by default. What I do in the For reference, here is the small pipe commands that takes all Dockerfile env at runtime, and load it inside this file :
DockerfileFor reference, here is a dockerfile exemple that I use (simplified since I use a LOT more custom scripts and packages for my own needs).
Where The directory structure for
with
|
@Anghille I haven't had time to look into this properly yet as I'm working on making new releases. OTOH:
|
Hi, no worries. You are doing all of this out of goodwill and on your own time. You don't ever need to apologize for the time you take for this project !
I am not sure what to do with this issue now that the main issue I had with the sound problem is fixed in my end. If it is ok with you, I can either close this (and remove this load out of your mind), keep it open and give a more detail overview of the differents files used so You can use it later if you want to integrate it as an exemple, or I could fork your repository and add the exemple my self and we iterate from here before merging ? Feel free to tell me what works best for you :) My goal at the end is to have an image that works out of the box with different flavor (xfce, gnome, kde) with and without GPU support (not there yet). If its something that is of interest in this project, I would gladly share exemples as I get them working reliably |
I meant defining
I think this is very valuable, and should probably be turned into some kind of documentation and / or base container that people can more easily extend to suit their needs. So, feel free to contribute as little or as much as you like, in whichever way is easier for you. |
Whilst we're here. It would be useful to extend or at least document some kind of container GPU acceleration, be it via EGL (similar to https://github.com/selkies-project/docker-nvidia-egl-desktop) or for WSL: https://github.com/Xpra-org/xpra/blob/master/docs/Usage/WSL.md |
i have the chance to run a Kubernetes at home with both AMD and NVIDIA GPUs (small ones - a GT1030 and a RX550), I might be able to test / build and deploy a fully containerized image at some point using GPU acceleration. If this is the case, I will gladly share any finding on this repo for reference. I have already run and modified the selkies-project image, especially to understand how it differ from xpra in some points, so I might be able to use this as a starting point and adapt it for XPRA use case |
Same issue for me in abcdic context (https://github.com/orgs/Xpra-org/discussions/3911), an Alpine X11/SDDM/KDE/Plasma desktop container. Full desktop auto-reszize used to work (context : qt 5.x/Plasma 5.x). Since last update (qt6.x Plasma 6.x)
Until now, I haven't found the right way to have again a full desktop auto-resizing. Context : abcd (Alpine Based Containerized os Derivative) is a kairos full OS container, abcdic (abcd) Inside Container is the the derivative container image run-able inside common container runtime, like sysbox/docker rootless container runtime, as well as podman and maybe Incus/LXD. As an Alpine full OS container, Init is Openrc (not systemd), so service dependencies, like dbus, are driven at init step before SDDM/X11/Xdummy/xpra start. Additional info : In kde systemsettings panel,
It's probably not a good practice to publish here some screenshot images... |
here server log from xpra inside sysbox/docker rootless container
|
Describe the bug
I am currently trying to setup a full-containerized desktop (remote VM if you will) using xpra in the server-side. Audio is not working, and video is (for now at least) a mess (no full screen, stuck at 1280*720 50Hz, cursor not clicking were it is showing)
To Reproduce
wget -O /etc/yum.repos.d/xpra.repo https://raw.githubusercontent.com/Xpra-org/xpra/master/packaging/repos/Fedora/xpra.repo
xpra
andxpra-html5
, firefox, @xfceNow this is where things get weird :
if I run
xpra start-desktop --start-child=xfce4-session --exit-with-children=yes --daemon=no --bind-tcp=0.0.0.0:14500
and checks the logs,pulseaudio
complains it is not finding thesystem-dbus
and is failing to run:I supposed, based on this ticket (#3212) and an other one that is older where it was stated that 'pulseaudio' and all application where using their own "private" dbus to avoid messing with maybe currently running dbus.
Since we are in a container, I supposed that it needed at least the system dbus to be running. I therefore appended this command :
dbus-uuidgen > /var/lib/dbus/machine-id & dbus-daemon --system & && xpra start-desktop --start-child=xfce4-session --exit-with-children=yes --daemon=no --bind-tcp=0.0.0.0:14500
to first run a system dbus on the container.After that,
pulseaudio
stopped complaining about missing system dbus. It was complaining about missingmodule-x11
but a simplednf install pulseaudio-module-x11
fixed the error. Now I am stuck with :Any command, with XDR_RUNTIME_DIR manually set to a bunc of places (/run/xpra, /run/user/&{UID}/xpra, /tmp, /home/user/.xpra) fails with:
Funnly, cloning the xpra repo inside the containers and running the
pactl_impl.py
return sme informations:A lot (if not all) xfce plugins complains with errors of the like
GetManagedObjects() failed: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1
For the video side, the xpra always starts with :
2024-10-11 14:11:52,645 setting dummy crtc and output 0 to:
2024-10-11 14:11:52,645 1280x1024 50Hz (339x271 mm, dpi=96)
2024-10-11 14:11:52,647 monitor 0 is 'VFB-0' 1280x1024
I tried using
dnf install xrandr && xrandr --output DUMMY0 --rate 60 --size 1920*1080
or other variations, but the browser wont acknoledge this. In fact, all I want is the OS to dynamically adapt to the size of the browser window :(System Information (please complete the following information):
Additional context
If you could explain how things works that would help me so much. I understand what dbus is for, what pulseaudio is, what xpra is. But I have a hard time undnerstanding how everything talks to each other nicely :(
I did read A LOT of issues in this repo (Almost every issue, from issue that could be sort-of related to ones that dont even link remotely to my problem) but I am still unsure how things work and why I am running into those problems
The text was updated successfully, but these errors were encountered: