Skip to content

Commit

Permalink
Avoid xpra server error message if container terminates fast. #134
Browse files Browse the repository at this point in the history
  • Loading branch information
mviereck committed Mar 6, 2019
1 parent d6a799e commit 75509d3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions x11docker
Original file line number Diff line number Diff line change
Expand Up @@ -2190,14 +2190,14 @@ $(xhost 2>&1 | rmcr)"
check_newxenv() { # find free display, create $Newxenv
# find free display number
[ "$Newdisplaynumber" ] || for ((Newdisplaynumber=100 ; Newdisplaynumber <=1000 ; Newdisplaynumber++)); do
[ -n "$(find /tmp/.X11-unix/X$Newdisplaynumber /tmp/.X$Newdisplaynumber-lock $XDG_RUNTIME_DIR/wayland-$Newdisplaynumber 2>/dev/null)" ] || {
[ -n "$(find /tmp/.X11-unix/X$Newdisplaynumber /tmp/.X$Newdisplaynumber-lock ${XDG_RUNTIME_DIR:-}/wayland-$Newdisplaynumber 2>/dev/null)" ] || {
case $Xserver in
--vcxsrv) grep -q -E 'Authorization|Absolute' <<< "$(xwininfo.exe -display :$Newdisplaynumber -root 2>&1)" || break ;;
*) break ;;
esac
}
done

# X over IP/TCP
[ "$Xoverip" ] || case $Xserver in
--vcxsrv|--xwin) Xoverip="yes" ;;
Expand Down Expand Up @@ -4943,9 +4943,12 @@ $(tail $Xpraserverlogfile)"
verbose -d "Starting Xpra server"
$Mksu "env $Newxenv XPRA_OPENGL_DOUBLE_BUFFERED=1 $Xpraservercommand" >> $Xpraserverlogfile 2>&1 &
Xpraserverpid=$! && storepid $Xpraserverpid xpraserver
waitforlogentry "xpra server" $Xpraserverlogfile 'xpra is ready' && verbose "Xpra server is ready" || error "Xpra server startup failed.
waitforlogentry "xpra server" $Xpraserverlogfile 'xpra is ready' && verbose "Xpra server is ready" || {
warning xpra
rocknroll && error "Xpra server startup failed.
Last lines of Xpra server log:
$(tail $Xpraserverlogfile)"
}
}

# xpra client
Expand Down

0 comments on commit 75509d3

Please sign in to comment.