DEBUGNOTE[11:45:19,131]: check_host(): Command tty failed. Guess if running on console: yes
DEBUGNOTE[11:45:19,237]: check_host(): ps can watch root processes: yes
x11docker[11:45:19,256]: Image name: pccastor_pbno9u_wallet:latest
  Container command: 

DEBUGNOTE[11:45:19,297]: host user: debian 1000:1000 /home/debian
x11docker WARNING: User debian is member of group docker.
  That allows unprivileged processes on host to gain root privileges.

DEBUGNOTE[11:45:19,689]: storeinfo(): cache=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621
DEBUGNOTE[11:45:19,702]: storeinfo(): stdout=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/stdout
DEBUGNOTE[11:45:19,713]: storeinfo(): stderr=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/stderr
DEBUGNOTE[11:45:19,756]: storeinfo(): x11dockerpid=13260
DEBUGNOTE[11:45:19,820]: 
x11docker version: 6.10.1-beta-4
Backend version:   Docker version 20.10.12, build e91ed57
Host system:       "Debian GNU/Linux 10 (buster)"
Host architecture: amd64 (x86_64)
Command:           '/usr/bin/x11docker' '-q' '--showenv' '--cap-default' '--hostuser=debian' '--backend=docker' '--xvfb' '--size=1980x1200' '--lang=fr' '--keymap=fr-latin9' '--home' '--homebasedir=/var/www/html/pccastor-com/wp-content/plugins/Loamok_xpra_docker_admin/system_admin-tpls/vms/home' '--pulseaudio' 'pccastor_pbno9u_wallet:latest' 
Parsed options:     -q --showenv --cap-default --hostuser 'debian' --backend 'docker' --xvfb --size '1980x1200' --lang 'fr' --keymap 'fr-latin9' --home '' --homebasedir '/var/www/html/pccastor-com/wp-content/plugins/Loamok_xpra_docker_admin/system_admin-tpls/vms/home' --pulseaudio '' -- 'pccastor_pbno9u_wallet:latest'
DEBUGNOTE[11:45:19,827]: Dependency check for --xvfb: 0
DEBUGNOTE[11:45:19,832]: Dependencies of --xvfb already checked: 0 
DEBUGNOTE[11:45:19,837]: Dependencies of --xvfb already checked: 0 
DEBUGNOTE[11:45:19,841]: storeinfo(): xserver=--xvfb
x11docker WARNING: Option --cap-default disables security hardening
  for containers done by x11docker. Default docker capabilities are allowed.
  This is considered to be less secure.

x11docker note: Option --cap-default: Enabling option --newprivileges.
  You can avoid this with --newprivileges=no

DEBUGNOTE[11:45:19,883]: container user: debian 1000:1000 /home/debian
x11docker WARNING: Option --homebasedir: Specified path does not exist:
  /var/www/html/pccastor-com/wp-content/plugins/Loamok_xpra_docker_admin/system_admin-tpls/vms/home
  Fallback: Using default home base directory.

x11docker[11:45:19,953]: Sharing directory /home/debian/.local/share/x11docker/pccastor_pbno9u_wallet
  with container as its home directory /home/debian

DEBUGNOTE[11:45:19,999]: waitforlogentry(): tailstderr: Waiting for logentry "x11docker=ready" in store.info
DEBUGNOTE[11:45:20,000]: waitforlogentry(): tailstdout: Waiting for logentry "x11docker=ready" in store.info
DEBUGNOTE[11:45:20,057]: storepid(): Stored pid '13957' of 'watchpidlist': 13957 ?        00:00:00 bash
DEBUGNOTE[11:45:20,118]: storepid(): Stored pid '13985' of 'watchmessagefifo': 13985 ?        00:00:00 bash
x11docker[11:45:20,138]: Virtual screen size: 1980x1200

x11docker[11:45:20,148]: Physical screen size:
  

x11docker WARNING: Option --pulseaudio allows container applications
  to catch your audio output and microphone input.

DEBUGNOTE[11:45:20,188]: storeinfo(): pulseaudiomoduleid=263
x11docker[11:45:20,257]: Generated pulseaudio client.conf:
     1	# Connect to host pulseaudio server using mounted UNIX socket
     2	default-server = unix:/x11docker/pulseaudio.socket
     3	# Prevent a server running in container
     4	autospawn = no
     5	daemon-binary = /bin/true
     6	# Prevent use of shared memory
     7	enable-shm = false
     8	

DEBUGNOTE[11:45:20,862]: storeinfo(): DISPLAY=:168
DEBUGNOTE[11:45:20,877]: storeinfo(): XAUTHORITY=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client
DEBUGNOTE[11:45:20,892]: storeinfo(): XSOCKET=/tmp/.X11-unix/X168
DEBUGNOTE[11:45:20,906]: storeinfo(): XDG_RUNTIME_DIR=/run/user/1000
DEBUGNOTE[11:45:20,920]: storeinfo(): Xenv= DISPLAY=:168 XAUTHORITY=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X168 XDG_RUNTIME_DIR=/run/user/1000
DEBUGNOTE[11:45:20,954]: X server command:
  /usr/bin/Xvfb :168  \
  -retro \
  +extension RANDR \
  +extension RENDER \
  +extension GLX \
  +extension XVideo \
  +extension DOUBLE-BUFFER \
  +extension SECURITY \
  +extension DAMAGE \
  +extension X-Resource \
  -extension XINERAMA -xinerama \
  -extension MIT-SHM \
  +extension Composite +extension COMPOSITE \
  +extension XTEST \
  -dpms \
  -s off \
  -auth /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/Xauthority.server \
  -nolisten tcp \
  -screen 0 1980x1200x24 \
  
x11docker[11:45:21,122]: --init: Found tini binary: /usr/bin/docker-init

DEBUGNOTE[11:45:21,127]: storeinfo(): tini=/usr/bin/docker-init
DEBUGNOTE[11:45:21,144]: Users and terminal:
  x11docker was started by:                       debian
  As host user serves (running X, storing cache): debian
  Container user will be:                         debian
  Container user password:                        x11docker
  Getting permission to run backend with:         eval 
  Terminal for password frontend:                 bash -c
  Running in a terminal:                          no
  Running on console:                             yes
  Running over SSH:                               no
  Running sourced:                                no
  bash $-:                                        hB
x11docker WARNING: Option --newprivileges=yes: x11docker does not set 
  docker run option --security-opt=no-new-privileges. 
  That degrades container security.
  However, this is still within a default docker setup.

DEBUGNOTE[11:45:21,150]: storeinfo(): containername=x11docker_X168_pccastor_pbno9u_wallet-latest_80718103621
DEBUGNOTE[11:45:21,608]: docker command:
  docker run --detach --tty \
  --name x11docker_X168_pccastor_pbno9u_wallet-latest_80718103621 \
  --user 1000:1000 \
  --userns=host \
  --security-opt label=type:container_runtime_t \
  --volume '/usr/bin/docker-init':'/usr/local/bin/init':ro \
  --tmpfs /run:exec --tmpfs /run/lock \
  --volume '/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share':'/x11docker':rw \
  --volume '/home/debian/.local/share/x11docker/pccastor_pbno9u_wallet':'/home/debian':rw \
  --volume '/tmp/.X11-unix/X168':'/X168':rw \
  --volume /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/pulseaudio.client.conf:/etc/pulse/client.conf:ro \
  --workdir '/tmp' \
  --entrypoint env \
  --env 'container=docker' \
  --env 'XAUTHORITY=/x11docker/Xauthority.client' \
  --env 'DISPLAY=:168' \
  --env 'PULSE_COOKIE=/x11docker/pulseaudio.cookie' \
  --env 'PULSE_SERVER=unix:/x11docker/pulseaudio.socket' \
  --env 'HOME=/home/debian' \
  --env 'USER=debian' \
  -- pccastor_pbno9u_wallet:latest /usr/local/bin/init -- /bin/sh - /x11docker/containerrc
