You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These variables can be used to lock down the desktop environment for single-application use cases or to restrict user capabilities.
210
+
211
+
##### Meta Variables
212
+
213
+
These variables act as presets, enabling multiple hardening options at once. Individual options can still be set to override the preset.
214
+
215
+
| Variable | Description |
216
+
| :----: | --- |
217
+
| **`HARDEN_DESKTOP`** | Enables `DISABLE_OPEN_TOOLS`, `DISABLE_SUDO`, and `DISABLE_TERMINALS`. Also sets related Selkies UI settings (`SELKIES_FILE_TRANSFERS`, `SELKIES_COMMAND_ENABLED`, `SELKIES_UI_SIDEBAR_SHOW_FILES`, `SELKIES_UI_SIDEBAR_SHOW_APPS`) if they are not explicitly set by the user. |
218
+
| **`HARDEN_OPENBOX`** | Enables `DISABLE_CLOSE_BUTTON`, `DISABLE_MOUSE_BUTTONS`, and `HARDEN_KEYBINDS`. It also flags `RESTART_APP` if not set by the user, ensuring the primary application is automatically restarted if closed. |
219
+
220
+
##### Individual Hardening Variables
221
+
222
+
| Variable | Description |
223
+
| :--- | --- |
224
+
| **`DISABLE_OPEN_TOOLS`** | If true, disables `xdg-open` and `exo-open` binaries by removing their execute permissions. |
225
+
| **`DISABLE_SUDO`** | If true, disables the `sudo` command by removing its execute permissions and invalidating the passwordless sudo configuration. |
226
+
| **`DISABLE_TERMINALS`** | If true, disables common terminal emulators by removing their execute permissions and hiding them from the Openbox right-click menu. |
227
+
| **`DISABLE_CLOSE_BUTTON`** | If true, removes the close button from window title bars in the Openbox window manager. |
228
+
| **`DISABLE_MOUSE_BUTTONS`** | If true, disables the right-click and middle-click context menus and actions within the Openbox window manager. |
229
+
| **`HARDEN_KEYBINDS`** | If true, disables default Openbox keybinds that can bypass other hardening options (e.g., `Alt+F4` to close windows, `Alt+Escape` to show the root menu). |
230
+
| **`RESTART_APP`** | If true, enables a watchdog service that automatically restarts the main application if it is closed. The user's autostart script is made read-only and root owned to prevent tampering. |
231
+
232
+
#### Selkies application settings
233
+
234
+
Using environment variables every facet of the application can be configured.
235
+
236
+
##### Booleans and Locking
237
+
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.
238
+
239
+
* **Example**: To force CPU encoding on and prevent the user from disabling it:
240
+
```bash
241
+
-e SELKIES_USE_CPU="true|locked"
242
+
```
243
+
244
+
##### Enums and Lists
245
+
These settings accept a comma-separated list of values. Their behavior depends on the number of items provided:
246
+
247
+
* **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.
248
+
* **Single Value**: The provided value becomes the default, and the UI dropdown is hidden because the choice is locked.
249
+
250
+
* **Example**: Force the encoder to be `jpeg` with no other options available to the user:
251
+
```bash
252
+
-e SELKIES_ENCODER="jpeg"
253
+
```
254
+
255
+
##### Ranges
256
+
Range settings define a minimum and maximum for a value (e.g., framerate).
257
+
258
+
* **To set a range**: Use a hyphen-separated `min-max` format. The UI will show a slider.
259
+
* **To set a fixed value**: Provide a single number. This will lock the value and hide the UI slider.
260
+
261
+
* **Example**: Lock the framerate to exactly 60 FPS.
262
+
```bash
263
+
-e SELKIES_FRAMERATE="60"
264
+
```
265
+
266
+
##### Manual Resolution Mode
267
+
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.
268
+
269
+
* If `SELKIES_MANUAL_WIDTH` and/or `SELKIES_MANUAL_HEIGHT` are set, the resolution is locked to those values.
270
+
* If `SELKIES_IS_MANUAL_RESOLUTION_MODE` is set to `true` without specifying width or height, the resolution defaults to **1024x768**.
271
+
* When this mode is active, the client UI for changing resolution is disabled.
272
+
273
+
| Environment Variable | Default Value | Description |
274
+
| --- | --- | --- |
275
+
| `SELKIES_UI_TITLE` | `'Selkies'` | Title in top left corner of sidebar. |
276
+
| `SELKIES_UI_SHOW_LOGO` | `True` | Show the Selkies logo in the sidebar. |
277
+
| `SELKIES_UI_SHOW_SIDEBAR` | `True` | Show the main sidebar UI. |
278
+
| `SELKIES_UI_SHOW_CORE_BUTTONS` | `True` | Show the core components buttons display, audio, microphone, and gamepad. |
279
+
| `SELKIES_UI_SIDEBAR_SHOW_VIDEO_SETTINGS` | `True` | Show the video settings section in the sidebar. |
280
+
| `SELKIES_UI_SIDEBAR_SHOW_SCREEN_SETTINGS` | `True` | Show the screen settings section in the sidebar. |
281
+
| `SELKIES_UI_SIDEBAR_SHOW_AUDIO_SETTINGS` | `True` | Show the audio settings section in the sidebar. |
282
+
| `SELKIES_UI_SIDEBAR_SHOW_STATS` | `True` | Show the stats section in the sidebar. |
283
+
| `SELKIES_UI_SIDEBAR_SHOW_CLIPBOARD` | `True` | Show the clipboard section in the sidebar. |
284
+
| `SELKIES_UI_SIDEBAR_SHOW_FILES` | `True` | Show the file transfer section in the sidebar. |
285
+
| `SELKIES_UI_SIDEBAR_SHOW_APPS` | `True` | Show the applications section in the sidebar. |
286
+
| `SELKIES_UI_SIDEBAR_SHOW_SHARING` | `True` | Show the sharing section in the sidebar. |
287
+
| `SELKIES_UI_SIDEBAR_SHOW_GAMEPADS` | `True` | Show the gamepads section in the sidebar. |
288
+
| `SELKIES_UI_SIDEBAR_SHOW_FULLSCREEN` | `True` | Show the fullscreen button in the sidebar. |
289
+
| `SELKIES_UI_SIDEBAR_SHOW_GAMING_MODE` | `True` | Show the gaming mode button in the sidebar. |
290
+
| `SELKIES_UI_SIDEBAR_SHOW_TRACKPAD` | `True` | Show the virtual trackpad button in the sidebar. |
291
+
| `SELKIES_UI_SIDEBAR_SHOW_KEYBOARD_BUTTON` | `True` | Show the on-screen keyboard button in the display area. |
292
+
| `SELKIES_UI_SIDEBAR_SHOW_SOFT_BUTTONS` | `True` | Show the soft buttons section in the sidebar. |
| `SELKIES_FILE_TRANSFERS` | `'upload,download'` | Allowed file transfer directions (comma-separated: "upload,download"). Set to "" or "none" to disable. |
299
+
| `SELKIES_ENCODER` | `'x264enc,x264enc-striped,jpeg'` | The default video encoders. |
300
+
| `SELKIES_FRAMERATE` | `'8-120'` | Allowed framerate range or a fixed value. |
301
+
| `SELKIES_H264_CRF` | `'5-50'` | Allowed H.264 CRF range or a fixed value. |
302
+
| `SELKIES_JPEG_QUALITY` | `'1-100'` | Allowed JPEG quality range or a fixed value. |
303
+
| `SELKIES_H264_FULLCOLOR` | `False` | Enable H.264 full color range for pixelflux encoders. |
0 commit comments