From a3269eb5d4b55068d46b378db2aa5c3da855dee0 Mon Sep 17 00:00:00 2001 From: mviereck Date: Sat, 29 Jun 2019 22:05:09 +0200 Subject: [PATCH] --xpra: add --encodings=rgb --video-encoders=none --csc-modules=none --opengl=yes #167 --- x11docker | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/x11docker b/x11docker index ca71e19b..35a58097 100755 --- a/x11docker +++ b/x11docker @@ -418,13 +418,13 @@ verbose() { # show verbose messages # only logfile notes here, terminal output is done with tail in part:verbose # if $1 = -d then show debug note, too [ "$1" = "-d" ] && shift && debugnote "$*" - logentry "x11docker[$(date +%s.%2N | cut -c8-)]: $* + logentry "x11docker[$(timestamp)]: $* " } debugnote() { # show debug output $* [ "$Debugmode" = "yes" ] && { - logentry "DEBUGNOTE[$(date +%s.%2N | cut -c8-)]: $*" - [ "$Verbose" = "no" ] && echo "${Colblue}DEBUGNOTE[$(date +%s.%2N | cut -c8-)]:${Colnorm} $*" >&3 + logentry "DEBUGNOTE[$(timestamp)]: $*" + [ "$Verbose" = "no" ] && echo "${Colblue}DEBUGNOTE[$(timestamp)]:${Colnorm} $*" >&3 } ||: } logentry() { # write into logfile @@ -795,6 +795,9 @@ download() { # download file at URL $1 and store it in file $ curl) curl -L "${1:-}" --output "${2:-}" ;; esac } +timestamp() { # print HH:MM:SS,NNN + date +%T,%N | cut -c1-12 +} makecookie() { # bake a cookie mcookie 2>/dev/null || echo $RANDOM$RANDOM$RANDOM$RANDOM$RANDOM$RANDOM | cut -b1-32 } @@ -2641,15 +2644,18 @@ create_xcommand() { # create command to start X server and/or Waylan --xpra|--xpra-xwayland) Xpraoptions="$(check_xpraoption --start-via-proxy=no) \\ + $(check_xpraoption --csc-modules=none) \\ $(check_xpraoption --clipboard-direction=both) \\ + $(check_xpraoption --encodings=rgb) \\ $(check_xpraoption --microphone=no) \\ $(check_xpraoption --notifications=no) \\ $(check_xpraoption --pulseaudio=no) \\ $(check_xpraoption --socket-dirs="'$Cachefolder'") \\ $(check_xpraoption --speaker=no) \\ + $(check_xpraoption --video-encoders=none) \\ $(check_xpraoption --webcam=no) \\ $(check_xpraoption --xsettings=no)" - + # disable --dpi for buggy versions [ -n "$Dpi" ] && verlt "$Xpraversion" "xpra v2.1-r16547" && ! verlt "$Xpraversion" "xpra v2.1" && Dpi="" @@ -2684,6 +2690,7 @@ create_xcommand() { # create command to start X server and/or Waylan $Xpraoptions \\ $(check_xpraoption --clipboard=$Shareclipboard) \\ $(check_xpraoption --compress=0) \\ + $(check_xpraoption --opengl=yes) \\ $(check_xpraoption --quality=100) \\ $(check_xpraoption --modal-windows=no)" [ "$Fullscreen" = "yes" ] && Xpraclientcommand="$Xpraclientcommand \\ @@ -5313,10 +5320,10 @@ $(tail $Xpraserverlogfile)" mkfile $Xpraserverlogfile # clear logfile to remove "xpra is ready" message } verbose -d "Starting Xpra server" - echo "x11docker [$(date)]: Starting Xpra server" >> $Xpraserverlogfile + echo "x11docker [$(timestamp)]: Starting Xpra server" >> $Xpraserverlogfile $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" || { + waitforlogentry "xpra server" $Xpraserverlogfile 'xpra is ready' || { rocknroll && error "Xpra server startup failed. Last lines of Xpra server log: $(tail $Xpraserverlogfile)" @@ -5328,7 +5335,7 @@ $(tail $Xpraserverlogfile)" checkpid $Xpraclientpid && kill $Xpraclientpid [ -n "$Xpraclientpid" ] && note "Restarting Xpra client." verbose -d "Starting Xpra client" - echo "x11docker [$(date)]: Starting Xpra client" >> $Xpraclientlogfile + echo "x11docker [$(timestamp)]: Starting Xpra client" >> $Xpraclientlogfile $Mksu "env $Hostxenv $Xpraclientcommand" >> $Xpraclientlogfile 2>&1 & Xpraclientpid=$! && storepid $Xpraclientpid xpraclient checkpid $Xpraclientpid && {