Skip to content

Too fast start of xrdp#1

Open
eino-makitalo wants to merge 1 commit intosoffchen:masterfrom
eino-makitalo:minorfix
Open

Too fast start of xrdp#1
eino-makitalo wants to merge 1 commit intosoffchen:masterfrom
eino-makitalo:minorfix

Conversation

@eino-makitalo
Copy link

I was testing this with my Windows 10 & WSL 2 docker environment and xrdp started and failed.

Some sleep and --nodaemon flag to it

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to make xrdp start more reliably in a Windows 10 + WSL2 Docker environment by delaying startup and keeping the service in the foreground under Supervisor, and it also updates the Alpine base image tag.

Changes:

  • Delay xrdp startup and run it with --nodaemon under supervisord.
  • Switch Docker base image from alpine:edge to alpine:latest.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
supervisord.conf Adds a delayed xrdp start and runs it in foreground mode for Supervisor.
Dockerfile Updates the base image tag to alpine:latest.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


[program:xrdp]
command=/usr/sbin/xrdp
command=bash -c 'sleep 5 && /usr/sbin/xrdp --nodaemon'
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using bash -c 'sleep 5 && /usr/sbin/xrdp --nodaemon' leaves a long-running bash process as PID supervised by supervisord. On shutdown/restart, signals may not be forwarded cleanly to xrdp, which can leave orphaned processes. Prefer replacing the shell with the daemon after the delay (e.g., via exec) or moving the delay logic into a small wrapper script that execs xrdp as PID 1 for this program.

Suggested change
command=bash -c 'sleep 5 && /usr/sbin/xrdp --nodaemon'
command=bash -c 'sleep 5; exec /usr/sbin/xrdp --nodaemon'

Copilot uses AI. Check for mistakes.
Comment on lines +1 to 3
FROM alpine:latest

RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching to alpine:latest makes builds non-reproducible over time and, combined with appending the edge/testing repository below, can lead to dependency/version skew (packages and transitive deps coming from different Alpine releases). Consider pinning the Alpine base to a specific version and using repositories that match that version (or explicitly pin the needed packages) to avoid unexpected breakage.

Suggested change
FROM alpine:latest
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
FROM alpine:3.19

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants