Skip to content

Commit b8f8839

Browse files
committed
fixes #36, authoratative server
1 parent 259156f commit b8f8839

6 files changed

Lines changed: 213 additions & 14 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN \
1616
https://github.com/selkies-project/selkies.git \
1717
/src && \
1818
cd /src && \
19-
git checkout -f 5e8079aaea2d2c4da2a0ffc477dfd0f2622cb2a7
19+
git checkout -f 415b376dac066ff27b3e5b22a6c32638bda059da
2020

2121
RUN \
2222
echo "**** build frontend ****" && \
@@ -184,7 +184,7 @@ RUN \
184184
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
185185
curl -o \
186186
/tmp/selkies.tar.gz -L \
187-
"https://github.com/selkies-project/selkies/archive/5e8079aaea2d2c4da2a0ffc477dfd0f2622cb2a7.tar.gz" && \
187+
"https://github.com/selkies-project/selkies/archive/415b376dac066ff27b3e5b22a6c32638bda059da.tar.gz" && \
188188
cd /tmp && \
189189
tar xf selkies.tar.gz && \
190190
cd selkies-* && \

Dockerfile.aarch64

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN \
1616
https://github.com/selkies-project/selkies.git \
1717
/src && \
1818
cd /src && \
19-
git checkout -f 5e8079aaea2d2c4da2a0ffc477dfd0f2622cb2a7
19+
git checkout -f 415b376dac066ff27b3e5b22a6c32638bda059da
2020

2121
RUN \
2222
echo "**** build frontend ****" && \
@@ -182,7 +182,7 @@ RUN \
182182
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
183183
curl -o \
184184
/tmp/selkies.tar.gz -L \
185-
"https://github.com/selkies-project/selkies/archive/5e8079aaea2d2c4da2a0ffc477dfd0f2622cb2a7.tar.gz" && \
185+
"https://github.com/selkies-project/selkies/archive/415b376dac066ff27b3e5b22a6c32638bda059da.tar.gz" && \
186186
cd /tmp && \
187187
tar xf selkies.tar.gz && \
188188
cd selkies-* && \

README.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,110 @@ All application settings are passed via environment variables:
5252
* 5 - Centered
5353
* 6 - Animated
5454

