Conversation
- Remove unnecessary packages (chromium, xterm, bash, fonts) to reduce image size from ~540MB to ~300-350MB - Add environment variables to enable/disable VNC, RDP, and noVNC independently - Fix "Another user already login" VNC error by adding -forever flag and proper priorities - Implement Firefox autostart via Fluxbox startup script - Update documentation with size optimization tips and VNC vs RDP performance comparison - Expose RDP port 3389 in Dockerfile Co-authored-by: soffchen <891708+soffchen@users.noreply.github.com> Agent-Logs-Url: https://github.com/soffchen/tiny-remote-desktop/sessions/3abc26aa-52b2-4966-ae47-17e6fb63100d
There was a problem hiding this comment.
Pull request overview
This PR optimizes the container image footprint and improves remote-desktop usability by updating the installed package set, adding runtime service toggles, and documenting recommended configurations and troubleshooting steps.
Changes:
- Reduce image size by removing large/non-essential packages and consolidating Dockerfile layers with cleanup.
- Improve session reliability/start order via supervisord priorities and x11vnc
-forever, and expose RDP port 3389. - Add env-var driven service toggles (VNC/RDP/noVNC) and Firefox autostart behavior, with expanded README guidance.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| Dockerfile | Consolidates install steps, removes packages, adds env defaults, and exposes 3389 |
| supervisord.conf | Adds priorities, x11vnc -forever, fluxbox DISPLAY env, adjusts xrdp invocation |
| entry.sh | Adds service enable/disable via env vars and writes Fluxbox startup for Firefox autostart |
| menu | Removes Chromium/Xterm menu entries (but still contains an xterm-based tool entry) |
| README.md | Major documentation expansion (optimization, service toggles, usage examples, troubleshooting) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Configure VNC password if provided | ||
| if [ "$VNC_PASSWORD" ]; then | ||
| sed -i "s/^\(command.*x11vnc.*\)$/\1 -passwd '$VNC_PASSWORD'/" /etc/supervisord.conf |
There was a problem hiding this comment.
The VNC password injection is not idempotent: on container restart it will append another -passwd ... to the x11vnc command each time. Also, passwords containing sed-special characters (e.g. / or &) will break the substitution. Consider checking for an existing -passwd and replacing it, and properly escaping the value (or use an auth file via -rfbauth).
| sed -i "s/^\(command.*x11vnc.*\)$/\1 -passwd '$VNC_PASSWORD'/" /etc/supervisord.conf | |
| VNC_PASSFILE="/root/.vncpass" | |
| # Store the password in a file and use x11vnc's -rfbauth option | |
| x11vnc -storepasswd "$VNC_PASSWORD" "$VNC_PASSFILE" | |
| chmod 600 "$VNC_PASSFILE" | |
| # Make the change idempotent: remove any existing -passwd or -rfbauth args | |
| sed -i 's/ -passwd [^ ]*//g; s/ -rfbauth [^ ]*//g' /etc/supervisord.conf | |
| # Append the auth file option to the x11vnc command | |
| sed -i "s/^\(command.*x11vnc.*\)$/\1 -rfbauth $VNC_PASSFILE/" /etc/supervisord.conf |
| if [ "$ENABLE_RDP" != "true" ]; then | ||
| sed -i '/\[program:xrdp\]/,/^$/d' /etc/supervisord.conf | ||
| fi | ||
|
|
There was a problem hiding this comment.
novnc_server is configured to connect to localhost:5901, so allowing ENABLE_NOVNC=true while ENABLE_VNC!=true will start a broken noVNC process (likely restart-looping under supervisord). Consider automatically disabling noVNC when VNC is disabled, or validating the env var combination and failing fast with a clear message.
| # Ensure noVNC is not enabled when VNC is disabled | |
| if [ "$ENABLE_NOVNC" = "true" ] && [ "$ENABLE_VNC" != "true" ]; then | |
| echo "Warning: ENABLE_NOVNC=true requires ENABLE_VNC=true; disabling noVNC." | |
| ENABLE_NOVNC="" | |
| fi |
|
|
||
| ## License | ||
|
|
||
| Open source - use freely for personal and educational purposes. |
There was a problem hiding this comment.
The README states the project is “Open source” but the repository does not include a LICENSE file in this PR. Either add an explicit license file, or adjust/remove this statement to avoid implying permissions that aren’t granted.
| Open source - use freely for personal and educational purposes. | |
| The source code is provided for reference only. No explicit license is granted at this time, so all rights are reserved. Do not use, copy, modify, or distribute this project without obtaining prior written permission from the maintainer. |
|
|
||
| | Variable | Default | Description | | ||
| |----------|---------|-------------| | ||
| | `DISPLAY` | `:0` | X display number | |
There was a problem hiding this comment.
The README lists DISPLAY as a configurable env var, but the runtime config currently hardcodes :0 in supervisord (Xvfb/x11vnc/fluxbox). Either update the implementation to honor DISPLAY, or remove it from the documented configuration to avoid confusion.
| | `DISPLAY` | `:0` | X display number | |
| [exec] (vi) {xterm -e vi} | ||
| [end] | ||
| [submenu] (System Tools) | ||
| [exec] (top) {xterm -e top} |
There was a problem hiding this comment.
The Fluxbox menu still invokes xterm for the “top” entry, but xterm is no longer installed/started in this PR. This menu item will fail at runtime; either remove/replace the entry (e.g., use another terminal) or keep xterm in the image.
| [exec] (top) {xterm -e top} | |
| [exec] (top) {x-terminal-emulator -e top} |
| [program:X11] | ||
| command=/usr/bin/Xvfb :0 -screen 0 %(ENV_RESOLUTION)sx24 | ||
| autorestart=true | ||
| priority=10 | ||
|
|
||
| [program:x11vnc] | ||
| command=/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -nopw -wait 5 -shared -permitfiletransfer -tightfilexfer -rfbport 5901 | ||
| command=/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -forever -nopw -wait 5 -shared -permitfiletransfer -tightfilexfer -rfbport 5901 | ||
| autorestart=true | ||
| priority=20 | ||
|
|
||
| [program:novnc] | ||
| command=/usr/bin/novnc_server --vnc localhost:5901 --listen 6901 | ||
| autorestart=true | ||
| priority=30 | ||
|
|
||
| [program:fluxbox] | ||
| command=/usr/bin/fluxbox | ||
| autorestart=true | ||
|
|
||
| [program:xterm] | ||
| command=/usr/bin/xterm | ||
| autorestart=false | ||
| startretries = 1 | ||
| priority=40 | ||
| environment=DISPLAY=":0" |
There was a problem hiding this comment.
DISPLAY is hardcoded to :0 (and Xvfb/x11vnc also hardcode :0), so the DISPLAY env var advertised in the Dockerfile/README can’t actually change the display. Consider using Supervisor’s env interpolation (e.g., %(ENV_DISPLAY)s) consistently for Xvfb, x11vnc, and fluxbox, or remove DISPLAY as a configurable option.
Co-authored-by: soffchen <891708+soffchen@users.noreply.github.com> Agent-Logs-Url: https://github.com/soffchen/tiny-remote-desktop/sessions/9df87a06-d841-4ca4-86ee-d52e44f47ace
Co-authored-by: soffchen <891708+soffchen@users.noreply.github.com> Agent-Logs-Url: https://github.com/soffchen/tiny-remote-desktop/sessions/9df87a06-d841-4ca4-86ee-d52e44f47ace
… line, fix menu for Alpine Co-authored-by: soffchen <891708+soffchen@users.noreply.github.com> Agent-Logs-Url: https://github.com/soffchen/tiny-remote-desktop/sessions/678e6e8b-3118-4965-b977-3a7fa836bc05
Fix PR #3 review issues: idempotent VNC auth, noVNC/VNC dependency, DISPLAY interpolation, stale xterm refs
|
@copilot apply changes based on the comments in this thread |
All 6 review comments from that thread have already been applied in commits
|
|
@claude[agent] fix the conflicts |
Resolved conflicts in README.md by combining VNC/RDP verdict section with automated builds documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Conflicts resolved in commit da10212. Merged the master branch which included the automated builds documentation with the VNC/RDP optimization changes. |
Original prompt