x11docker[11:45:21,902]: Generated dockerrc:
     1	#! /usr/bin/env bash
     2	
     3	# dockerrc:
     4	#  This script runs as root (or member of group docker) on host.
     5	#  - inspect image
     6	#  - pull image if needed
     7	#  - create containerrc
     8	#  - set up systemd/elogind cgroup if needed
     9	#  - run window manager in container or from host if needed
    10	
    11	trap '' SIGINT
    12	
    13	askyesno () 
    14	{ 
    15	    local Choice;
    16	    read -t60 -n1 -p "(timeout after 60s assuming no) [Y|n]" Choice;
    17	    [ "$?" = '0' ] && { 
    18	        [[ "$Choice" == [YyJj]* ]] || [ -z "$Choice" ] && return 0
    19	    };
    20	    return 1
    21	}
    22	checkpid () 
    23	{ 
    24	    [ -e "/proc/${1:-NONSENSE}" ]
    25	}
    26	escapestring () 
    27	{ 
    28	    echo "${1:-}" | LC_ALL=C sed -e 's/[^a-zA-Z0-9,._+@=:/-]/\\&/g; '
    29	}
    30	mysleep () 
    31	{ 
    32	    sleep "${1:-1}" 2> /dev/null || sleep 1
    33	}
    34	parse_inspect () 
    35	{ 
    36	    local Parserscript;
    37	    Parserscript="$Cachefolder/parse_inspect.py";
    38	    Parserscript="#! $Pythonbin
    39	$(cat << EOF
    40	import json,sys
    41	
    42	def parse_inspect(*args):
    43	    """ 
    44	    parse output of docker|podman|nerdctl inspect
    45	    args:
    46	     0: ignored
    47	     1: string containing inspect output
    48	     2..n: json keys. For second level keys provide e.g. "Config","Cmd"
    49	    Prints key value as a string.
    50	    Prints empty string if key not found.
    51	    A list is printed as a string with '' around each element.
    52	    """
    53	    
    54	    output=""
    55	    inspect=args[1]
    56	    inspect=inspect.strip()
    57	    if inspect[0] == "[" :
    58	        inspect=inspect[1:-2] # remove enclosing [ ]
    59	
    60	    obj=json.loads(inspect)
    61	    
    62	    for arg in args[2:]: # recursively find the desired object. Command.Cmd is found with args "Command" , "Cmd"
    63	        try:
    64	            obj=obj[arg]
    65	        except:
    66	            obj=""
    67	            
    68	    objtype=str(type(obj))
    69	    if "'list'" in objtype:
    70	        for i in obj:
    71	            output=output+"'"+str(i)+"' "
    72	    else:
    73	        output=str(obj)
    74	    
    75	    if output == "None":
    76	        output=""
    77	        
    78	    print(output)
    79	
    80	parse_inspect(*sys.argv)
    81	EOF
    82	  )";
    83	    echo "$Parserscript" | $Pythonbin - "$@"
    84	}
    85	pspid () 
    86	{ 
    87	    LC_ALL=C ps -p "${1:-}" 2> /dev/null | grep -v 'TIME'
    88	}
    89	rmcr () 
    90	{ 
    91	    case "${1:-}" in 
    92	        "")
    93	            sed "s/$(printf "\r")//g"
    94	        ;;
    95	        *)
    96	            sed -i "s/$(printf "\r")//g" "${1:-}"
    97	        ;;
    98	    esac
    99	}
   100	rocknroll () 
   101	{ 
   102	    [ -s "$Timetosaygoodbyefile" ] && return 1;
   103	    [ -e "$Timetosaygoodbyefile" ] || return 1;
   104	    return 0
   105	}
   106	saygoodbye () 
   107	{ 
   108	    debugnote "time to say goodbye ($*)";
   109	    [ -e "$Timetosaygoodbyefile" ] && echo timetosaygoodbye >> $Timetosaygoodbyefile;
   110	    [ -e "$Timetosaygoodbyefifo" ] && echo timetosaygoodbye >> $Timetosaygoodbyefifo
   111	}
   112	storeinfo () 
   113	{ 
   114	    [ -e "$Storeinfofile" ] || return 1;
   115	    case "${1:-}" in 
   116	        dump)
   117	            grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
   118	        ;;
   119	        drop)
   120	            sed -i "/^${2:-}=/d" $Storeinfofile
   121	        ;;
   122	        test)
   123	            grep -q "^${2:-}=" $Storeinfofile
   124	        ;;
   125	        *)
   126	            debugnote "storeinfo(): ${1:-}";
   127	            grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && { 
   128	                sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
   129	            };
   130	            echo "${1:-}" >> $Storeinfofile
   131	        ;;
   132	    esac
   133	}
   134	storepid () 
   135	{ 
   136	    case "${1:-}" in 
   137	        dump)
   138	            grep -w "${2:-}" "$Storepidfile" | cut -d' ' -f1
   139	        ;;
   140	        test)
   141	            grep -q -w "${2:-}" "$Storepidfile"
   142	        ;;
   143	        *)
   144	            echo "${1:-NOPID}" "${2:-NONAME}" >> "$Storepidfile";
   145	            debugnote "storepid(): Stored pid '${1:-}' of '${2:-}': $(pspid ${1:-} ||:)"
   146	        ;;
   147	    esac
   148	}
   149	waitforlogentry () 
   150	{ 
   151	    local Startzeit Uhrzeit Dauer Count=0 Schlaf;
   152	    local Errorkeys="${4:-}";
   153	    local Warten="${5:-60}";
   154	    local Error=;
   155	    Startzeit="$(date +%s ||:)";
   156	    Startzeit="${Startzeit:-0}";
   157	    [ "$Warten" = "infinity" ] && Warten=32000;
   158	    debugnote "waitforlogentry(): ${1:-}: Waiting for logentry \"${3:-}\" in $(basename ${2:-})";
   159	    while ! grep -q "${3:-}" < "${2:-}"; do
   160	        Count="$(( $Count + 1 ))";
   161	        Uhrzeit="$(date +%s ||:)";
   162	        Uhrzeit="${Uhrzeit:-0}";
   163	        Dauer="$(( $Uhrzeit - $Startzeit ))";
   164	        Schlaf="$(( $Count / 10 ))";
   165	        [ "$Schlaf" = "0" ] && Schlaf="0.5";
   166	        mysleep "$Schlaf";
   167	        [ "$Dauer" -gt "10" ] && debugnote "waitforlogentry(): ${1:-}: Waiting since ${Dauer}s for log entry \"${3:-}\" in $(basename ${2:-})";
   168	        [ "$Dauer" -gt "$Warten" ] && error "waitforlogentry(): ${1:-}: Timeout waiting for entry \"${3:-}\" in $(basename ${2:-})
   169	  Last lines of $(basename ${2:-}):
   170	$(tail "${2:-}")";
   171	        [ "$Errorkeys" ] && grep -i -q -E "$Errorkeys" < "${2:-}" && error "waitforlogentry(): ${1:-}: Found error message in logfile.
   172	  Last lines of logfile $(basename ${2:-}):
   173	$(tail "${2:-}")";
   174	        rocknroll || { 
   175	            debugnote "waitforlogentry(): ${1:-}: Stopped waiting for ${3:-} in $(basename ${2:-}) due to terminating signal.";
   176	            Error=1;
   177	            break
   178	        };
   179	    done;
   180	    [ "$Error" ] && return 1;
   181	    debugnote "waitforlogentry(): ${1:-}: Found log entry \"${3:-}\" in $(basename ${2:-}).";
   182	    return 0
   183	}
   184	
   185	warning() {
   186	  echo "$*:WARNING"   | sed "s/\$/ /" >>$Messagefile
   187	}
   188	note() {
   189	  echo "$*:NOTE"      | sed "s/\$/ /" >>$Messagefile
   190	}
   191	verbose() {
   192	  echo "$*:VERBOSE"   | sed "s/\$/ /" >>$Messagefile
   193	}
   194	debugnote() {
   195	  echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
   196	}
   197	error() {
   198	  echo "$*:ERROR"     | sed "s/\$/ /" >>$Messagefile
   199	  exit 64
   200	}
   201	stdout() {
   202	  echo "$*:STDOUT"    | sed "s/\$/ /" >>$Messagefile
   203	}
   204	
   205	Cachefolder='/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621'
   206	Containercommand=""
   207	Imagename="pccastor_pbno9u_wallet:latest"
   208	Messagefile='/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/message.fifo'
   209	Newxenv=' DISPLAY=:168 XAUTHORITY=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X168 XDG_RUNTIME_DIR=/run/user/1000'
   210	export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games'
   211	Pythonbin='/usr/bin/python'
   212	Storeinfofile='/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/store.info'
   213	Storepidfile='/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/store.pids'
   214	Timetosaygoodbyefile='/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/timetosaygoodbye'
   215	Timetosaygoodbyefifo='/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/timetosaygoodbye.fifo'
   216	Xserver='--xvfb'
   217	Workdir=''
   218	
   219	Containerarchitecture=
   220	Containerid=
   221	Containerip=
   222	Dockerlogspid=''
   223	Exec=
   224	Entrypoint=
   225	Failure=
   226	Imagepull=
   227	Imageuser=
   228	Inspect=
   229	Line=
   230	Pid1pid=
   231	Runtime=
   232	Signal=
   233	debugnote 'Running dockerrc: Setup as root or as user docker on host.'
   234	
   235	
   236	# Check whether docker daemon is running, get docker info
   237	docker info >>/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/docker.info 2>>/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log  || {
   238	  error "'docker info' failed.
   239	  If using docker: Is docker daemon running at all?
   240	  Try to start docker daemon with 'systemctl start docker'.
   241	  Last lines of log:
   242	$(rmcr < '/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log' | tail)"
   243	}
   244	
   245	# Check default runtime
   246	Runtime="$( { grep 'Default Runtime' < '/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/docker.info' ||: ;} | awk '{print $3}' )"
   247	[ -n "$Runtime" ] && {
   248	  debugnote "dockerrc: Found default container Runtime: $Runtime"
   249	  debugnote "dockerrc: All $(grep 'Runtimes' < '/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/docker.info' ||: )"
   250	  [ "$Runtime" != '' ] && {
   251	    case $Runtime in
   252	      kata-runtime)  warning 'Found default container runtime kata-runtime.
   253	  Please run x11docker with --runtime=kata-runtime to avoid issues.' ;;
   254	      nvidia) [ 'no' = 'yes' ] &&  warning 'Option --gpu: Found default container runtime nvidia.
   255	  Please run x11docker with --runtime=nvidia to avoid issues.' ;;
   256	      runc|crun|oci) ;;
   257	      *) note "Found unknown container runtime: $Runtime
   258	  Please report at:  https://github.com/mviereck/x11docker" ;;
   259	    esac
   260	  }
   261	}
   262	Runtime='UNDECLARED_RUNTIME'
   263	debugnote "dockerrc: Container Runtime: $Runtime"
   264	storeinfo "runtime=$Runtime"
   265	
   266	# Refresh images.list for x11docker-gui
   267	docker images 2>>/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log | grep -v REPOSITORY | awk '{print $1 ":" $2}' >>/home/debian/.cache/x11docker/docker.imagelist.sort
   268	rmcr /home/debian/.cache/x11docker/docker.imagelist.sort
   269	while read -r Line ; do
   270	  grep -q "<none>" <<<$Line || echo $Line >> /home/debian/.cache/x11docker/docker.imagelist
   271	done < <(sort < /home/debian/.cache/x11docker/docker.imagelist.sort)
   272	rm /home/debian/.cache/x11docker/docker.imagelist.sort
   273	
   274	# Check if image pccastor_pbno9u_wallet:latest is available locally
   275	Imagepull=no
   276	
   277	rocknroll || exit 64
   278	
   279	[ "$Imagepull" = 'yes' ] && {
   280	  note "Pulling image 'pccastor_pbno9u_wallet:latest' from docker hub"
   281	  env DISPLAY='' DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/1000/bus' bash           -c "notify-send 'x11docker: Pulling image pccastor_pbno9u_wallet:latest'" 2>/dev/null &
   282	   docker pull pccastor_pbno9u_wallet:latest 1>&2 || error "Pulling image 'pccastor_pbno9u_wallet:latest' seems to have failed!"
   283	}
   284	
   285	rocknroll || exit 64
   286	
   287	Inspect="$(docker inspect pccastor_pbno9u_wallet:latest)"
   288	# Check architecture
   289	Containerarchitecture=$(parse_inspect "$Inspect" "Architecture")
   290	debugnote "dockerrc: Image architecture: $Containerarchitecture"
   291	# Check CMD
   292	[ -z "$Containercommand" ] && {
   293	  # extract image command from image if not given on cli
   294	  Containercommand="$(parse_inspect "$Inspect" "Config" "Cmd")"
   295	  debugnote "dockerrc: Image CMD: $Containercommand"
   296	  echo "$Containercommand" | grep -q /x11docker/containerrc && error 'Recursion error: Found CMD /x11docker/containerrc in image.
   297	  Did you use 'docker commit' with an x11docker container?
   298	  Please build new images with a Dockerfile instead of using docker commit,
   299	  or provide a different container command.'
   300	}
   301	
   302	# Check USER
   303	Imageuser="$(parse_inspect "$Inspect" "Config" "User")"
   304	debugnote "dockerrc: Image USER: $Imageuser"
   305	[ "$Imageuser" ] && note "Found 'USER $Imageuser' in image.
   306	  If you want to run with user $Imageuser instead of host user debian,
   307	  than run with --user=RETAIN."
   308	storeinfo containeruser="debian"
   309	
   310	# Check ENTRYPOINT
   311	Entrypoint="$(parse_inspect "$Inspect" "Config" "Entrypoint")"
   312	debugnote "dockerrc: Image ENTRYPOINT: $Entrypoint"
   313	echo "$Entrypoint" | grep -qE 'tini|init|systemd' && {
   314	  note "There seems to be an init system in ENTRYPOINT of image:
   315	    $Entrypoint
   316	  Will disable it as x11docker already runs an init with option --tini.
   317	  To allow this ENTRYPOINT, run x11docker with option --init=none."
   318	  Entrypoint=
   319	}
   320	
   321	# Check WORKDIR
   322	Workdir="$(parse_inspect "$Inspect" "Config" "Workdir")"
   323	debugnote "dockerrc: Image WORKDIR: $Workdir"
   324	[ "$Workdir" ] && note "Found 'WORKDIR $Workdir' in image. 
   325	  You can change it with option --workdir=DIR."
   326	
   327	[ -z "$Containercommand$Entrypoint" ] && error 'No container command specified and no CMD or ENTRYPOINT found in image.'
   328	
   329	######## Create containerrc ########
   330	
   331	{ echo '#! /bin/sh'
   332	  echo ''
   333	  echo '# containerrc'
   334	  echo '# Created startscript for docker run used as container command.'
   335	  echo '# Runs as unprivileged user in container.'
   336	  echo ''
   337	  echo 'exec >>/x11docker/container.log 2>&1'
   338	  echo ''
   339	  echo 'mysleep () 
   340	{ 
   341	    sleep "${1:-1}" 2> /dev/null || sleep 1
   342	}'
   343	  echo 'rocknroll () 
   344	{ 
   345	    [ -s "$Timetosaygoodbyefile" ] && return 1;
   346	    [ -e "$Timetosaygoodbyefile" ] || return 1;
   347	    return 0
   348	}'
   349	  echo 'saygoodbye () 
   350	{ 
   351	    debugnote "time to say goodbye ($*)";
   352	    [ -e "$Timetosaygoodbyefile" ] && echo timetosaygoodbye >> $Timetosaygoodbyefile;
   353	    [ -e "$Timetosaygoodbyefifo" ] && echo timetosaygoodbye >> $Timetosaygoodbyefifo
   354	}'
   355	  echo 'storeinfo () 
   356	{ 
   357	    [ -e "$Storeinfofile" ] || return 1;
   358	    case "${1:-}" in 
   359	        dump)
   360	            grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
   361	        ;;
   362	        drop)
   363	            sed -i "/^${2:-}=/d" $Storeinfofile
   364	        ;;
   365	        test)
   366	            grep -q "^${2:-}=" $Storeinfofile
   367	        ;;
   368	        *)
   369	            debugnote "storeinfo(): ${1:-}";
   370	            grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && { 
   371	                sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
   372	            };
   373	            echo "${1:-}" >> $Storeinfofile
   374	        ;;
   375	    esac
   376	}'
   377	  echo 'waitforlogentry () 
   378	{ 
   379	    local Startzeit Uhrzeit Dauer Count=0 Schlaf;
   380	    local Errorkeys="${4:-}";
   381	    local Warten="${5:-60}";
   382	    local Error=;
   383	    Startzeit="$(date +%s ||:)";
   384	    Startzeit="${Startzeit:-0}";
   385	    [ "$Warten" = "infinity" ] && Warten=32000;
   386	    debugnote "waitforlogentry(): ${1:-}: Waiting for logentry \"${3:-}\" in $(basename ${2:-})";
   387	    while ! grep -q "${3:-}" < "${2:-}"; do
   388	        Count="$(( $Count + 1 ))";
   389	        Uhrzeit="$(date +%s ||:)";
   390	        Uhrzeit="${Uhrzeit:-0}";
   391	        Dauer="$(( $Uhrzeit - $Startzeit ))";
   392	        Schlaf="$(( $Count / 10 ))";
   393	        [ "$Schlaf" = "0" ] && Schlaf="0.5";
   394	        mysleep "$Schlaf";
   395	        [ "$Dauer" -gt "10" ] && debugnote "waitforlogentry(): ${1:-}: Waiting since ${Dauer}s for log entry \"${3:-}\" in $(basename ${2:-})";
   396	        [ "$Dauer" -gt "$Warten" ] && error "waitforlogentry(): ${1:-}: Timeout waiting for entry \"${3:-}\" in $(basename ${2:-})
   397	  Last lines of $(basename ${2:-}):
   398	$(tail "${2:-}")";
   399	        [ "$Errorkeys" ] && grep -i -q -E "$Errorkeys" < "${2:-}" && error "waitforlogentry(): ${1:-}: Found error message in logfile.
   400	  Last lines of logfile $(basename ${2:-}):
   401	$(tail "${2:-}")";
   402	        rocknroll || { 
   403	            debugnote "waitforlogentry(): ${1:-}: Stopped waiting for ${3:-} in $(basename ${2:-}) due to terminating signal.";
   404	            Error=1;
   405	            break
   406	        };
   407	    done;
   408	    [ "$Error" ] && return 1;
   409	    debugnote "waitforlogentry(): ${1:-}: Found log entry \"${3:-}\" in $(basename ${2:-}).";
   410	    return 0
   411	}'
   412	  echo '
   413	warning() {
   414	  echo "$*:WARNING"   | sed "s/\$/ /" >>$Messagefile
   415	}
   416	note() {
   417	  echo "$*:NOTE"      | sed "s/\$/ /" >>$Messagefile
   418	}
   419	verbose() {
   420	  echo "$*:VERBOSE"   | sed "s/\$/ /" >>$Messagefile
   421	}
   422	debugnote() {
   423	  echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
   424	}
   425	error() {
   426	  echo "$*:ERROR"     | sed "s/\$/ /" >>$Messagefile
   427	  exit 64
   428	}
   429	stdout() {
   430	  echo "$*:STDOUT"    | sed "s/\$/ /" >>$Messagefile
   431	}'
   432	  echo 'Messagefile=/x11docker/message.fifo'
   433	  echo 'Storeinfofile=/x11docker/store.info'
   434	  echo 'Timetosaygoodbyefile=/x11docker/timetosaygoodbye'
   435	  echo ''
   436	  echo 'waitforlogentry containerrc $Storeinfofile containerrootrc=ready  infinity'
   437	  echo 'debugnote "Running containerrc: Unprivileged user commands in container"'
   438	  echo ''
   439	  echo "Containercommand=\"$Containercommand\""
   440	  echo "Entrypoint=\"$Entrypoint\""
   441	  echo ''
   442	  echo 'verbose "containerrc: Container system:'
   443	  echo '$(cat /etc/os-release 2>&1 ||:)"'
   444	  echo ''
   445	} >> /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/containerrc
   446	{
   447	  echo ''
   448	  echo '# USER and HOME'
   449	  echo 'Containeruser="$(storeinfo dump containeruser)"'
   450	  echo 'Containeruserhome="/home/debian"'
   451	  echo 'export USER="$Containeruser"'
   452	  echo '[ "$Containeruserhome" ] && {'
   453	  echo '  export HOME="$Containeruserhome"'
   454	  echo '}'
   455	  echo ''
   456	  echo '# XDG_RUNTIME_DIR'
   457	  echo 'Containeruseruid=$(id -u $Containeruser)'
   458	  echo 'export XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR'
   459	  echo '[ -e /run/user/$Containeruseruid ] && ln -s /run/user/$Containeruseruid $XDG_RUNTIME_DIR || mkdir -p -m700 $XDG_RUNTIME_DIR'
   460	  echo ''
   461	  echo '# Copy files from /etc/skel into empty HOME'
   462	  echo '[ -d "$HOME" ] && {'
   463	  echo '  [ -d /etc/skel ] && [ -z "$(ls -A "$Containeruserhome" 2>/dev/null | grep -v -E "gnupg")" ] && {'
   464	  echo '    debugnote "containerrc: HOME is empty. Copying from /etc/skel"'
   465	  echo '    cp -n -R /etc/skel/. $Containeruserhome'
   466	  echo '    :'
   467	  echo '  } || {'
   468	  echo '    debugnote "containerrc: HOME is not empty. Not copying from /etc/skel"'
   469	  echo '  }'
   470	  echo '}'
   471	  echo ''
   472	  echo '# Create softlink to X unix socket'
   473	  echo '[ -e /tmp/.X11-unix/X168 ] || ln -s /X168 /tmp/.X11-unix'
   474	  echo ''
   475	  echo 'unset WAYLAND_DISPLAY'
   476	  echo ''
   477	  echo 'export XDG_SESSION_TYPE=x11'
   478	  echo ''
   479	  echo ''
   480	  echo 'export TERM=xterm'
   481	  echo 'storeinfo test locale && export LANG="$(storeinfo dump locale)"'
   482	  echo '[ -e "/usr/share/zoneinfo/UCT" ] || export TZ=UTC-00'
   483	  echo '[ "$(date -Ihours)" != "2022-03-05T11+00:00" ] && export TZ=UTC-00'
   484	  echo '[ "$DEBIAN_FRONTEND" = noninteractive ] && unset DEBIAN_FRONTEND && export DEBIAN_FRONTEND'
   485	  echo '[ "$DEBIAN_FRONTEND" = newt ]           && unset DEBIAN_FRONTEND && export DEBIAN_FRONTEND'
   486	  echo '# container environment (--env)'
   487	  echo "export 'container=docker'"
   488	  echo "export 'XAUTHORITY=/x11docker/Xauthority.client'"
   489	  echo "export 'DISPLAY=:168'"
   490	  echo "export 'PULSE_COOKIE=/x11docker/pulseaudio.cookie'"
   491	  echo "export 'PULSE_SERVER=unix:/x11docker/pulseaudio.socket'"
   492	  echo "export 'HOME=/home/debian'"
   493	  echo "export 'USER=debian'"
   494	  echo ''
   495	  echo '[ -d "$HOME" ] && cd "$HOME"'
   496	  [ "$Workdir" ] && echo "[ -d \"$Workdir\" ] && cd \"$Workdir\"    # WORKDIR in image"
   497	  echo ''
   498	  echo ''
   499	  echo 'env >> /x11docker/container.environment'
   500	  echo 'verbose "Container environment:'
   501	  echo '$(env | sort)"'
   502	  echo ''
   503	  echo 'tail -f /x11docker/stdout     2>/dev/null &'
   504	  echo 'tail -f /x11docker/stderr >&2 2>/dev/null &'
   505	  echo "exec \$Dbus sh /x11docker/cmdrc >>/x11docker/stdout 2>>/x11docker/stderr"
   506	} >> /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/containerrc
   507	######## End of containerrc ########
   508	
   509	# Write containerrc into x11docker.log
   510	nl -ba >> /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/x11docker.log < /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/containerrc
   511	
   512	######## Create cmdrc ########
   513	{ echo '#! /bin/sh'
   514	  echo '# Created startscript for cmdrc containing final container command'
   515	  echo ''
   516	  echo 'storeinfo () 
   517	{ 
   518	    [ -e "$Storeinfofile" ] || return 1;
   519	    case "${1:-}" in 
   520	        dump)
   521	            grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
   522	        ;;
   523	        drop)
   524	            sed -i "/^${2:-}=/d" $Storeinfofile
   525	        ;;
   526	        test)
   527	            grep -q "^${2:-}=" $Storeinfofile
   528	        ;;
   529	        *)
   530	            debugnote "storeinfo(): ${1:-}";
   531	            grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && { 
   532	                sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
   533	            };
   534	            echo "${1:-}" >> $Storeinfofile
   535	        ;;
   536	    esac
   537	}'
   538	  echo '
   539	warning() {
   540	  echo "$*:WARNING"   | sed "s/\$/ /" >>$Messagefile
   541	}
   542	note() {
   543	  echo "$*:NOTE"      | sed "s/\$/ /" >>$Messagefile
   544	}
   545	verbose() {
   546	  echo "$*:VERBOSE"   | sed "s/\$/ /" >>$Messagefile
   547	}
   548	debugnote() {
   549	  echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
   550	}
   551	error() {
   552	  echo "$*:ERROR"     | sed "s/\$/ /" >>$Messagefile
   553	  exit 64
   554	}
   555	stdout() {
   556	  echo "$*:STDOUT"    | sed "s/\$/ /" >>$Messagefile
   557	}'
   558	  echo 'Messagefile=/x11docker/message.fifo'
   559	  echo 'Storeinfofile="/x11docker/store.info"'
   560	  echo ''
   561	  echo "debugnote \"cmdrc: Running container command: 
   562	  $Entrypoint $Containercommand
   563	  \""
   564	  echo ''
   565	  echo "$Entrypoint $Containercommand  "
   566	  echo "storeinfo cmdexitcode=\$?"
   567	  echo ''
   568	  echo '[ -h "$Homesoftlink" ] && rm $Homesoftlink'
   569	} >> /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/cmdrc
   570	######## End of cmdrc ########
   571	
   572	# Write cmdrc into x11docker.log
   573	nl -ba >> /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/x11docker.log < /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/cmdrc
   574	
   575	# Send signal to run X and wait for X to be ready
   576	storeinfo readyforX=ready
   577	waitforlogentry 'dockerrc' /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/xinit.log 'xinitrc is ready' 'xinit: giving up|unable to connect to X server|Connection refused|server error|Only console users are allowed'
   578	
   579	rocknroll || exit 64
   580	
   581	#### run docker image ####
   582	read Containerid < <(docker run --detach --tty \
   583	  --name x11docker_X168_pccastor_pbno9u_wallet-latest_80718103621 \
   584	  --user 1000:1000 \
   585	  --userns=host \
   586	  --security-opt label=type:container_runtime_t \
   587	  --volume '/usr/bin/docker-init':'/usr/local/bin/init':ro \
   588	  --tmpfs /run:exec --tmpfs /run/lock \
   589	  --volume '/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share':'/x11docker':rw \
   590	  --volume '/home/debian/.local/share/x11docker/pccastor_pbno9u_wallet':'/home/debian':rw \
   591	  --volume '/tmp/.X11-unix/X168':'/X168':rw \
   592	  --volume /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/pulseaudio.client.conf:/etc/pulse/client.conf:ro \
   593	  --workdir '/tmp' \
   594	  --entrypoint env \
   595	  --env 'container=docker' \
   596	  --env 'XAUTHORITY=/x11docker/Xauthority.client' \
   597	  --env 'DISPLAY=:168' \
   598	  --env 'PULSE_COOKIE=/x11docker/pulseaudio.cookie' \
   599	  --env 'PULSE_SERVER=unix:/x11docker/pulseaudio.socket' \
   600	  --env 'HOME=/home/debian' \
   601	  --env 'USER=debian' \
   602	  -- pccastor_pbno9u_wallet:latest /usr/local/bin/init -- /bin/sh - /x11docker/containerrc 2>>/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log | rmcr)
   603	##########################
   604	
   605	
   606	[ "$Containerid" ] || {
   607	    error "Startup of docker failed. Did not receive a container ID.
   608	    
   609	  Last lines of container log:
   610	$(rmcr < /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log | tail)"
   611	}
   612	storeinfo containerid="$Containerid"
   613	# Wait for container to be ready
   614	for ((Count=1 ; Count<=40 ; Count++)); do
   615	  docker exec x11docker_X168_pccastor_pbno9u_wallet-latest_80718103621 sh -c : 2>&1 | rmcr >>/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log && { debugnote 'dockerrc: Container is up and running.' ; break ; } || debugnote "dockerrc: Container not ready on $Count. attempt, trying again."
   616	  rocknroll || exit 64
   617	  mysleep 0.1
   618	done
   619	
   620	# Wait for pid 1 in container
   621	for ((Count=1 ; Count<=40 ; Count++)); do
   622	  Inspect="$(docker inspect x11docker_X168_pccastor_pbno9u_wallet-latest_80718103621 2>>/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log | rmcr)"
   623	  [ "$Inspect" != "[]" ] && Pid1pid="$(parse_inspect "$Inspect" "State" "Pid")"
   624	  debugnote "dockerrc: $Count. check for PID 1: $Pid1pid"
   625	  checkpid "$Pid1pid" && break
   626	  rocknroll || exit 64
   627	  mysleep 0.1
   628	done
   629	[ "$Pid1pid" = "0" ] && Pid1pid=""
   630	[ -z "$Pid1pid" ] && error "dockerrc(): Did not receive PID of PID1 in container.
   631	  Maybe the container immediately stopped for unknown reasons.
   632	  Just in case, check if host and image architecture are compatible:
   633	  Host architecture: amd64 (x86_64), image architecture: $Containerarchitecture.
   634	  Output of \"docker ps | grep x11docker\":
   635	$(docker ps | grep x11docker)
   636	  
   637	  Content of container log:
   638	$(rmcr < /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log | uniq )"
   639	storeinfo pid1pid="$Pid1pid"
   640	
   641	# Get IP of container
   642	Containerip="$(parse_inspect "$Inspect" "NetworkSettings" "IPAddress")"
   643	storeinfo containerip=$Containerip
   644	
   645	# Check log for startup failure
   646	Failure="$(rmcr < /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log | grep -v grep | grep -E 'Error response from daemon|OCI runtime exec' ||:)"
   647	[ "$Failure" ] && {
   648	  echo "$Failure" >>/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log
   649	  error "Got error message from docker:
   650	$Failure
   651	
   652	  Last lines of logfile:
   653	$(tail /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log)"
   654	}
   655	
   656	debugnote 'dockerrc(): Starting containerrootrc with docker exec'
   657	# copy containerrootrc inside of container to avoid possible noexec of host home.
   658	docker exec x11docker_X168_pccastor_pbno9u_wallet-latest_80718103621 sh -c 'cp /x11docker/containerrootrc /tmp/containerrootrc ; chmod 644 /tmp/containerrootrc' 2>&1 | rmcr >>/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log
   659	# run container root setup. containerrc will wait until setup script is ready.
   660	docker exec -u root x11docker_X168_pccastor_pbno9u_wallet-latest_80718103621 /bin/sh /tmp/containerrootrc 2>&1 | rmcr >>/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log
   661	
   662	storeinfo dockerrc=ready
   663	
   664	[ "$Containerid" ] && {
   665	  # wait for signal of finish()
   666	  read Signal </home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/dockerrc.stopfifo
   667	  [ "$Signal" = "stop" ] && {
   668	    [ "$Containerid" ]   && docker stop $Containerid     >> /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log 2>&1 &
   669	    [ "$Dockerlogspid" ] && kill $Dockerlogspid              >> /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/container.log 2>&1 &
   670	  }
   671	} & storepid $! dockerstopshell
   672	exit 0