55+
## Selkies application settings
56+
57+
Using environment variables every facet of the application can be configured.
58+
59+
### Setting Types and UI Customization
60+
61+
Certain setting types have special syntax for advanced control over the client-side UI and available options. A key concept is that **any setting that is locked to a single value will not be rendered in the UI**, giving the user no option to change it. This, combined with the various `ui_` visibility settings, allows administrators to completely customize the client interface.
62+
63+
#### Booleans and Locking
64+
Boolean settings accept `true` or `false`. You can also prevent the user from changing a boolean setting in the UI by appending `|locked`. The UI toggle for this setting will be hidden.
65+
66+
* **Example**: To force CPU encoding on and prevent the user from disabling it:
67+
```bash
68+
-e SELKIES_USE_CPU="true|locked"
69+
```
70+
71+
#### Enums and Lists
72+
These settings accept a comma-separated list of values. Their behavior depends on the number of items provided:
73+
74+
* **Multiple Values**: The first item in the list becomes the default selection, and all items in the list become the available options in the UI dropdown.
75+
* **Single Value**: The provided value becomes the default, and the UI dropdown is hidden because the choice is locked.
76+
77+
* **Example**: Force the encoder to be `jpeg` with no other options available to the user:
78+
```bash
79+
-e SELKIES_ENCODER="jpeg"
80+
```
81+
82+
#### Ranges
83+
Range settings define a minimum and maximum for a value (e.g., framerate).
84+
85+
* **To set a range**: Use a hyphen-separated `min-max` format. The UI will show a slider.
86+
* **To set a fixed value**: Provide a single number. This will lock the value and hide the UI slider.
87+
88+
* **Example**: Lock the framerate to exactly 60 FPS.
89+
```bash
90+
-e SELKIES_FRAMERATE="60"
91+
```
92+
93+
#### Manual Resolution Mode
94+
The server can be forced to use a single, fixed resolution for all connecting clients. This mode is automatically activated if `SELKIES_MANUAL_WIDTH`, `SELKIES_MANUAL_HEIGHT`, or `SELKIES_IS_MANUAL_RESOLUTION_MODE` is set.
95+
96+
* If `SELKIES_MANUAL_WIDTH` and/or `SELKIES_MANUAL_HEIGHT` are set, the resolution is locked to those values.
97+
* If `SELKIES_IS_MANUAL_RESOLUTION_MODE` is set to `true` without specifying width or height, the resolution defaults to **1024x768**.
98+
* When this mode is active, the client UI for changing resolution is disabled.
99+
100+
| Environment Variable | Default Value | Description |
101+
| --- | --- | --- |
102+
| `SELKIES_UI_TITLE` | `'Selkies'` | Title in top left corner of sidebar. |
103+
| `SELKIES_UI_SHOW_LOGO` | `True` | Show the Selkies logo in the sidebar. |
104+
| `SELKIES_UI_SHOW_SIDEBAR` | `True` | Show the main sidebar UI. |
105+
| `SELKIES_UI_SHOW_CORE_BUTTONS` | `True` | Show the core components buttons display, audio, microphone, and gamepad. |
106+
| `SELKIES_UI_SIDEBAR_SHOW_VIDEO_SETTINGS` | `True` | Show the video settings section in the sidebar. |
107+
| `SELKIES_UI_SIDEBAR_SHOW_SCREEN_SETTINGS` | `True` | Show the screen settings section in the sidebar. |
108+
| `SELKIES_UI_SIDEBAR_SHOW_AUDIO_SETTINGS` | `True` | Show the audio settings section in the sidebar. |
109+
| `SELKIES_UI_SIDEBAR_SHOW_STATS` | `True` | Show the stats section in the sidebar. |
110+
| `SELKIES_UI_SIDEBAR_SHOW_CLIPBOARD` | `True` | Show the clipboard section in the sidebar. |
111+
| `SELKIES_UI_SIDEBAR_SHOW_FILES` | `True` | Show the file transfer section in the sidebar. |
112+
| `SELKIES_UI_SIDEBAR_SHOW_APPS` | `True` | Show the applications section in the sidebar. |
113+
| `SELKIES_UI_SIDEBAR_SHOW_SHARING` | `True` | Show the sharing section in the sidebar. |
114+
| `SELKIES_UI_SIDEBAR_SHOW_GAMEPADS` | `True` | Show the gamepads section in the sidebar. |
115+
| `SELKIES_UI_SIDEBAR_SHOW_FULLSCREEN` | `True` | Show the fullscreen button in the sidebar. |
116+
| `SELKIES_UI_SIDEBAR_SHOW_GAMING_MODE` | `True` | Show the gaming mode button in the sidebar. |
117+
| `SELKIES_UI_SIDEBAR_SHOW_TRACKPAD` | `True` | Show the virtual trackpad button in the sidebar. |
118+
| `SELKIES_UI_SIDEBAR_SHOW_KEYBOARD_BUTTON` | `True` | Show the on-screen keyboard button in the display area. |
119+
| `SELKIES_UI_SIDEBAR_SHOW_SOFT_BUTTONS` | `True` | Show the soft buttons section in the sidebar. |
120+
| `SELKIES_AUDIO_ENABLED` | `True` | Enable server-to-client audio streaming. |
121+
| `SELKIES_MICROPHONE_ENABLED` | `True` | Enable client-to-server microphone forwarding. |
122+
| `SELKIES_GAMEPAD_ENABLED` | `True` | Enable gamepad support. |
123+
| `SELKIES_CLIPBOARD_ENABLED` | `True` | Enable clipboard synchronization. |
124+
| `SELKIES_COMMAND_ENABLED` | `True` | Enable parsing of command websocket messages. |
125+
| `SELKIES_FILE_TRANSFERS` | `'upload,download'` | Allowed file transfer directions (comma-separated: "upload,download"). Set to "" or "none" to disable. |
126+
| `SELKIES_ENCODER` | `'x264enc,x264enc-striped,jpeg'` | The default video encoders. |
127+
| `SELKIES_FRAMERATE` | `'8-120'` | Allowed framerate range or a fixed value. |
128+
| `SELKIES_H264_CRF` | `'5-50'` | Allowed H.264 CRF range or a fixed value. |
129+
| `SELKIES_JPEG_QUALITY` | `'1-100'` | Allowed JPEG quality range or a fixed value. |
130+
| `SELKIES_H264_FULLCOLOR` | `False` | Enable H.264 full color range for pixelflux encoders. |
131+
| `SELKIES_H264_STREAMING_MODE` | `False` | Enable H.264 streaming mode for pixelflux encoders. |
132+
| `SELKIES_USE_CPU` | `False` | Force CPU-based encoding for pixelflux. |
133+
| `SELKIES_USE_PAINT_OVER_QUALITY` | `True` | Enable high-quality paint-over for static scenes. |
134+
| `SELKIES_PAINT_OVER_JPEG_QUALITY` | `'1-100'` | Allowed JPEG paint-over quality range or a fixed value. |
135+
| `SELKIES_H264_PAINTOVER_CRF` | `'5-50'` | Allowed H.264 paint-over CRF range or a fixed value. |
136+
| `SELKIES_H264_PAINTOVER_BURST_FRAMES` | `'1-30'` | Allowed H.264 paint-over burst frames range or a fixed value. |
137+
| `SELKIES_SECOND_SCREEN` | `True` | Enable support for a second monitor/display. |
138+
| `SELKIES_AUDIO_BITRATE` | `'320000'` | The default audio bitrate. |
139+
| `SELKIES_IS_MANUAL_RESOLUTION_MODE` | `False` | Lock the resolution to the manual width/height values. |
140+
| `SELKIES_MANUAL_WIDTH` | `0` | Lock width to a fixed value. Setting this forces manual resolution mode. |
141+
| `SELKIES_MANUAL_HEIGHT` | `0` | Lock height to a fixed value. Setting this forces manual resolution mode. |
142+
| `SELKIES_SCALING_DPI` | `'96'` | The default DPI for UI scaling. |
143+
| `SELKIES_ENABLE_BINARY_CLIPBOARD` | `False` | Allow binary data on the clipboard. |
144+
| `SELKIES_USE_BROWSER_CURSORS` | `False` | Use browser CSS cursors instead of rendering to canvas. |
145+
| `SELKIES_USE_CSS_SCALING` | `False` | HiDPI when false, if true a lower resolution is sent from the client and the canvas is stretched. |
146+
| `SELKIES_PORT` (or `CUSTOM_WS_PORT`) | `8082` | Port for the data websocket server. |
147+
| `SELKIES_DRI_NODE` (or `DRI_NODE`) | `''` | Path to the DRI render node for VA-API. |
148+
| `SELKIES_AUDIO_DEVICE_NAME` | `'output.monitor'` | Audio device name for pcmflux capture. |
149+
| `SELKIES_WATERMARK_PATH` (or `WATERMARK_PNG`) | `''` | Absolute path to the watermark PNG file. |
150+
| `SELKIES_WATERMARK_LOCATION` (or `WATERMARK_LOCATION`) | `-1` | Watermark location enum (0-6). |
151+
| `SELKIES_DEBUG` | `False` | Enable debug logging. |
152+
| `SELKIES_ENABLE_SHARING` | `True` | Master toggle for all sharing features. |
153+
| `SELKIES_ENABLE_COLLAB` | `True` | Enable collaborative (read-write) sharing link. |
154+
| `SELKIES_ENABLE_SHARED` | `True` | Enable view-only sharing links. |
155+
| `SELKIES_ENABLE_PLAYER2` | `True` | Enable sharing link for gamepad player 2. |
156+
| `SELKIES_ENABLE_PLAYER3` | `True` | Enable sharing link for gamepad player 3. |
157+
| `SELKIES_ENABLE_PLAYER4` | `True` | Enable sharing link for gamepad player 4. |
158+
55159
## Language Support - Internationalization
56160

