Skip to content

Commit ac991ac

Browse files
committed
add wayland init
1 parent 1af2895 commit ac991ac

3 files changed

Lines changed: 75 additions & 0 deletions

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ This container is based on [Docker Baseimage Selkies](https://github.com/linuxse
8888

8989
| Variable | Description |
9090
| :----: | --- |
91+
| PIXELFLUX_WAYLAND | **Experimental** If set to true the container will initialize in Wayland mode running [Smithay](https://github.com/Smithay/smithay) and Labwc while enabling zero copy encoding with a GPU |
9192
| CUSTOM_PORT | Internal port the container listens on for http if it needs to be swapped from the default `3000` |
9293
| CUSTOM_HTTPS_PORT | Internal port the container listens on for https if it needs to be swapped from the default `3001` |
9394
| CUSTOM_WS_PORT | Internal port the container listens on for websockets if it needs to be swapped from the default 8082 |
@@ -142,6 +143,30 @@ To launch the desktop session in a different language, set the `LC_ALL` environm
142143
* `-e LC_ALL=nl_NL.UTF-8` - Netherlands
143144
* `-e LC_ALL=it_IT.UTF-8` - Italian
144145

146+
### SealSkin Compatibility
147+
148+
This container is compatible with [SealSkin](https://github.com/linuxserver/docker-sealskin).
149+
150+
SealSkin is a self-hosted, client-server platform that provides secure authentication and collaboration features while using a browser extension to intercept user actions such as clicking a link or downloading a file and redirect them to a secure, isolated application environment running on a remote server.
151+
152+
* **SealSkin Server:** [Get it Here](https://github.com/linuxserver/docker-sealskin)
153+
* **Browser Extension:** [Install Here](https://chromewebstore.google.com/detail/sealskin-isolation/lclgfmnljgacfdpmmmjmfpdelndbbfhk)
154+
155+
### All GPU Acceleration - use sane resolutions
156+
157+
When using 3d acceleration via Nvidia DRM or DRI3 it is important to clamp the virtual display to a reasonable max resolution. This can be achieved with the environment setting:
158+
159+
* `-e MAX_RESOLUTION=3840x2160`
160+
161+
This will set the total virtual framebuffer to 4K, you can also set a manual resolution to achieve this.
162+
By default the virtual monitor in the session is 16K to support large monitors and dual display configurations. Leaving it this large has no impact on CPU based performance but costs GPU memory usage and memory bandwidth when leveraging one for acceleration. If you have performance issues in an accelerated session, try clamping the resolution to 1080p and work up from there:
163+
164+
```
165+
-e SELKIES_MANUAL_WIDTH=1920
166+
-e SELKIES_MANUAL_HEIGHT=1080
167+
-e MAX_RESOLUTION=1920x1080
168+
```
169+
145170
### DRI3 GPU Acceleration
146171

147172
For accelerated apps or games, render devices can be mounted into the container and leveraged by applications using:
@@ -566,6 +591,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
566591

567592
## Versions
568593

594+
* **28.12.25:** - Add Wayland init logic.
569595
* **19.06.25:** - Rebase to Selkies baseimage.
570596
* **24.01.25:** - Fix SVG icons not rendering.
571597
* **18.07.24:** - Initial release.

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ init_diagram: |
107107
"kali-linux:latest" <- Base Images
108108
# changelog
109109
changelogs:
110+
- {date: "28.12.25:", desc: "Add Wayland init logic."}
110111
- {date: "19.06.25:", desc: "Rebase to Selkies baseimage."}
111112
- {date: "24.01.25:", desc: "Fix SVG icons not rendering."}
112113
- {date: "18.07.24:", desc: "Initial release."}

root/defaults/startwm_wayland.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
3+
# Disable compositing and screen locking
4+
if [ ! -f $HOME/.config/kwinrc ]; then
5+
kwriteconfig6 --file $HOME/.config/kwinrc --group Compositing --key Enabled false
6+
fi
7+
if [ ! -f $HOME/.config/kscreenlockerrc ]; then
8+
kwriteconfig6 --file $HOME/.config/kscreenlockerrc --group Daemon --key Autolock false
9+
fi
10+
11+
# Power related
12+
setterm blank 0
13+
setterm powerdown 0
14+
15+
# Directories
16+
sudo rm -f /usr/share/dbus-1/system-services/org.freedesktop.UDisks2.service
17+
mkdir -p "${HOME}/.config/autostart" "${HOME}/.XDG" "${HOME}/.local/share/"
18+
chmod 700 "${HOME}/.XDG"
19+
touch "${HOME}/.local/share/user-places.xbel"
20+
21+
# Background perm loop
22+
if [ ! -d $HOME/.config/kde.org ]; then
23+
(
24+
loop_end_time=$((SECONDS + 30))
25+
while [ $SECONDS -lt $loop_end_time ]; do
26+
find "$HOME/.cache" "$HOME/.config" "$HOME/.local" -type f -perm 000 -exec chmod 644 {} + 2>/dev/null
27+
sleep .1
28+
done
29+
) &
30+
fi
31+
32+
# Create startup script if it does not exist (keep in sync with openbox)
33+
STARTUP_FILE="${HOME}/.config/autostart/autostart.desktop"
34+
if [ ! -f "${STARTUP_FILE}" ]; then
35+
echo "[Desktop Entry]" > $STARTUP_FILE
36+
echo "Exec=bash /config/.config/openbox/autostart" >> $STARTUP_FILE
37+
echo "Icon=dialog-scripts" >> $STARTUP_FILE
38+
echo "Name=autostart" >> $STARTUP_FILE
39+
echo "Path=" >> $STARTUP_FILE
40+
echo "Type=Application" >> $STARTUP_FILE
41+
echo "X-KDE-AutostartScript=true" >> $STARTUP_FILE
42+
chmod +x $STARTUP_FILE
43+
fi
44+
45+
# Start DE
46+
WAYLAND_DISPLAY=wayland-1 Xwayland :1 &
47+
sleep 2
48+
exec dbus-launch --exit-with-session /usr/bin/startplasma-x11 > /dev/null 2>&1

0 commit comments

Comments
 (0)