x11docker[11:45:22,008]: Generated containerrootrc:
     1	#! /bin/sh
     2	
     3	# containerrootrc
     4	# This Script is executed as root in container.
     5	# - Create container user
     6	# - Time zone
     7	# - Install NVIDIA driver if requested
     8	# - Set up init system services and DBus for --init=systemd|openrc|runit|sysvinit
     9	
    10	# redirect output to have it available before 'docker logs' starts. --init=runit (void) would eat up the output at all for unknown reasons.
    11	exec 1>>/x11docker/container.log 2>&1
    12	
    13	storeinfo () 
    14	{ 
    15	    [ -e "$Storeinfofile" ] || return 1;
    16	    case "${1:-}" in 
    17	        dump)
    18	            grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
    19	        ;;
    20	        drop)
    21	            sed -i "/^${2:-}=/d" $Storeinfofile
    22	        ;;
    23	        test)
    24	            grep -q "^${2:-}=" $Storeinfofile
    25	        ;;
    26	        *)
    27	            debugnote "storeinfo(): ${1:-}";
    28	            grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && { 
    29	                sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
    30	            };
    31	            echo "${1:-}" >> $Storeinfofile
    32	        ;;
    33	    esac
    34	}
    35	rocknroll () 
    36	{ 
    37	    [ -s "$Timetosaygoodbyefile" ] && return 1;
    38	    [ -e "$Timetosaygoodbyefile" ] || return 1;
    39	    return 0
    40	}
    41	
    42	warning() {
    43	  echo "$*:WARNING"   | sed "s/\$/ /" >>$Messagefile
    44	}
    45	note() {
    46	  echo "$*:NOTE"      | sed "s/\$/ /" >>$Messagefile
    47	}
    48	verbose() {
    49	  echo "$*:VERBOSE"   | sed "s/\$/ /" >>$Messagefile
    50	}
    51	debugnote() {
    52	  echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
    53	}
    54	error() {
    55	  echo "$*:ERROR"     | sed "s/\$/ /" >>$Messagefile
    56	  exit 64
    57	}
    58	stdout() {
    59	  echo "$*:STDOUT"    | sed "s/\$/ /" >>$Messagefile
    60	}
    61	Messagefile=/x11docker/message.fifo
    62	Storeinfofile='/x11docker/store.info'
    63	Timetosaygoodbyefile=/x11docker/timetosaygoodbye
    64	
    65	debugnote 'Running containerrootrc: Setup as root in container'
    66	
    67	Error=''
    68	for Line in cat chmod chown cut cd cp date echo env export grep id ln ls mkdir mv printf rm sed sh sleep tail touch; do
    69	  command -v "$Line" || {
    70	    warning "ERROR: Command not found in image: $Line"
    71	    Error=1
    72	  }
    73	done
    74	[ "$Error" ] && error 'Commands for container setup missing in image.
    75	  You can try with option --no-setup to avoid this error.'
    76	
    77	# Check type of libc
    78	ldd --version 2>&1 | grep -q 'musl libc' && Containerlibc='musl'
    79	ldd --version 2>&1 | grep -q -E 'GLIBC|GNU libc'  && Containerlibc='glibc'
    80	debugnote "containerrootrc: Container libc: $Containerlibc"
    81	
    82	# Prepare X environment
    83	# Create some system dirs with needed permissions
    84	mkdir -v -p /var/lib/dbus /var/run/dbus
    85	mkdir -v -p -m 1777 /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix
    86	chmod -c 1777 /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix
    87	export DISPLAY=:168 XAUTHORITY=/x11docker/Xauthority.client
    88	
    89	# workaround: autostart of xrandr for some desktops like deepin, cinnamon and gnome to fix wrong autoresize
    90	echo '#! /bin/sh
    91	Output=$(xrandr | grep ' connected' | cut -d" " -f1)
    92	Mode=1980x1200
    93	xrandr --output $Output --mode $Mode\n' > /usr/local/bin/x11docker-xrandr
    94	chmod +x /usr/local/bin/x11docker-xrandr
    95	mkdir -p /etc/xdg/autostart
    96	echo '[Desktop Entry]
    97	Encoding=UTF-8
    98	Version=0.9.4
    99	Type=Application
   100	Name=x11docker-xrandr
   101	Comment=
   102	Exec=/usr/local/bin/x11docker-xrandr
   103	' > /etc/xdg/autostart/x11docker-xrandr.desktop
   104	
   105	# Time zone
   106	[ ! -d /usr/share/zoneinfo ] && [ "$Containerlibc" = "glibc" ] && {
   107	  mkdir -p /usr/share/zoneinfo
   108	  cp '/x11docker/libc.localtime' '/usr/share/zoneinfo/UCT'
   109	}
   110	[ -e '/usr/share/zoneinfo/UCT' ] && ln -f -s '/usr/share/zoneinfo/UCT' /etc/localtime
   111	
   112	# Container system
   113	Containersystem="$(grep '^ID=' /etc/os-release 2>/dev/null | cut -d= -f2 || echo 'unknown')"
   114	verbose "Container system ID: $Containersystem"
   115	
   116	# Environment variables
   117	export 'container=docker'
   118	export 'XAUTHORITY=/x11docker/Xauthority.client'
   119	export 'DISPLAY=:168'
   120	export 'PULSE_COOKIE=/x11docker/pulseaudio.cookie'
   121	export 'PULSE_SERVER=unix:/x11docker/pulseaudio.socket'
   122	export 'HOME=/home/debian'
   123	export 'USER=debian'
   124	
   125	# Check container user
   126	Containeruser="$(storeinfo dump containeruser)"
   127	Containeruser="${Containeruser:-debian}"
   128	
   129	Containeruserhome='/home/debian'
   130	# Create user entry in /etc/passwd (and delete possibly existing same uid)
   131	cat /etc/passwd | grep -v ':1000:' > /tmp/passwd
   132	
   133	# Disable possible /etc/shadow passwords for other users
   134	sed -i 's%:x:%:-:%' /tmp/passwd
   135	bash --version >/dev/null 2>&1 && Containerusershell=/bin/bash || Containerusershell=/bin/sh
   136	Containeruserentry="debian:x:1000:1000:debian,,,:/home/debian:$Containerusershell"
   137	debugnote "containerrootrc: $Containeruserentry"
   138	echo "$Containeruserentry" >> /tmp/passwd
   139	
   140	rm /etc/passwd
   141	mv /tmp/passwd /etc/passwd || warning 'Unable to change /etc/passwd. That may be a security risk.'
   142	
   143	# Create password entry for container user in /etc/shadow
   144	rm -v /etc/shadow || warning 'Cannot change /etc/shadow. That may be a security risk.'
   145	echo "debian:sac19FwGGTx/A:17293:0:99999:7:::" > /etc/shadow
   146	echo 'root:*:17219:0:99999:7:::' >> /etc/shadow
   147	chmod 640 /etc/shadow   # can fail depending on available capabilities
   148	
   149	# Create user group entry (and delete possibly existing same gid)
   150	cat /etc/group | grep -v ':1000:'    > /tmp/group
   151	echo "debian:x:1000:" >> /tmp/group
   152	mv /tmp/group /etc/group
   153	
   154	# Create /etc/sudoers, delete /etc/sudoers.d. Overwrite possible sudo setups in image.
   155	[ -e /etc/sudoers.d ] && rm -v -R /etc/sudoers.d
   156	[ -e /etc/sudoers ]   && rm -v /etc/sudoers
   157	echo '# /etc/sudoers created by x11docker' > /etc/sudoers
   158	echo 'Defaults	env_reset'                >> /etc/sudoers
   159	echo 'root ALL=(ALL) ALL'                 >> /etc/sudoers
   160	
   161	# Restrict PAM configuration of su and sudo
   162	mkdir -p /etc/pam.d
   163	[ -e /etc/pam.d/sudo ] && rm -v /etc/pam.d/sudo
   164	case "$Containersystem" in
   165	  fedora)
   166	    echo '#%PAM-1.0' > /etc/pam.d/su
   167	    echo 'auth     sufficient pam_rootok.so'  >> /etc/pam.d/su
   168	    echo 'account  sufficient pam_succeed_if.so uid = 0 use_uid quiet'  >> /etc/pam.d/su
   169	    echo 'session  include system-auth'       >> /etc/pam.d/su
   170	  ;;
   171	  *)
   172	    echo '#%PAM-1.0' > /etc/pam.d/su
   173	    echo 'auth sufficient pam_rootok.so' >> /etc/pam.d/su  # allow root to switch user without a password
   174	    echo '@include common-auth'          >> /etc/pam.d/su
   175	    echo '@include common-account'       >> /etc/pam.d/su
   176	    echo '@include common-session'       >> /etc/pam.d/su
   177	  ;;
   178	esac
   179	
   180	# Set up container user groups
   181	# Create HOME
   182	[ -e "$Containeruserhome" ] || {
   183	  mkdir -v -p "$(dirname "$Containeruserhome")"
   184	  mkdir -v -m 777 "$Containeruserhome"
   185	  chown -v "$Containeruser":"$Containerusergroup" "$Containeruserhome" && chmod -v 755 "$Containeruserhome"  # can fail depending on capabilities
   186	}
   187	ls -la $Containeruserhome
   188	
   189	rocknroll || exit 64
   190	
   191	
   192	# disable getty in inittab
   193	[ -e /etc/inittab ] && sed -i 's/.*getty/##getty disabled by x11docker## \0/' /etc/inittab
   194	
   195	
   196	rocknroll || exit 64
   197	
   198	# --lang: Language locale
   199	verbose "Searching for language locale matching fr"
   200	Locales="$(locale -a)"
   201	Langall="$(cat /usr/share/i18n/SUPPORTED | grep -E 'UTF-8|utf8' | cut -d' ' -f1 | cut -d. -f1 | cut -d@ -f1 | sort | uniq)"
   202	Langland="$(echo fr | cut -d. -f1)"
   203	Langcontainer=''
   204	
   205	echo "$Langland" | grep -q '_' || {
   206	  Langland="$(echo $Langland | tr '[:upper:]' '[:lower:]')_$(echo $Langland | tr '[:lower:]' '[:upper:]')"
   207	  echo "$Langall" | grep -q "$Langland" || {
   208	    echo "$Langall" | grep -i -q "fr" && {
   209	      Langland="$(echo "$Langall" | grep -i -m1 "fr")"
   210	    }
   211	  }
   212	}
   213	
   214	Langland="$(echo "$Langland" | cut -d_ -f1 | tr '[:upper:]' '[:lower:]')_$(echo "$Langland" | cut -d_ -f2 | tr '[:lower:]' '[:upper:]')"
   215	
   216	echo "$Locales" | grep -q "$Langland.UTF-8" && Langcontainer="$Langland.UTF-8"
   217	echo "$Locales" | grep -q "$Langland.utf8"  && Langcontainer="$Langland.utf8"
   218	
   219	[ -z "$Langcontainer" ] && {
   220	  [ -e /usr/share/i18n/SUPPORTED ] || note "Option --lang: /usr/share/i18n/SUPPORTED not found.
   221	  Please install package 'locales' in image (belongs to glibc).
   222	  Look here to find a package for your image system:
   223	  https://github.com/mviereck/x11docker/wiki/dependencies#dependencies-in-image"
   224	
   225	  Langcontainer="$Langland.utf8"
   226	  note "Option --lang: Generating language locale $Langcontainer".
   227	
   228	  command -v localedef >/dev/null || note 'Option --lang: Command localedef not found in image.
   229	  Need it for language locale creation.
   230	  Look here to find a package for your image system:
   231	  https://github.com/mviereck/x11docker/wiki/dependencies#dependencies-in-image'
   232	  localedef --verbose --force -i "$Langland" -f UTF-8 $Langcontainer || verbose "localedef exit code: $?"
   233	
   234	  locale -a | grep -q "$Langcontainer" || {
   235	    note "Option --lang: Generation of locale $Langcontainer failed."
   236	    Langcontainer=''
   237	  }
   238	} || {
   239	  debugnote "Option --lang: Found locale in image: $Langcontainer"
   240	}
   241	
   242	[ "$Langcontainer" ] && {
   243	  storeinfo locale="$Langcontainer"
   244	  echo "LANG=$Langcontainer" > /etc/default/locale
   245	} || note 'Option --lang: Desired locale for 'fr' not found and not generated.'
   246	
   247	debugnote "Option --lang: Output of locale -a:
   248	$(locale -a)"
   249	
   250	rocknroll || exit 64
   251	
   252	storeinfo containerrootrc=ready
   253	