57161
The environment variable `LC_ALL` can be used to start this image in a different language than English simply pass for example to launch the Desktop session in French `LC_ALL=fr_FR.UTF-8`.

readme-vars.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,110 @@ full_custom_readme: |
5656
* 5 - Centered
5757
* 6 - Animated
5858
59+
## Selkies application settings
60+
61+
Using environment variables every facet of the application can be configured.
62+
63+
### Setting Types and UI Customization
64+
65+
Certain setting types have special syntax for advanced control over the client-side UI and available options. A key concept is that **any setting that is locked to a single value will not be rendered in the UI**, giving the user no option to change it. This, combined with the various `ui_` visibility settings, allows administrators to completely customize the client interface.
66+
67+
#### Booleans and Locking
68+
Boolean settings accept `true` or `false`. You can also prevent the user from changing a boolean setting in the UI by appending `|locked`. The UI toggle for this setting will be hidden.
69+
70+
* **Example**: To force CPU encoding on and prevent the user from disabling it:
71+
```bash
72+
-e SELKIES_USE_CPU="true|locked"
73+
```
74+
75+
#### Enums and Lists
76+
These settings accept a comma-separated list of values. Their behavior depends on the number of items provided:
77+
78+
* **Multiple Values**: The first item in the list becomes the default selection, and all items in the list become the available options in the UI dropdown.
79+
* **Single Value**: The provided value becomes the default, and the UI dropdown is hidden because the choice is locked.
80+
81+
* **Example**: Force the encoder to be `jpeg` with no other options available to the user:
82+
```bash
83+
-e SELKIES_ENCODER="jpeg"
84+
```
85+
86+
#### Ranges
87+
Range settings define a minimum and maximum for a value (e.g., framerate).
88+
89+
* **To set a range**: Use a hyphen-separated `min-max` format. The UI will show a slider.
90+
* **To set a fixed value**: Provide a single number. This will lock the value and hide the UI slider.
91+
92+
* **Example**: Lock the framerate to exactly 60 FPS.
93+
```bash
94+
-e SELKIES_FRAMERATE="60"
95+
```
96+
97+
#### Manual Resolution Mode
98+
The server can be forced to use a single, fixed resolution for all connecting clients. This mode is automatically activated if `SELKIES_MANUAL_WIDTH`, `SELKIES_MANUAL_HEIGHT`, or `SELKIES_IS_MANUAL_RESOLUTION_MODE` is set.
99+
100+
* If `SELKIES_MANUAL_WIDTH` and/or `SELKIES_MANUAL_HEIGHT` are set, the resolution is locked to those values.
101+
* If `SELKIES_IS_MANUAL_RESOLUTION_MODE` is set to `true` without specifying width or height, the resolution defaults to **1024x768**.
102+
* When this mode is active, the client UI for changing resolution is disabled.
103+
104+
| Environment Variable | Default Value | Description |
105+
| --- | --- | --- |
106+
| `SELKIES_UI_TITLE` | `'Selkies'` | Title in top left corner of sidebar. |
107+
| `SELKIES_UI_SHOW_LOGO` | `True` | Show the Selkies logo in the sidebar. |
108+
| `SELKIES_UI_SHOW_SIDEBAR` | `True` | Show the main sidebar UI. |
109+
| `SELKIES_UI_SHOW_CORE_BUTTONS` | `True` | Show the core components buttons display, audio, microphone, and gamepad. |
110+
| `SELKIES_UI_SIDEBAR_SHOW_VIDEO_SETTINGS` | `True` | Show the video settings section in the sidebar. |
111+
| `SELKIES_UI_SIDEBAR_SHOW_SCREEN_SETTINGS` | `True` | Show the screen settings section in the sidebar. |
112+
| `SELKIES_UI_SIDEBAR_SHOW_AUDIO_SETTINGS` | `True` | Show the audio settings section in the sidebar. |
113+
| `SELKIES_UI_SIDEBAR_SHOW_STATS` | `True` | Show the stats section in the sidebar. |
114+
| `SELKIES_UI_SIDEBAR_SHOW_CLIPBOARD` | `True` | Show the clipboard section in the sidebar. |
115+
| `SELKIES_UI_SIDEBAR_SHOW_FILES` | `True` | Show the file transfer section in the sidebar. |
116+
| `SELKIES_UI_SIDEBAR_SHOW_APPS` | `True` | Show the applications section in the sidebar. |
117+
| `SELKIES_UI_SIDEBAR_SHOW_SHARING` | `True` | Show the sharing section in the sidebar. |
118+
| `SELKIES_UI_SIDEBAR_SHOW_GAMEPADS` | `True` | Show the gamepads section in the sidebar. |
119+
| `SELKIES_UI_SIDEBAR_SHOW_FULLSCREEN` | `True` | Show the fullscreen button in the sidebar. |
120+
| `SELKIES_UI_SIDEBAR_SHOW_GAMING_MODE` | `True` | Show the gaming mode button in the sidebar. |
121+
| `SELKIES_UI_SIDEBAR_SHOW_TRACKPAD` | `True` | Show the virtual trackpad button in the sidebar. |
122+
| `SELKIES_UI_SIDEBAR_SHOW_KEYBOARD_BUTTON` | `True` | Show the on-screen keyboard button in the display area. |
123+
| `SELKIES_UI_SIDEBAR_SHOW_SOFT_BUTTONS` | `True` | Show the soft buttons section in the sidebar. |
124+
| `SELKIES_AUDIO_ENABLED` | `True` | Enable server-to-client audio streaming. |
125+
| `SELKIES_MICROPHONE_ENABLED` | `True` | Enable client-to-server microphone forwarding. |
126+
| `SELKIES_GAMEPAD_ENABLED` | `True` | Enable gamepad support. |
127+
| `SELKIES_CLIPBOARD_ENABLED` | `True` | Enable clipboard synchronization. |
128+
| `SELKIES_COMMAND_ENABLED` | `True` | Enable parsing of command websocket messages. |
129+
| `SELKIES_FILE_TRANSFERS` | `'upload,download'` | Allowed file transfer directions (comma-separated: "upload,download"). Set to "" or "none" to disable. |
130+
| `SELKIES_ENCODER` | `'x264enc,x264enc-striped,jpeg'` | The default video encoders. |
131+
| `SELKIES_FRAMERATE` | `'8-120'` | Allowed framerate range or a fixed value. |
132+
| `SELKIES_H264_CRF` | `'5-50'` | Allowed H.264 CRF range or a fixed value. |
133+
| `SELKIES_JPEG_QUALITY` | `'1-100'` | Allowed JPEG quality range or a fixed value. |
134+
| `SELKIES_H264_FULLCOLOR` | `False` | Enable H.264 full color range for pixelflux encoders. |
135+
| `SELKIES_H264_STREAMING_MODE` | `False` | Enable H.264 streaming mode for pixelflux encoders. |
136+
| `SELKIES_USE_CPU` | `False` | Force CPU-based encoding for pixelflux. |
137+
| `SELKIES_USE_PAINT_OVER_QUALITY` | `True` | Enable high-quality paint-over for static scenes. |
138+
| `SELKIES_PAINT_OVER_JPEG_QUALITY` | `'1-100'` | Allowed JPEG paint-over quality range or a fixed value. |
139+
| `SELKIES_H264_PAINTOVER_CRF` | `'5-50'` | Allowed H.264 paint-over CRF range or a fixed value. |
140+
| `SELKIES_H264_PAINTOVER_BURST_FRAMES` | `'1-30'` | Allowed H.264 paint-over burst frames range or a fixed value. |
141+
| `SELKIES_SECOND_SCREEN` | `True` | Enable support for a second monitor/display. |
142+
| `SELKIES_AUDIO_BITRATE` | `'320000'` | The default audio bitrate. |
143+
| `SELKIES_IS_MANUAL_RESOLUTION_MODE` | `False` | Lock the resolution to the manual width/height values. |
144+
| `SELKIES_MANUAL_WIDTH` | `0` | Lock width to a fixed value. Setting this forces manual resolution mode. |
145+
| `SELKIES_MANUAL_HEIGHT` | `0` | Lock height to a fixed value. Setting this forces manual resolution mode. |
146+
| `SELKIES_SCALING_DPI` | `'96'` | The default DPI for UI scaling. |
147+
| `SELKIES_ENABLE_BINARY_CLIPBOARD` | `False` | Allow binary data on the clipboard. |
148+
| `SELKIES_USE_BROWSER_CURSORS` | `False` | Use browser CSS cursors instead of rendering to canvas. |
149+
| `SELKIES_USE_CSS_SCALING` | `False` | HiDPI when false, if true a lower resolution is sent from the client and the canvas is stretched. |
150+
| `SELKIES_PORT` (or `CUSTOM_WS_PORT`) | `8082` | Port for the data websocket server. |
151+
| `SELKIES_DRI_NODE` (or `DRI_NODE`) | `''` | Path to the DRI render node for VA-API. |
152+
| `SELKIES_AUDIO_DEVICE_NAME` | `'output.monitor'` | Audio device name for pcmflux capture. |
153+
| `SELKIES_WATERMARK_PATH` (or `WATERMARK_PNG`) | `''` | Absolute path to the watermark PNG file. |
154+
| `SELKIES_WATERMARK_LOCATION` (or `WATERMARK_LOCATION`) | `-1` | Watermark location enum (0-6). |
155+
| `SELKIES_DEBUG` | `False` | Enable debug logging. |
156+
| `SELKIES_ENABLE_SHARING` | `True` | Master toggle for all sharing features. |
157+
| `SELKIES_ENABLE_COLLAB` | `True` | Enable collaborative (read-write) sharing link. |
158+
| `SELKIES_ENABLE_SHARED` | `True` | Enable view-only sharing links. |
159+
| `SELKIES_ENABLE_PLAYER2` | `True` | Enable sharing link for gamepad player 2. |
160+
| `SELKIES_ENABLE_PLAYER3` | `True` | Enable sharing link for gamepad player 3. |
161+
| `SELKIES_ENABLE_PLAYER4` | `True` | Enable sharing link for gamepad player 4. |
162+
59163
## Language Support - Internationalization
60164
61165
The environment variable `LC_ALL` can be used to start this image in a different language than English simply pass for example to launch the Desktop session in French `LC_ALL=fr_FR.UTF-8`.

