Fix PR #3 review issues: idempotent VNC auth, noVNC/VNC dependency, DISPLAY interpolation, stale xterm refs#5
Conversation
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
There was a problem hiding this comment.
Pull request overview
Updates container startup/configuration to address prior review feedback around VNC auth handling, service toggles, and documentation accuracy.
Changes:
- Make VNC password configuration idempotent by generating an
x11vncauth file and injecting-rfbauthviaentry.sh. - Prevent broken noVNC restart loops by auto-disabling noVNC when VNC is disabled.
- Align configuration/docs/UI with current image contents (DISPLAY documentation, fluxbox menu terminal entry, supervisord DISPLAY interpolation, license wording).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
entry.sh |
Generates VNC passfile and rewrites supervisord.conf; adds guard to disable noVNC when VNC is disabled. |
supervisord.conf |
Switches Xvfb/x11vnc/fluxbox to use %(ENV_DISPLAY)s interpolation for DISPLAY wiring. |
menu |
Replaces xterm invocation in Fluxbox menu. |
README.md |
Removes DISPLAY from documented env vars; updates license statement wording. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [exec] (Firefox) {firefox} | ||
| [submenu] (System Tools) | ||
| [exec] (top) {xterm -e top} | ||
| [exec] (top) {x-terminal-emulator -e top} |
There was a problem hiding this comment.
x-terminal-emulator is typically a Debian/Ubuntu alternative name and is unlikely to exist in this Alpine-based image (the Dockerfile doesn't install any terminal emulator). This menu entry will probably fail at runtime. Either install a terminal emulator package that provides the chosen command, or change/remove this menu item to call a terminal that is actually present in the image.
| [exec] (top) {x-terminal-emulator -e top} | |
| [nop] (top (no terminal available)) |
|
|
||
| [program:x11vnc] | ||
| command=/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -forever -nopw -wait 5 -shared -permitfiletransfer -tightfilexfer -rfbport 5901 | ||
| command=/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -display %(ENV_DISPLAY)s -forever -nopw -wait 5 -shared -permitfiletransfer -tightfilexfer -rfbport 5901 |
There was a problem hiding this comment.
The x11vnc command still includes -nopw (no password). With VNC password support now being injected via -rfbauth, keeping -nopw is contradictory and can cause the server to start without requiring authentication. Consider removing -nopw when a password is configured (or omitting it from the base command and only adding it when explicitly running passwordless).
| command=/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -display %(ENV_DISPLAY)s -forever -nopw -wait 5 -shared -permitfiletransfer -tightfilexfer -rfbport 5901 | |
| command=/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -display %(ENV_DISPLAY)s -forever -wait 5 -shared -permitfiletransfer -tightfilexfer -rfbport 5901 |
| # Make the change idempotent: remove any existing -passwd or -rfbauth args | ||
| sed -i 's/ -passwd [^ ]*//g; s/ -rfbauth [^ ]*//g' /etc/supervisord.conf |
There was a problem hiding this comment.
The idempotent cleanup only strips existing -passwd and -rfbauth flags, but leaves -nopw intact in the x11vnc command. If -nopw is present, it may defeat the password you are adding via -rfbauth. Update the rewrite logic to also remove -nopw (at least when VNC_PASSWORD is set), ideally scoped to the x11vnc command= line to avoid unintended edits elsewhere in the supervisord config.
| # Make the change idempotent: remove any existing -passwd or -rfbauth args | |
| sed -i 's/ -passwd [^ ]*//g; s/ -rfbauth [^ ]*//g' /etc/supervisord.conf | |
| # Make the change idempotent: remove any existing -passwd, -rfbauth, or -nopw args on the x11vnc command | |
| sed -i \ | |
| -e '/command.*x11vnc/ s/ -passwd [^ ]*//g' \ | |
| -e '/command.*x11vnc/ s/ -rfbauth [^ ]*//g' \ | |
| -e '/command.*x11vnc/ s/ -nopw//g' \ | |
| /etc/supervisord.conf |
|
@copilot apply changes based on the comments in this thread |
… 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
Applied all 3 review comments in commit
|
Addresses all 6 review comments from the automated reviewer on PR #3, plus 3 follow-up review comments.
VNC password handling (entry.sh, supervisord.conf)
-passwdsed injection with-rfbauthfile-based auth viax11vnc -storepasswd-passwd/-rfbauth/-nopwargs before appendingcommand=line to avoid unintended edits elsewhere in supervisord config/root/.vncpasswith0600permissions-nopwfrom the x11vnc base command insupervisord.confto avoid contradicting-rfbauthwhen a password is configuredService dependency validation (entry.sh)
novnc_serverfailing to connect tolocalhost:5901DISPLAY consistency (supervisord.conf, README.md)
:0with%(ENV_DISPLAY)sinterpolation in Xvfb, x11vnc, and fluxbox configsDISPLAYfrom user-facing env var docs (internal detail, not meant to be overridden)Stale package references (menu)
xterm -e topmenu entry with[nop] (top (no terminal available))since no terminal emulator is installed in the Alpine imageLicense clarity (README.md)
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.