x11docker[11:45:22,030]: Generated xinitrc:
     1	#! /bin/sh
     2	disable_xhost () 
     3	{ 
     4	    local Line=;
     5	    command -v xhost > /dev/null || { 
     6	        warning "Command 'xhost' not found.
     7	  Can not check for possibly allowed network access to X.
     8	  Please install 'xhost'.";
     9	        return 1
    10	    };
    11	    xhost 2>&1 | tail -n +2 /dev/stdin | while read -r Line; do
    12	        debugnote "xhost: Removing entry $Line";
    13	        xhost -$Line;
    14	    done;
    15	    xhost -;
    16	    [ "$(xhost 2>&1 | wc -l)" -gt "1" ] && { 
    17	        warning "Remaining xhost permissions found on display ${DISPLAY:-}
    18	$(xhost 2>&1 )";
    19	        return 1
    20	    };
    21	    xhost 2>&1 | grep "access control disabled" && { 
    22	        warning "Failed to restrict xhost permissions.
    23	  Access to display ${DISPLAY:-} is allowed for everyone.";
    24	        return 1
    25	    };
    26	    return 0
    27	}
    28	pspid () 
    29	{ 
    30	    LC_ALL=C ps -p "${1:-}" 2> /dev/null | grep -v 'TIME'
    31	}
    32	rocknroll () 
    33	{ 
    34	    [ -s "$Timetosaygoodbyefile" ] && return 1;
    35	    [ -e "$Timetosaygoodbyefile" ] || return 1;
    36	    return 0
    37	}
    38	storeinfo () 
    39	{ 
    40	    [ -e "$Storeinfofile" ] || return 1;
    41	    case "${1:-}" in 
    42	        dump)
    43	            grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
    44	        ;;
    45	        drop)
    46	            sed -i "/^${2:-}=/d" $Storeinfofile
    47	        ;;
    48	        test)
    49	            grep -q "^${2:-}=" $Storeinfofile
    50	        ;;
    51	        *)
    52	            debugnote "storeinfo(): ${1:-}";
    53	            grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && { 
    54	                sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
    55	            };
    56	            echo "${1:-}" >> $Storeinfofile
    57	        ;;
    58	    esac
    59	}
    60	storepid () 
    61	{ 
    62	    case "${1:-}" in 
    63	        dump)
    64	            grep -w "${2:-}" "$Storepidfile" | cut -d' ' -f1
    65	        ;;
    66	        test)
    67	            grep -q -w "${2:-}" "$Storepidfile"
    68	        ;;
    69	        *)
    70	            echo "${1:-NOPID}" "${2:-NONAME}" >> "$Storepidfile";
    71	            debugnote "storepid(): Stored pid '${1:-}' of '${2:-}': $(pspid ${1:-} ||:)"
    72	        ;;
    73	    esac
    74	}
    75	
    76	warning() {
    77	  echo "$*:WARNING"   | sed "s/\$/ /" >>$Messagefile
    78	}
    79	note() {
    80	  echo "$*:NOTE"      | sed "s/\$/ /" >>$Messagefile
    81	}
    82	verbose() {
    83	  echo "$*:VERBOSE"   | sed "s/\$/ /" >>$Messagefile
    84	}
    85	debugnote() {
    86	  echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
    87	}
    88	error() {
    89	  echo "$*:ERROR"     | sed "s/\$/ /" >>$Messagefile
    90	  exit 64
    91	}
    92	stdout() {
    93	  echo "$*:STDOUT"    | sed "s/\$/ /" >>$Messagefile
    94	}
    95	getscreensize() {
    96	  CurrentXaxis="$(xrandr | grep primary | cut -d' ' -f4 | cut -dx -f1 )"
    97	  CurrentYaxis="$(xrandr | grep primary | cut -d' ' -f4 | cut -dx -f2 | cut -d+ -f1)"
    98	}
    99	checkscreensize() {
   100	  getscreensize
   101	  [ "$Xaxis" = "$CurrentXaxis" ] || return 1
   102	  [ "$Yaxis" = "$CurrentYaxis" ] || return 1
   103	  return 0
   104	}
   105	getprimary() {
   106	  xrandr | grep -q primary || xrandr --output $(xrandr | grep ' connected' | head -n1 | cut -d' ' -f1) --primary
   107	  echo $(xrandr | grep primary | cut -d' ' -f1)
   108	}
   109	
   110	Messagefile='/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/message.fifo'
   111	Output="$(getprimary)"
   112	Storeinfofile='/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/store.info'
   113	Storepidfile='/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/store.pids'
   114	Timetosaygoodbyefile='/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/timetosaygoodbye'
   115	
   116	export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games'
   117	
   118	Cookie=''
   119	Line=''
   120	Var=''
   121	
   122	debugnote 'Running xinitrc'
   123	
   124	export  DISPLAY=:168 XAUTHORITY=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X168 XDG_RUNTIME_DIR=/run/user/1000
   125	# background color
   126	xsetroot -solid '#7F7F7F' 2>/dev/null
   127	
   128	# create new XAUTHORITY cookies
   129	:> /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client
   130	
   131	echo 'Requesting trusted cookie from X server'
   132	xauth -v -i -f /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client generate :168 . trusted timeout 3600
   133	
   134	[ -s '/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client' ] || { 
   135	  [ 'trusted' = 'untrusted' ] && note 'Could not create untrusted cookie. 
   136	  Maybe your X server misses extension SECURITY.'
   137	}
   138	[ -s '/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client' ] || { 
   139	  # still no cookie? try to create one without extension security
   140	  debugnote 'xinitrc: Failed to retrieve trusted cookie from X server. Will bake one myself.'
   141	  echo 'Failed to retrieve trusted cookie from X server. Will bake one myself.'
   142	  xauth -v -i -f /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client add :168 . 55ba6e6e14039807badc6a00b4c6ef84
   143	  ls -l /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client
   144	}
   145	
   146	# Prepare cookie with localhost identification disabled by ffff, needed if X socket is shared. ffff means 'familiy wild'
   147	Cookie="$(xauth -i -f /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client nlist | sed -e 's/^..../ffff/')"
   148	echo "$Cookie" | xauth -v -i -f /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client nmerge -
   149	
   150	debugnote "xinitrc: Created cookie: $(xauth -f /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client list 2>&1)"
   151	ls -l /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client
   152	cp /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/Xauthority.server
   153	chmod 644 /home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client
   154	
   155	[ -s '/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client' ] || warning 'Cookie creation failed!'
   156	export XAUTHORITY=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client
   157	[ 'yes' = 'no' ] || [ ! -s '/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client' ] && unset XAUTHORITY && warning '--xvfb: X server :168 runs without cookie authentication.'
   158	
   159	# clean xhost
   160	verbose 'Disabling any possible access to new X server possibly granted by xhost'
   161	disable_xhost
   162	
   163	# Keyboard layout
   164	
   165	# create set of different screen resolutions
   166	xrandr --newmode "1984x1200" 199.25 1984 2120 2328 2672 1200 1203 1213 1245 -hsync +vsync
   167	xrandr --addmode $Output "1984x1200"
   168	while read Line; do
   169	  Line="$(echo "$Line" | sed 's/Modeline//g')"
   170	  Line="$(echo "$Line" | sed 's/"//g')"
   171	  xrandr --newmode $Line 2>/dev/null
   172	  xrandr --addmode "$Output" $(echo $Line | cut -d' ' -f1) 2>/dev/null
   173	done < "/home/debian/.cache/x11docker/modelines.1980x1200"
   174	
   175	
   176	verbose "Output of xrandr on :168
   177	$(xrandr)"
   178	
   179	echo 'xinitrc: xinitrc is ready'
   180	storeinfo xinitrc=ready
   181	
   182	# wait for the end
   183	read Var </home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/timetosaygoodbye.fifo

