-
Notifications
You must be signed in to change notification settings - Fork 379
Container applications running in Browser with HTML5
Martin Viereck edited this page Jul 14, 2022
·
11 revisions
To provide containerized applications as HTML5 web applications, you need xpra
and the xpra HTML5 client. Example:
#! /bin/bash
read Xenv < <(x11docker --xvfb --printenv x11docker/lxde pcmanfm)
echo $Xenv && export $Xenv
# replace "start" with "start-desktop" to forward a desktop environment
xpra start $DISPLAY --use-display \
--html=on --bind-tcp=localhost:14501 \
--start-via-proxy=no
Now you can access your application at http://localhost:14501. Option settings are possible at http://localhost:14501/connect.html. See also the xpra documentation.
Broadway is a GTK3 feature to allow HTML5 web applications. Note that it works for GTK3 applications only. The image needs libgtk-3-bin
(debian) or gtk3
(Arch Linux) to be installed. A possible setup with x11docker:
x11docker --tty \
--env BROADWAY_DISPLAY=:5 \
--env GDK_BACKEND=broadway \
-- \
--publish=8085:8085 \
-- \
x11docker/xfce bash -c "broadwayd :5 & xfce4-terminal"
Now you can access the containerized web application at http://localhost:8085.
- A sample setup without x11docker is moondev/gtk3-docker.
- Note that Broadway support in GTK4 might be dropped in future.