root/etc/s6-overlay/s6-rc.d/init-selkies-config/run

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,6 @@ fi
5959

6060

6161
# set env based on vars
62-
printf "${GST_DEBUG:-*:1}" > /run/s6/container_environment/GST_DEBUG
63-
printf "${SELKIES_ENCODER:-x264enc}" > /run/s6/container_environment/SELKIES_ENCODER
64-
printf "${SELKIES_FRAMERATE:-60}" > /run/s6/container_environment/SELKIES_FRAMERATE
65-
printf "${SELKIES_ENABLE_RESIZE:-true}" > /run/s6/container_environment/SELKIES_ENABLE_RESIZE
66-
printf "${DISPLAY_SIZEW:-1024}" > /run/s6/container_environment/DISPLAY_SIZEW
67-
printf "${DISPLAY_SIZEH:-768}" > /run/s6/container_environment/DISPLAY_SIZEH
68-
printf "${DISPLAY_REFRESH:60}" > /run/s6/container_environment/DISPLAY_REFRESH
69-
printf "${DISPLAY_DPI:-96}" > /run/s6/container_environment/DISPLAY_DPI
70-
printf "${DISPLAY_CDEPTH:-24}" > /run/s6/container_environment/DISPLAY_CDEPTH
7162
if [[ -z ${NO_GAMEPAD+x} ]]; then
7263
printf "/usr/lib/selkies_joystick_interposer.so:/opt/lib/libudev.so.1.0.0-fake" > /run/s6/container_environment/LD_PRELOAD
7364
fi

root/etc/s6-overlay/s6-rc.d/svc-xorg/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717
exec s6-setuidgid abc \
1818
/usr/bin/Xvfb \
1919
"${DISPLAY}" \
20-
-screen 0 "${DEFAULT_RES}x${DISPLAY_CDEPTH}" \
20+
-screen 0 "${DEFAULT_RES}x24" \
2121
-dpi "${DISPLAY_DPI}" \
2222
+extension "COMPOSITE" \
2323
+extension "DAMAGE" \

0 commit comments

Comments
 (0)