DEBUGNOTE[11:45:22,056]: Running xtermrc: Ask for password if needed (no)
DEBUGNOTE[11:45:22,080]: Running dockerrc: Setup as root or as user docker on host.
DEBUGNOTE[11:45:22,100]: storepid(): Stored pid '15238' of 'containershell': 15238 ?        00:00:00 bash
DEBUGNOTE[11:45:22,112]: waitforlogentry(): start_xserver(): Waiting for logentry "readyforX=ready" in store.info
DEBUGNOTE[11:45:22,236]: dockerrc: Found default container Runtime: runc
DEBUGNOTE[11:45:22,252]: dockerrc: All  Runtimes: runc
DEBUGNOTE[11:45:22,268]: dockerrc: Container Runtime: UNDECLARED_RUNTIME
DEBUGNOTE[11:45:22,289]: storeinfo(): runtime=UNDECLARED_RUNTIME
DEBUGNOTE[11:45:22,513]: dockerrc: Image architecture: amd64
DEBUGNOTE[11:45:22,532]: dockerrc: Image CMD: '/bin/sh' '-c' 'start' 
DEBUGNOTE[11:45:22,577]: dockerrc: Image USER: 
DEBUGNOTE[11:45:22,602]: storeinfo(): containeruser=debian
DEBUGNOTE[11:45:22,622]: dockerrc: Image ENTRYPOINT: 
DEBUGNOTE[11:45:22,645]: dockerrc: Image WORKDIR: 
DEBUGNOTE[11:45:22,659]: storeinfo(): readyforX=ready
DEBUGNOTE[11:45:22,678]: waitforlogentry(): dockerrc: Waiting for logentry "xinitrc is ready" in xinit.log
DEBUGNOTE[11:45:23,141]: waitforlogentry(): start_xserver(): Found log entry "readyforX=ready" in store.info.
DEBUGNOTE[11:45:23,284]: Running xinitrc
DEBUGNOTE[11:45:23,299]: xinitrc: Created cookie: #ffff#7063636173746f722d636f6d#:168  MIT-MAGIC-COOKIE-1  98548df045ab5e499b3a062eeb84c99e
x11docker[11:45:23,321]: Disabling any possible access to new X server possibly granted by xhost

x11docker[11:45:27,715]: Output of xrandr on :168 
Screen 0: minimum 1 x 1, current 1980 x 1200, maximum 1980 x 1200 
screen connected primary 1980x1200+0+0 0mm x 0mm 
   1980x1200      0.00*  
   496x300       58.55   
   600x300       58.48   
   792x300       58.69   
   896x300       59.34   
   992x300       59.08   
   1096x300      58.99   
   1192x300      59.34   
   1288x300      59.04   
   1392x300      59.06   
   1488x300      59.25   
   1584x300      59.09   
   1688x300      59.41   
   1784x300      59.26   
   1888x300      59.20   
   496x360       59.05   
   600x360       59.88   
   792x360       59.46   
   896x360       59.37   
   992x360       59.37   
   1096x360      59.78   
   1192x360      59.75   
   1288x360      59.54   
   1392x360      59.64   
   1488x360      59.83   
   1584x360      59.80   
   1688x360      59.73   
   1784x360      59.71   
   1888x360      59.65   
   496x480       59.21   
   600x480       59.81   
   792x480       59.45   
   896x480       59.82   
   992x480       59.66   
   1096x480      59.58   
   1192x480      59.80   
   1288x480      59.70   
   1392x480      59.90   
   1488x480      59.81   
   1584x480      59.71   
   1688x480      59.89   
   1784x480      59.79   
   1888x480      59.74   
   496x540       59.88   
   600x540       59.70   
   792x540       59.61   
   896x540       59.58   
   992x540       59.88   
   1096x540      59.78   
   1192x540      59.77   
   1288x540      59.71   
   1392x540      59.90   
   1488x540      59.88   
   1584x540      59.83   
   1688x540      59.77   
   1784x540      59.76   
   1888x540      59.90   
   496x600       59.71   
   600x600       59.57   
   792x600       59.70   
   896x600       59.96   
   992x600       59.91   
   1096x600      59.81   
   1192x600      59.88   
   1288x600      59.85   
   1392x600      59.78   
   1488x600      59.76   
   1584x600      59.82   
   1688x600      59.95   
   1784x600      59.92   
   1888x600      59.86   
   496x660       59.79   
   600x660       59.64   
   792x660       59.90   
   896x660       59.79   
   992x660       59.79   
   1096x660      59.97   
   1192x660      59.86   
   1288x660      59.86   
   1392x660      59.79   
   1488x660      59.79   
   1584x660      59.79   
   1688x660      59.84   
   1784x660      59.84   
   1888x660      59.94   
   496x720       59.53   
   600x720       59.87   
   792x720       59.91   
   896x720       59.81   
   992x720       59.79   
   1096x720      59.95   
   1192x720      59.96   
   1288x720      59.97   
   1392x720      59.89   
   1488x720      59.90   
   1584x720      59.91   
   1688x720      59.86   
   1784x720      59.85   
   1888x720      59.94   
   496x780       59.80   
   600x780       59.66   
   792x780       59.81   
   896x780       59.72   
   992x780       59.78   
   1096x780      59.92   
   1192x780      59.95   
   1288x780      59.97   
   1392x780      59.90   
   1488x780      59.93   
   1584x780      59.96   
   1688x780      59.90   
   1784x780      59.93   
   1888x780      59.87   
   496x840       59.58   
   600x840       59.73   
   792x840       59.73   
   896x840       59.89   
   992x840       59.95   
   1096x840      59.86   
   1192x840      59.91   
   1288x840      59.96   
   1392x840      59.89   
   1488x840      59.92   
   1584x840      59.96   
   1688x840      59.90   
   1784x840      59.93   
   1888x840      59.88   
   496x900       59.98   
   600x900       59.82   
   792x900       59.77   
   896x900       59.91   
   992x900       59.98   
   1096x900      59.89   
   1192x900      59.95   
   1288x900      59.85   
   1392x900      59.93   
   1488x900      59.98   
   1584x900      59.89   
   1688x900      59.96   
   1784x900      59.88   
   1888x900      59.95   
   496x960       59.69   
   600x960       59.90   
   792x960       59.88   
   896x960       59.78   
   992x960       59.88   
   1096x960      59.98   
   1192x960      59.88   
   1288x960      59.95   
   1392x960      59.89   
   1488x960      59.95   
   1584x960      59.88   
   1688x960      59.96   
   1784x960      59.90   
   1888x960      59.95   
   496x1020      59.79   
   600x1020      59.97   
   792x1020      59.98   
   896x1020      59.87   
   992x1020      59.97   
   1096x1020     59.88   
   1192x1020     59.96   
   1288x1020     59.90   
   1392x1020     59.96   
   1488x1020     59.91   
   1584x1020     59.97   
   1688x1020     59.91   
   1784x1020     59.97   
   1888x1020     59.92   
   496x1080      59.89   
   600x1080      59.75   
   792x1080      59.85   
   896x1080      59.90   
   992x1080      59.84   
   1096x1080     59.92   
   1192x1080     59.87   
   1288x1080     59.96   
   1392x1080     59.89   
   1488x1080     59.97   
   1584x1080     59.93   
   1688x1080     59.94   
   1784x1080     59.91   
   1888x1080     59.95   
   496x1140      59.92   
   600x1140      59.89   
   792x1140      59.78   
   896x1140      59.88   
   992x1140      59.83   
   1096x1140     59.90   
   1192x1140     59.87   
   1288x1140     59.84   
   1392x1140     59.94   
   1488x1140     59.91   
   1584x1140     59.88   
   1688x1140     59.93   
   1784x1140     59.90   
   1888x1140     59.94   
   496x1200      59.69   
   600x1200      59.89   
   792x1200      59.83   
   896x1200      59.91   
   992x1200      59.88   
   1096x1200     59.83   
   1192x1200     59.94   
   1288x1200     59.92   
   1392x1200     59.85   
   1488x1200     59.94   
   1584x1200     59.92   
   1688x1200     59.89   
   1784x1200     59.87   
   1888x1200     59.91   
  1984x1200 (0x394) 199.250MHz -HSync +VSync 
        h: width  1984 start 2120 end 2328 total 2672 skew    0 clock  74.57KHz 
        v: height 1200 start 1203 end 1213 total 1245           clock  59.90Hz 
  1984x300 (0x3a3) 46.500MHz -HSync +VSync 
        h: width  1984 start 2040 end 2232 total 2480 skew    0 clock  18.75KHz 
        v: height  300 start  303 end  313 total  316           clock  59.34Hz 
  1984x360 (0x3b2) 55.750MHz -HSync +VSync 
        h: width  1984 start 2040 end 2232 total 2480 skew    0 clock  22.48KHz 
        v: height  360 start  363 end  373 total  376           clock  59.79Hz 
  1984x480 (0x3c1) 74.250MHz -HSync +VSync 
        h: width  1984 start 2040 end 2232 total 2480 skew    0 clock  29.94KHz 
        v: height  480 start  483 end  493 total  500           clock  59.88Hz 
  1984x540 (0x3d0) 84.500MHz -HSync +VSync 
        h: width  1984 start 2056 end 2248 total 2512 skew    0 clock  33.64KHz 
        v: height  540 start  543 end  553 total  562           clock  59.86Hz 
  1984x600 (0x3df) 94.500MHz -HSync +VSync 
        h: width  1984 start 2056 end 2256 total 2528 skew    0 clock  37.38KHz 
        v: height  600 start  603 end  613 total  624           clock  59.91Hz 
  1984x660 (0x3ee) 105.250MHz -HSync +VSync 
        h: width  1984 start 2072 end 2272 total 2560 skew    0 clock  41.11KHz 
        v: height  660 start  663 end  673 total  686           clock  59.93Hz 
  1984x720 (0x3fd) 115.500MHz -HSync +VSync 
        h: width  1984 start 2080 end 2280 total 2576 skew    0 clock  44.84KHz 
        v: height  720 start  723 end  733 total  748           clock  59.94Hz 
  1984x780 (0x40c) 125.750MHz -HSync +VSync 
        h: width  1984 start 2088 end 2288 total 2592 skew    0 clock  48.51KHz 
        v: height  780 start  783 end  793 total  810           clock  59.89Hz 
  1984x840 (0x41b) 136.250MHz -HSync +VSync 
        h: width  1984 start 2096 end 2296 total 2608 skew    0 clock  52.24KHz 
        v: height  840 start  843 end  853 total  872           clock  59.91Hz 
  1984x900 (0x42a) 147.000MHz -HSync +VSync 
        h: width  1984 start 2096 end 2304 total 2624 skew    0 clock  56.02KHz 
        v: height  900 start  903 end  913 total  934           clock  59.98Hz 
  1984x960 (0x439) 157.500MHz -HSync +VSync 
        h: width  1984 start 2104 end 2312 total 2640 skew    0 clock  59.66KHz 
        v: height  960 start  963 end  973 total  996           clock  59.90Hz 
  1984x1020 (0x448) 167.500MHz -HSync +VSync 
        h: width  1984 start 2104 end 2312 total 2640 skew    0 clock  63.45KHz 
        v: height 1020 start 1023 end 1033 total 1058           clock  59.97Hz 
  1984x1080 (0x457) 178.250MHz -HSync +VSync 
        h: width  1984 start 2112 end 2320 total 2656 skew    0 clock  67.11KHz 
        v: height 1080 start 1083 end 1093 total 1120           clock  59.92Hz 
  1984x1140 (0x466) 189.250MHz -HSync +VSync 
        h: width  1984 start 2120 end 2328 total 2672 skew    0 clock  70.83KHz 
        v: height 1140 start 1143 end 1153 total 1183           clock  59.87Hz

DEBUGNOTE[11:45:27,730]: storeinfo(): xinitrc=ready
DEBUGNOTE[11:45:27,746]: waitforlogentry(): dockerrc: Found log entry "xinitrc is ready" in xinit.log.
DEBUGNOTE[11:45:27,923]: waitforlogentry(): containerrc: Waiting for logentry "containerrootrc=ready" in store.info
DEBUGNOTE[11:45:27,943]: storeinfo(): containerid=1daa0e989fb462483f22bc13b929431c677c5a263512269f86f785d162148844
DEBUGNOTE[11:45:28,113]: dockerrc: Container is up and running.
DEBUGNOTE[11:45:28,188]: dockerrc: 1. check for PID 1: 19312
DEBUGNOTE[11:45:28,205]: storeinfo(): pid1pid=19312
DEBUGNOTE[11:45:28,228]: storeinfo(): containerip=172.17.0.39
DEBUGNOTE[11:45:28,241]: dockerrc(): Starting containerrootrc with docker exec
DEBUGNOTE[11:45:28,550]: Running containerrootrc: Setup as root in container
DEBUGNOTE[11:45:28,578]: containerrootrc: Container libc: glibc
x11docker[11:45:28,593]: Container system ID: debian

DEBUGNOTE[11:45:28,607]: containerrootrc: debian:x:1000:1000:debian,,,:/home/debian:/bin/bash
x11docker[11:45:28,649]: Searching for language locale matching fr

DEBUGNOTE[11:45:28,674]: Option --lang: Found locale in image: fr_FR.utf8
DEBUGNOTE[11:45:28,691]: storeinfo(): locale=fr_FR.utf8
DEBUGNOTE[11:45:28,716]: Option --lang: Output of locale -a: 
C 
C.UTF-8 
fr_FR.utf8 
POSIX
DEBUGNOTE[11:45:28,740]: storeinfo(): containerrootrc=ready
DEBUGNOTE[11:45:28,757]: storeinfo(): dockerrc=ready
DEBUGNOTE[11:45:28,780]: storepid(): Stored pid '20097' of 'dockerstopshell': 20097 ?        00:00:00 bash
DEBUGNOTE[11:45:28,782]: waitforlogentry(): start_docker(): Waiting for logentry "dockerrc=ready" in store.info
DEBUGNOTE[11:45:28,790]: waitforlogentry(): start_docker(): Found log entry "dockerrc=ready" in store.info.
DEBUGNOTE[11:45:28,793]: storeinfo(): xtermrc=ready
DEBUGNOTE[11:45:28,798]: watchpidlist(): Setting pid 19312 on watchlist: pid1pid
DEBUGNOTE[11:45:28,867]: storepid(): Stored pid '19312' of 'pid1pid': 19312 ?        00:00:00 init
DEBUGNOTE[11:45:28,867]: watchpidlist(): Watching pids: 
19312 ?        00:00:00 init
DEBUGNOTE[11:45:28,932]: watchpidlist(): Setting pid 15676 on watchlist: xinit
DEBUGNOTE[11:45:28,946]: waitforlogentry(): containerrc: Found log entry "containerrootrc=ready" in store.info.
DEBUGNOTE[11:45:28,975]: Running containerrc: Unprivileged user commands in container
DEBUGNOTE[11:45:29,000]: storepid(): Stored pid '15676' of 'xinit': 15676 ?        00:00:00 xinit
x11docker[11:45:29,026]: containerrc: Container system: 
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" 
NAME="Debian GNU/Linux" 
VERSION_ID="11" 
VERSION="11 (bullseye)" 
VERSION_CODENAME=bullseye 
ID=debian 
HOME_URL="https://www.debian.org/" 
SUPPORT_URL="https://www.debian.org/support" 
BUG_REPORT_URL="https://bugs.debian.org/"

DEBUGNOTE[11:45:29,040]: containerrc: HOME is not empty. Not copying from /etc/skel
DEBUGNOTE[11:45:29,089]: watchpidlist(): Watching pids: 
19312 ?        00:00:00 init
15676 ?        00:00:00 xinit
x11docker[11:45:29,110]: Container environment: 
container=docker 
DISPLAY=:168 
HOME=/home/debian 
HOSTNAME=1daa0e989fb4 
LANG=fr_FR.utf8 
OLDPWD=/tmp 
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 
PULSE_COOKIE=/x11docker/pulseaudio.cookie 
PULSE_SERVER=unix:/x11docker/pulseaudio.socket 
PWD=/home/debian 
TERM=xterm 
USER=debian 
XAUTHORITY=/x11docker/Xauthority.client 
XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR 
XDG_SESSION_TYPE=x11

DEBUGNOTE[11:45:29,136]: cmdrc: Running container command:  
   '/bin/sh' '-c' 'start'  
  
DEBUGNOTE[11:45:29,145]: watchpidlist(): Setting pid 15679 on watchlist: Xserver
DEBUGNOTE[11:45:29,220]: storepid(): Stored pid '15679' of 'Xserver': 15679 ?        00:00:00 Xvfb
DEBUGNOTE[11:45:29,325]: watchpidlist(): Watching pids: 
19312 ?        00:00:00 init
15676 ?        00:00:00 xinit
15679 ?        00:00:00 Xvfb
DEBUGNOTE[11:45:29,723]: Process tree of container: (maybe not complete yet)
init(19312)-+-dbus-daemon(20402)
            |-dbus-launch(20399)
            `-sh(19535)-+-sh(20377)---start(20378)---lxqt-session(20388)-+-xfwm4(20490)-+-{xfwm4}(20520)
                        |                                                |              |-{xfwm4}(20521)
                        |                                                |              |-{xfwm4}(20522)
                        |                                                |              |-{xfwm4}(20523)
                        |                                                |              |-{xfwm4}(20524)
                        |                                                |              |-{xfwm4}(20525)
                        |                                                |              |-{xfwm4}(20526)
                        |                                                |              |-{xfwm4}(20527)
                        |                                                |              |-{xfwm4}(20528)
                        |                                                |              |-{xfwm4}(20529)
                        |                                                |              |-{xfwm4}(20530)
                        |                                                |              |-{xfwm4}(20531)
                        |                                                |              |-{xfwm4}(20532)
                        |                                                |              |-{xfwm4}(20533)
                        |                                                |              |-{xfwm4}(20534)
                        |                                                |              |-{xfwm4}(20535)
                        |                                                |              |-{xfwm4}(20536)
                        |                                                |              |-{xfwm4}(20537)
                        |                                                |              |-{xfwm4}(20538)
                        |                                                |              |-{xfwm4}(20539)
                        |                                                |              |-{xfwm4}(20542)
                        |                                                |              `-{xfwm4}(20543)
                        |                                                |-{lxqt-session}(20455)
                        |                                                `-{lxqt-session}(20473)
                        |-tail(20373)
                        `-tail(20374)
DEBUGNOTE[11:45:30,738]: Process tree of x11docker:
bash(13260)-+-bash(13919)---tail(13921)
            |-bash(13922)---sleep(20619)
            |-bash(13923)---sleep(20618)
            |-bash(13957)
            |-bash(13985)
            |-bash(15238)---bash(20643)---pstree(20644)
            `-xinit(15676)-+-Xvfb(15679)-+-{Xvfb}(15685)
                           |             |-{Xvfb}(15686)
                           |             |-{Xvfb}(15687)
                           |             |-{Xvfb}(15696)
                           |             |-{Xvfb}(15698)
                           |             |-{Xvfb}(15704)
                           |             |-{Xvfb}(15706)
                           |             `-{Xvfb}(15707)
                           `-sh(15711)
  Lost child of dockerrc (dockerstopshell):
    bash(20097)
DEBUGNOTE[11:45:30,744]: storeinfo(): Stored info:
cache=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621
stdout=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/stdout
stderr=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/stderr
x11dockerpid=13260
xserver=--xvfb
pulseaudiomoduleid=263
DISPLAY=:168
XAUTHORITY=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client
XSOCKET=/tmp/.X11-unix/X168
XDG_RUNTIME_DIR=/run/user/1000
Xenv= DISPLAY=:168 XAUTHORITY=/home/debian/.cache/x11docker/pccastor_pbno9u_wallet-latest-80718103621/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X168 XDG_RUNTIME_DIR=/run/user/1000
tini=/usr/bin/docker-init
containername=x11docker_X168_pccastor_pbno9u_wallet-latest_80718103621
runtime=UNDECLARED_RUNTIME
containeruser=debian
readyforX=ready
xinitrc=ready
containerid=1daa0e989fb462483f22bc13b929431c677c5a263512269f86f785d162148844
pid1pid=19312
containerip=172.17.0.39
locale=fr_FR.utf8
containerrootrc=ready
dockerrc=ready
xtermrc=ready
DEBUGNOTE[11:45:30,751]: storepid(): Stored pids:
13957 watchpidlist
13985 watchmessagefifo
15238 containershell
20097 dockerstopshell
19312 pid1pid
15676 xinit
15679 Xserver
DEBUGNOTE[11:45:30,763]: storeinfo(): x11docker=ready
DEBUGNOTE[11:45:31,663]: waitforlogentry(): tailstderr: Waiting since 11s for log entry "x11docker=ready" in store.info
DEBUGNOTE[11:45:31,666]: waitforlogentry(): tailstdout: Waiting since 11s for log entry "x11docker=ready" in store.info
DEBUGNOTE[11:45:31,672]: waitforlogentry(): tailstderr: Found log entry "x11docker=ready" in store.info.
DEBUGNOTE[11:45:31,675]: waitforlogentry(): tailstdout: Found log entry "x11docker=ready" in store.info.
DEBUGNOTE[09:14:14,373]: watchpidlist(): PID 19312 has terminated
DEBUGNOTE[09:14:14,918]: time to say goodbye (watchpidlist 19312)
DEBUGNOTE[09:14:15,189]: time to say goodbye (watchpidlist)
DEBUGNOTE[09:14:16,297]: time to say goodbye (main)
DEBUGNOTE[09:14:16,730]: Terminating x11docker.
DEBUGNOTE[09:14:17,196]: time to say goodbye (finish)
DEBUGNOTE[09:14:18,267]: finish(): Checking pid 15679 (Xserver): (already gone)
DEBUGNOTE[09:14:18,674]: finish(): Checking pid 15676 (xinit): (already gone)
DEBUGNOTE[09:14:19,223]: finish(): Checking pid 19312 (pid1pid): (already gone)
DEBUGNOTE[09:14:19,874]: finish(): Checking pid 20097 (dockerstopshell): 20097 ?        00:00:00 bash
DEBUGNOTE[09:14:20,205]: finish(): Checking pid 15238 (containershell): (already gone)
DEBUGNOTE[09:14:20,683]: finish(): Checking pid 13985 (watchmessagefifo): 13985 ?        00:00:00 bash
DEBUGNOTE[09:14:21,128]: finish(): Checking pid 13957 (watchpidlist): (already gone)