Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/stderr <==
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/stdout <==
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log <==
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- DEBUGNOTE[07:43:41,715]: check_host(): ps can watch root processes: yes
- x11docker[07:43:41,730]: Image name: rstudioxhost:verse
- Container command:
- x11docker WARNING: User ignacio is member of group docker.
- That allows unprivileged processes on host to gain root privileges.
- DEBUGNOTE[07:43:42,102]: storeinfo(): cache=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472
- DEBUGNOTE[07:43:42,115]: storeinfo(): stdout=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/stdout
- DEBUGNOTE[07:43:42,128]: storeinfo(): stderr=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/stderr
- DEBUGNOTE[07:43:42,166]: storeinfo(): x11dockerpid=129655
- DEBUGNOTE[07:43:42,231]:
- x11docker version: 6.4.0
- docker version: Docker version 19.03.4, build 9013bf583a
- Host system: "Debian GNU/Linux bullseye/sid"
- Command: '/usr/bin/x11docker' '--nxagent' 'rstudioxhost:verse'
- Parsed options: --nxagent -- 'rstudioxhost:verse'
- DEBUGNOTE[07:43:42,237]: Dependency check for --nxagent: 0
- DEBUGNOTE[07:43:42,241]: Dependencies of --nxagent already checked: 0
- DEBUGNOTE[07:43:42,245]: Dependencies of --nxagent already checked: 0
- DEBUGNOTE[07:43:42,249]: storeinfo(): xserver=--nxagent
- x11docker note: A few applications do not work well with --nxagent.
- In that case, please try another X server option like --xephyr or --xpra.
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/xinit.log <==
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/stderr <==
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/stdout <==
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log <==
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- DEBUGNOTE[07:43:41,715]: check_host(): ps can watch root processes: yes
- x11docker[07:43:41,730]: Image name: rstudioxhost:verse
- Container command:
- x11docker WARNING: User ignacio is member of group docker.
- That allows unprivileged processes on host to gain root privileges.
- DEBUGNOTE[07:43:42,102]: storeinfo(): cache=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472
- DEBUGNOTE[07:43:42,115]: storeinfo(): stdout=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/stdout
- DEBUGNOTE[07:43:42,128]: storeinfo(): stderr=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/stderr
- DEBUGNOTE[07:43:42,166]: storeinfo(): x11dockerpid=129655
- DEBUGNOTE[07:43:42,231]:
- x11docker version: 6.4.0
- docker version: Docker version 19.03.4, build 9013bf583a
- Host system: "Debian GNU/Linux bullseye/sid"
- Command: '/usr/bin/x11docker' '--nxagent' 'rstudioxhost:verse'
- Parsed options: --nxagent -- 'rstudioxhost:verse'
- DEBUGNOTE[07:43:42,237]: Dependency check for --nxagent: 0
- DEBUGNOTE[07:43:42,241]: Dependencies of --nxagent already checked: 0
- DEBUGNOTE[07:43:42,245]: Dependencies of --nxagent already checked: 0
- DEBUGNOTE[07:43:42,249]: storeinfo(): xserver=--nxagent
- x11docker note: A few applications do not work well with --nxagent.
- In that case, please try another X server option like --xephyr or --xpra.
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/xinit.log <==
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- DEBUGNOTE[07:43:42,325]: waitforlogentry(): tailstdout: Waiting for logentry "x11docker=ready" in store.info
- DEBUGNOTE[07:43:42,326]: waitforlogentry(): tailstderr: Waiting for logentry "x11docker=ready" in store.info
- DEBUGNOTE[07:43:42,350]: storepid(): Stored pid '130091' of 'watchpidlist': 130091 pts/6 00:00:00 bash
- DEBUGNOTE[07:43:42,377]: storepid(): Stored pid '130104' of 'watchmessagefifo': 130104 pts/6 00:00:00 bash
- x11docker[07:43:42,438]: Virtual screen size: 3744x2064
- x11docker[07:43:42,449]: Physical screen size:
- Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 32767 x 32767
- x11docker[07:43:42,460]: Detected host window manager: cinnamon --sm-disable
- DEBUGNOTE[07:43:42,488]: storeinfo(): DISPLAY=:108
- DEBUGNOTE[07:43:42,500]: storeinfo(): XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client
- DEBUGNOTE[07:43:42,511]: storeinfo(): XSOCKET=/tmp/.X11-unix/X108
- DEBUGNOTE[07:43:42,523]: storeinfo(): XDG_RUNTIME_DIR=/run/user/738202
- DEBUGNOTE[07:43:42,535]: storeinfo(): Xenv= DISPLAY=:108 XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X108 XDG_RUNTIME_DIR=/run/user/738202
- DEBUGNOTE[07:43:42,585]: --nxagent: Additional nxagent options: nx/nx,clipboard=none,geometry=3744x2064,keyboard=evdev/us:108
- DEBUGNOTE[07:43:42,593]: X server command:
- /usr/bin/nxagent :108 \
- -noshmem \
- -noshpix \
- -extension Composite -extension COMPOSITE \
- -extension XTEST -tst \
- -dpms \
- -s off \
- -auth /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/Xauthority.server \
- -nolisten tcp \
- -dpi 96 \
- -norootlessexit \
- -verbose \
- -ac \
- -options /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/nxagent.options \
- -keystrokefile /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/nxagent.keys \
- -R
- x11docker[07:43:42,721]: --init: Found tini binary: /usr/bin/docker-init
- DEBUGNOTE[07:43:42,727]: storeinfo(): tini=/usr/bin/docker-init
- DEBUGNOTE[07:43:42,741]: Users and terminal:
- x11docker was started by: ignacio
- As host user serves (running X, storing cache): ignacio
- Container user will be: ignacio
- Container user password: x11docker
- Getting permission to run docker with: eval
- Terminal for password frontend: bash -c
- Running in a terminal: yes
- Running on console: no
- Running over SSH: no
- Running sourced: no
- bash $-: hB
- DEBUGNOTE[07:43:42,746]: storeinfo(): containername=x11docker_X108_rstudioxhost-verse_32621422472
- DEBUGNOTE[07:43:43,123]: Docker command:
- docker run --tty --rm --detach \
- --name x11docker_X108_rstudioxhost-verse_32621422472 \
- --user 738202:89939 \
- --env USER=ignacio \
- --userns host \
- --cap-drop ALL \
- --security-opt no-new-privileges \
- --security-opt label=type:container_runtime_t \
- --volume '/usr/bin/docker-init':'/usr/local/bin/tini':ro \
- --tmpfs /run --tmpfs /run/lock \
- --volume '/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share':'/x11docker':rw \
- --volume '/tmp/.X11-unix/X108':'/X108':rw \
- --workdir '/tmp' \
- --entrypoint env \
- --env 'container=docker' \
- --env 'XAUTHORITY=/x11docker/Xauthority.client' \
- --env 'DISPLAY=:108' \
- --env 'XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR' \
- -- rstudioxhost:verse /usr/local/bin/tini -- /bin/sh - /x11docker/containerrc
- x11docker[07:43:43,347]: 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; 1{$s/^$/""/}; 1!s/^/"/; $!s/$/"/'
- 29 }
- 30 mysleep ()
- 31 {
- 32 sleep "${1:-1}" 2> /dev/null || sleep 1
- 33 }
- 34 pspid ()
- 35 {
- 36 LC_ALL=C ps -p "${1:-}" 2> /dev/null | grep -v 'TIME'
- 37 }
- 38 rmcr ()
- 39 {
- 40 case "${1:-}" in
- 41 "")
- 42 sed "s/$(printf "\r")//g"
- 43 ;;
- 44 *)
- 45 sed -i "s/$(printf "\r")//g" "${1:-}"
- 46 ;;
- 47 esac
- 48 }
- 49 rocknroll ()
- 50 {
- 51 [ -s "$Timetosaygoodbyefile" ] && return 1;
- 52 [ -e "$Timetosaygoodbyefile" ] || return 1;
- 53 return 0
- 54 }
- 55 saygoodbye ()
- 56 {
- 57 debugnote "time to say goodbye ($*)";
- 58 [ -e "$Timetosaygoodbyefile" ] && echo timetosaygoodbye >> $Timetosaygoodbyefile;
- 59 [ -e "$Timetosaygoodbyefifo" ] && echo timetosaygoodbye >> $Timetosaygoodbyefifo
- 60 }
- 61 storeinfo ()
- 62 {
- 63 [ -e "$Storeinfofile" ] || return 1;
- 64 case "${1:-}" in
- 65 dump)
- 66 grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
- 67 ;;
- 68 drop)
- 69 sed -i "/^${2:-}=/d" $Storeinfofile
- 70 ;;
- 71 test)
- 72 grep -q "^${2:-}=" $Storeinfofile
- 73 ;;
- 74 *)
- 75 debugnote "storeinfo(): ${1:-}";
- 76 grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && {
- 77 sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
- 78 };
- 79 echo "${1:-}" >> $Storeinfofile
- 80 ;;
- 81 esac
- 82 }
- 83 storepid ()
- 84 {
- 85 case "${1:-}" in
- 86 dump)
- 87 grep -w "${2:-}" "$Storepidfile" | cut -d' ' -f1
- 88 ;;
- 89 test)
- 90 grep -q -w "${2:-}" "$Storepidfile"
- 91 ;;
- 92 *)
- 93 echo "${1:-NOPID}" "${2:-NONAME}" >> "$Storepidfile";
- 94 debugnote "storepid(): Stored pid '${1:-}' of '${2:-}': $(pspid ${1:-} ||:)"
- 95 ;;
- 96 esac
- 97 }
- 98 waitforlogentry ()
- 99 {
- 100 local Startzeit Uhrzeit Dauer Count=0 Schlaf;
- 101 local Errorkeys="${4:-}";
- 102 local Warten="${5:-60}";
- 103 Startzeit="$(date +%s ||:)";
- 104 Startzeit="${Startzeit:-0}";
- 105 [ "$Warten" = "infinity" ] && Warten=32000;
- 106 debugnote "waitforlogentry(): ${1:-}: Waiting for logentry \"${3:-}\" in $(basename ${2:-})";
- 107 while ! grep -q "${3:-}" < "${2:-}"; do
- 108 Count="$(( $Count + 1 ))";
- 109 Uhrzeit="$(date +%s ||:)";
- 110 Uhrzeit="${Uhrzeit:-0}";
- 111 Dauer="$(( $Uhrzeit - $Startzeit ))";
- 112 Schlaf="$(( $Count / 10 ))";
- 113 [ "$Schlaf" = "0" ] && Schlaf="0.5";
- 114 mysleep "$Schlaf";
- 115 [ "$Dauer" -gt "10" ] && debugnote "waitforlogentry(): ${1:-}: Waiting since ${Dauer}s for log entry \"${3:-}\" in $(basename ${2:-})";
- 116 [ "$Dauer" -gt "$Warten" ] && error "waitforlogentry(): ${1:-}: Timeout waiting for log entry \"${3:-}\" in $(basename ${2:-})
- 117 Last lines of logfile $(basename ${2:-}):
- 118 $(tail "${2:-}")";
- 119 [ "$Errorkeys" ] && grep -i -q -E "$Errorkeys" < "${2:-}" && error "waitforlogentry(): ${1:-}: Found error message in logfile.
- 120 Last lines of logfile $(basename ${2:-}):
- 121 $(tail "${2:-}")";
- 122 rocknroll || {
- 123 debugnote "waitforlogentry(): ${1:-}: Stopped waiting for ${3:-} in $(basename ${2:-}) due to terminating signal.";
- 124 return 1
- 125 };
- 126 done;
- 127 debugnote "waitforlogentry(): ${1:-}: Found log entry \"${3:-}\" in $(basename ${2:-}).";
- 128 return 0
- 129 }
- 130
- 131 warning() {
- 132 echo "$*:WARNING" | sed "s/\$/ /" >>$Messagefile
- 133 }
- 134 note() {
- 135 echo "$*:NOTE" | sed "s/\$/ /" >>$Messagefile
- 136 }
- 137 verbose() {
- 138 echo "$*:VERBOSE" | sed "s/\$/ /" >>$Messagefile
- 139 }
- 140 debugnote() {
- 141 echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
- 142 }
- 143 error() {
- 144 echo "$*:ERROR" | sed "s/\$/ /" >>$Messagefile
- 145 exit 64
- 146 }
- 147 stdout() {
- 148 echo "$*:STDOUT" | sed "s/\$/ /" >>$Messagefile
- 149 }
- 150
- 151 Containercommand=""
- 152 Imagename="rstudioxhost:verse"
- 153 Messagefile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/message.fifo'
- 154 Newxenv=' DISPLAY=:108 XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X108 XDG_RUNTIME_DIR=/run/user/738202'
- 155 export PATH='/usr/local/buildtools/java/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games'
- 156 Storeinfofile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/store.info'
- 157 Storepidfile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/store.pids'
- 158 Timetosaygoodbyefile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/timetosaygoodbye'
- 159 Timetosaygoodbyefifo='/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/timetosaygoodbye.fifo'
- 160 Xserver='--nxagent'
- 161 Workdir=''
- 162
- 163 Containerid=
- 164 Containerip=
- 165 Dockerlogspid=''
- 166 Dockerpull=
- 167 Exec=
- 168 Entrypoint=
- 169 Failure=
- 170 Imageuser=
- 171 Inspect=
- 172 Line=
- 173 Pid1pid=
- 174 Runtime=
- 175 Signal=
- 176 Windowmanager=
- 177 Windowmanagercommand=
- 178 Wmcontainerid=
- 179 Wmdockercommand=
- 180 Workdir=
- 181 debugnote 'Running dockerrc: Setup as root or as user docker on host.'
- 182
- 183
- 184 # Check whether docker daemon is running, get docker info
- 185 docker info >>/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/docker.info 2>>/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log || {
- 186 error "Calling docker daemon failed.
- 187 Is docker daemon running at all?
- 188 Try to start docker daemon with: systemctl start docker
- 189 Last lines of log:
- 190 $(rmcr < '/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log' | tail)"
- 191 }
- 192
- 193 # Check default runtime
- 194 Runtime="$(grep 'Default Runtime' < '/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/docker.info' | awk '{print $3}')"
- 195 debugnote "dockerrc: Found default Runtime: $Runtime"
- 196 debugnote "dockerrc: All $(grep 'Runtimes' < '/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/docker.info')"
- 197 [ "$Runtime" != '' ] && {
- 198 case $Runtime in
- 199 kata-runtime) warning 'Found default docker runtime kata-runtime.
- 200 Please run x11docker with --runtime=kata-runtime to avoid issues.' ;;
- 201 nvidia) [ 'no' = 'yes' ] && warning 'Option --gpu: Found default docker runtime nvidia.
- 202 Please run x11docker with --runtime=nvidia to avoid issues.' ;;
- 203 runc|crun) ;;
- 204 *) warning "Found unknown container runtime: $Runtime
- 205 Please report at: https://github.com/mviereck/x11docker" ;;
- 206 esac
- 207 }
- 208 debugnote "dockerrc: Container Runtime: $Runtime"
- 209 storeinfo "runtime=$Runtime"
- 210
- 211 # Refresh images.list for x11docker-gui
- 212 docker images 2>>/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log | grep -v REPOSITORY | awk '{print $1 ":" $2}' >>/home/ignacio/.cache/x11docker/docker.imagelist.sort
- 213 rmcr /home/ignacio/.cache/x11docker/docker.imagelist.sort
- 214 while read -r Line ; do
- 215 grep -q "<none>" <<<$Line || echo $Line >> /home/ignacio/.cache/x11docker/docker.imagelist
- 216 done < <(sort < /home/ignacio/.cache/x11docker/docker.imagelist.sort)
- 217 rm /home/ignacio/.cache/x11docker/docker.imagelist.sort
- 218
- 219 # Check if image rstudioxhost:verse is available locally
- 220 Dockerpull=no
- 221 grep -x -q 'rstudioxhost:verse' < /home/ignacio/.cache/x11docker/docker.imagelist || grep -x -q 'rstudioxhost:verse:latest' < /home/ignacio/.cache/x11docker/docker.imagelist || {
- 222 docker inspect rstudioxhost:verse >>/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log 2>&1 || {
- 223 echo 'Image rstudioxhost:verse not found locally.' >&2
- 224 echo 'Do you want to pull it from docker hub?' >&2
- 225 askyesno && Dockerpull=yes || error "Image 'rstudioxhost:verse' not available locally and not pulled from docker hub."
- 226 }
- 227 }
- 228
- 229 rocknroll || exit 64
- 230
- 231 [ "$Dockerpull" = 'yes' ] && {
- 232 note "Pulling image 'rstudioxhost:verse' from docker hub"
- 233 docker pull rstudioxhost:verse 1>&2 || error "Pulling docker image 'rstudioxhost:verse' seems to have failed!"
- 234 }
- 235
- 236 rocknroll || exit 64
- 237
- 238 Inspect="$(docker inspect rstudioxhost:verse --format='{{.Config.Entrypoint}}{{.Config.Cmd}}[{{.Config.User}}][{{.Config.WorkingDir}}]')"
- 239
- 240 # Check CMD
- 241 [ -z "$Containercommand" ] && {
- 242 # extract image command from image if not given on cli
- 243 Containercommand="$(cut -d] -f2 <<< "$Inspect" | cut -d[ -f2)"
- 244 debugnote "dockerrc: Image CMD: $Containercommand"
- 245 echo "$Containercommand" | grep -q /x11docker/containerrc && error 'Recursion error: Found CMD /x11docker/containerrc in image.
- 246 Did you use docker commit with an x11docker container?
- 247 Please build new images with a Dockerfile instead of using docker commit,
- 248 or provide a different container command.'
- 249 }
- 250
- 251 # Check USER
- 252 Imageuser="$(cut -d[ -f4 <<< "$Inspect" | cut -d] -f1)"
- 253 debugnote "dockerrc: Image USER: $Imageuser"
- 254 [ "$Imageuser" ] && note "Found 'USER $Imageuser' in image.
- 255 If you want to run with user $Imageuser instead of host user ignacio,
- 256 than run with --user=RETAIN."
- 257 storeinfo containeruser="ignacio"
- 258
- 259 # Check ENTRYPOINT
- 260 Entrypoint="$(cut -d] -f1 <<< "$Inspect" | cut -d[ -f2)"
- 261 debugnote "dockerrc: Image ENTRYPOINT: $Entrypoint"
- 262 echo "$Entrypoint" | grep -qE 'tini|init|systemd' && {
- 263 note "There seems to be an init system in ENTRYPOINT of image:
- 264 $Entrypoint
- 265 Will disable it as x11docker already runs an init with option --tini.
- 266 To allow this ENTRYPOINT, run x11docker with option --init=none."
- 267 Entrypoint=
- 268 }
- 269
- 270 # Check WORKDIR
- 271 Workdir="$(cut -d[ -f5 <<< "$Inspect" | cut -d] -f1)"
- 272 debugnote "dockerrc: Image WORKDIR: $Workdir"
- 273 [ "$Workdir" ] && note "Found 'WORKDIR $Workdir' in image.
- 274 You can change it with option --workdir=DIR."
- 275
- 276 [ -z "$Containercommand$Entrypoint" ] && error 'No container command specified and no CMD or ENTRYPOINT found in image.'
- 277
- 278 ######## Create containerrc ########
- 279
- 280 { echo '#! /bin/sh'
- 281 echo ''
- 282 echo '# containerrc'
- 283 echo '# Created startscript for docker run used as container command.'
- 284 echo '# Runs as unprivileged user in container.'
- 285 echo ''
- 286 echo 'exec 6>&1 7>&2'
- 287 echo 'exec >>/x11docker/container.log 2>&1'
- 288 echo ''
- 289 echo 'mysleep ()
- 290 {
- 291 sleep "${1:-1}" 2> /dev/null || sleep 1
- 292 }'
- 293 echo 'rocknroll ()
- 294 {
- 295 [ -s "$Timetosaygoodbyefile" ] && return 1;
- 296 [ -e "$Timetosaygoodbyefile" ] || return 1;
- 297 return 0
- 298 }'
- 299 echo 'saygoodbye ()
- 300 {
- 301 debugnote "time to say goodbye ($*)";
- 302 [ -e "$Timetosaygoodbyefile" ] && echo timetosaygoodbye >> $Timetosaygoodbyefile;
- 303 [ -e "$Timetosaygoodbyefifo" ] && echo timetosaygoodbye >> $Timetosaygoodbyefifo
- 304 }'
- 305 echo 'storeinfo ()
- 306 {
- 307 [ -e "$Storeinfofile" ] || return 1;
- 308 case "${1:-}" in
- 309 dump)
- 310 grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
- 311 ;;
- 312 drop)
- 313 sed -i "/^${2:-}=/d" $Storeinfofile
- 314 ;;
- 315 test)
- 316 grep -q "^${2:-}=" $Storeinfofile
- 317 ;;
- 318 *)
- 319 debugnote "storeinfo(): ${1:-}";
- 320 grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && {
- 321 sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
- 322 };
- 323 echo "${1:-}" >> $Storeinfofile
- 324 ;;
- 325 esac
- 326 }'
- 327 echo 'waitforlogentry ()
- 328 {
- 329 local Startzeit Uhrzeit Dauer Count=0 Schlaf;
- 330 local Errorkeys="${4:-}";
- 331 local Warten="${5:-60}";
- 332 Startzeit="$(date +%s ||:)";
- 333 Startzeit="${Startzeit:-0}";
- 334 [ "$Warten" = "infinity" ] && Warten=32000;
- 335 debugnote "waitforlogentry(): ${1:-}: Waiting for logentry \"${3:-}\" in $(basename ${2:-})";
- 336 while ! grep -q "${3:-}" < "${2:-}"; do
- 337 Count="$(( $Count + 1 ))";
- 338 Uhrzeit="$(date +%s ||:)";
- 339 Uhrzeit="${Uhrzeit:-0}";
- 340 Dauer="$(( $Uhrzeit - $Startzeit ))";
- 341 Schlaf="$(( $Count / 10 ))";
- 342 [ "$Schlaf" = "0" ] && Schlaf="0.5";
- 343 mysleep "$Schlaf";
- 344 [ "$Dauer" -gt "10" ] && debugnote "waitforlogentry(): ${1:-}: Waiting since ${Dauer}s for log entry \"${3:-}\" in $(basename ${2:-})";
- 345 [ "$Dauer" -gt "$Warten" ] && error "waitforlogentry(): ${1:-}: Timeout waiting for log entry \"${3:-}\" in $(basename ${2:-})
- 346 Last lines of logfile $(basename ${2:-}):
- 347 $(tail "${2:-}")";
- 348 [ "$Errorkeys" ] && grep -i -q -E "$Errorkeys" < "${2:-}" && error "waitforlogentry(): ${1:-}: Found error message in logfile.
- 349 Last lines of logfile $(basename ${2:-}):
- 350 $(tail "${2:-}")";
- 351 rocknroll || {
- 352 debugnote "waitforlogentry(): ${1:-}: Stopped waiting for ${3:-} in $(basename ${2:-}) due to terminating signal.";
- 353 return 1
- 354 };
- 355 done;
- 356 debugnote "waitforlogentry(): ${1:-}: Found log entry \"${3:-}\" in $(basename ${2:-}).";
- 357 return 0
- 358 }'
- 359 echo 'calculate() {'
- 360 echo ' LC_ALL=C printf %.3f\\n "$((10**9 * $@))e-9"'
- 361 echo '}'
- 362 echo '
- 363 warning() {
- 364 echo "$*:WARNING" | sed "s/\$/ /" >>$Messagefile
- 365 }
- 366 note() {
- 367 echo "$*:NOTE" | sed "s/\$/ /" >>$Messagefile
- 368 }
- 369 verbose() {
- 370 echo "$*:VERBOSE" | sed "s/\$/ /" >>$Messagefile
- 371 }
- 372 debugnote() {
- 373 echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
- 374 }
- 375 error() {
- 376 echo "$*:ERROR" | sed "s/\$/ /" >>$Messagefile
- 377 exit 64
- 378 }
- 379 stdout() {
- 380 echo "$*:STDOUT" | sed "s/\$/ /" >>$Messagefile
- 381 }'
- 382 echo 'Messagefile=/x11docker/message.fifo'
- 383 echo 'Storeinfofile=/x11docker/store.info'
- 384 echo 'Timetosaygoodbyefile=/x11docker/timetosaygoodbye'
- 385 echo ''
- 386 echo 'waitforlogentry containerrc $Storeinfofile containerrootrc=ready infinity'
- 387 echo 'debugnote "Running containerrc: Unprivileged user commands in container"'
- 388 echo ''
- 389 echo "Containercommand=\"$Containercommand\""
- 390 echo "Entrypoint=\"$Entrypoint\""
- 391 echo ''
- 392 echo 'verbose "containerrc: Container system:'
- 393 echo '$(cat /etc/os-release 2>&1 ||:)"'
- 394 echo ''
- 395 } >> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/containerrc
- 396 {
- 397 echo ''
- 398 echo '# USER and HOME'
- 399 echo 'Containeruser="$(storeinfo dump containeruser)"'
- 400 echo 'Containeruserhome="/fakehome/ignacio"'
- 401 echo 'export USER="$Containeruser"'
- 402 echo 'export HOME="$Containeruserhome"'
- 403 echo ''
- 404 echo '# XDG_RUNTIME_DIR'
- 405 echo 'Containeruseruid=$(id -u $Containeruser)'
- 406 echo 'export XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR'
- 407 echo '[ -e /run/user/$Containeruseruid ] && ln -s /run/user/$Containeruseruid $XDG_RUNTIME_DIR || mkdir -p -m700 $XDG_RUNTIME_DIR'
- 408 echo ''
- 409 echo 'mkdir -p $Containeruserhome'
- 410 echo '# Copy files from /etc/skel into empty HOME'
- 411 echo '[ -d /etc/skel ] && [ -z "$(ls -A "/fakehome/ignacio" 2>/dev/null | grep -v gnupg)" ] && {'
- 412 echo ' debugnote "containerrc: HOME is empty. Copying from /etc/skel"'
- 413 echo ' cp -n -R /etc/skel/. $Containeruserhome'
- 414 echo ' :'
- 415 echo '} || {'
- 416 echo ' debugnote "containerrc: HOME not empty. Not copying from /etc/skel"'
- 417 echo '}'
- 418 echo ''
- 419 echo '# Create softlink to X unix socket'
- 420 echo '[ -e /tmp/.X11-unix/X108 ] || ln -s /X108 /tmp/.X11-unix'
- 421 echo ''
- 422 echo 'unset WAYLAND_DISPLAY'
- 423 echo ''
- 424 echo 'export XDG_SESSION_TYPE=x11'
- 425 echo ''
- 426 echo ''
- 427 echo 'bash --version >/dev/null 2>&1 && export SHELL=/bin/bash || export SHELL=/bin/sh'
- 428 echo 'export TERM=xterm'
- 429 echo 'storeinfo test locale && export LANG="$(storeinfo dump locale)"'
- 430 echo '[ -e "/usr/share/zoneinfo/America/Los_Angeles" ] || export TZ=UTC+08'
- 431 echo '[ "$(date -Ihours)" != "2019-11-15T07-08:00" ] && export TZ=UTC+08'
- 432 echo '[ "$DEBIAN_FRONTEND" = noninteractive ] && unset DEBIAN_FRONTEND && export DEBIAN_FRONTEND'
- 433 echo '[ "$DEBIAN_FRONTEND" = newt ] && unset DEBIAN_FRONTEND && export DEBIAN_FRONTEND'
- 434 echo '# container environment (--env)'
- 435 echo "export 'container=docker'"
- 436 echo "export 'XAUTHORITY=/x11docker/Xauthority.client'"
- 437 echo "export 'DISPLAY=:108'"
- 438 echo "export 'XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR'"
- 439 echo ''
- 440 echo 'env >> /x11docker/container.environment'
- 441 echo 'verbose "Container environment:'
- 442 echo '$(env | sort)"'
- 443 echo ''
- 444 echo 'cd "$HOME"'
- 445 [ "$Workdir" ] && echo "[ -d \"$Workdir\" ] && cd \"$Workdir\" # WORKDIR in image"
- 446 echo ''
- 447 echo "debugnote \"containerrc: Running container command:
- 448 \$Dbus $Entrypoint $Containercommand
- 449 \""
- 450 echo ''
- 451 echo 'exec 1>&6 2>&7 6>&- 7>&-'
- 452 echo "$Exec \$Dbus $Entrypoint $Containercommand >>/x11docker/stdout 2>>/x11docker/stderr"
- 453 echo "storeinfo cmdexitcode=\$?"
- 454 } >> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/containerrc
- 455 ######## End of containerrc ########
- 456
- 457 # Write containerrc into x11docker.log
- 458 nl -ba >> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/x11docker.log < /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/containerrc
- 459
- 460 # Send signal to run X and wait for X to be ready
- 461 storeinfo readyforX=ready
- 462 waitforlogentry 'dockerrc' /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/xinit.log 'xinitrc is ready' 'xinit: giving up|unable to connect to X server|Connection refused|server error|Only console users are allowed'
- 463
- 464 rocknroll || exit 64
- 465
- 466
- 467 rocknroll || exit 64
- 468
- 469
- 470 #### run docker image ####
- 471 read Containerid < <(docker run --tty --rm --detach \
- 472 --name x11docker_X108_rstudioxhost-verse_32621422472 \
- 473 --user 738202:89939 \
- 474 --env USER=ignacio \
- 475 --userns host \
- 476 --cap-drop ALL \
- 477 --security-opt no-new-privileges \
- 478 --security-opt label=type:container_runtime_t \
- 479 --volume '/usr/bin/docker-init':'/usr/local/bin/tini':ro \
- 480 --tmpfs /run --tmpfs /run/lock \
- 481 --volume '/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share':'/x11docker':rw \
- 482 --volume '/tmp/.X11-unix/X108':'/X108':rw \
- 483 --workdir '/tmp' \
- 484 --entrypoint env \
- 485 --env 'container=docker' \
- 486 --env 'XAUTHORITY=/x11docker/Xauthority.client' \
- 487 --env 'DISPLAY=:108' \
- 488 --env 'XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR' \
- 489 -- rstudioxhost:verse /usr/local/bin/tini -- /bin/sh - /x11docker/containerrc 2>>/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log | rmcr)
- 490 ##########################
- 491
- 492
- 493 [ "$Containerid" ] || {
- 494 error "Startup of docker failed. Did not receive a container ID.
- 495
- 496 Last lines of container log:
- 497 $(rmcr < /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log | tail)"
- 498 }
- 499 storeinfo containerid="$Containerid"
- 500 # Wait for container to be ready
- 501 for ((Count=1 ; Count<=40 ; Count++)); do
- 502 docker exec x11docker_X108_rstudioxhost-verse_32621422472 sh -c : 2>&1 | rmcr >>/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log && { debugnote 'dockerrc: Container is up and running.' ; break ; } || debugnote "dockerrc: Container not ready on $Count. attempt, trying again."
- 503 rocknroll || exit 64
- 504 mysleep 0.1
- 505 done
- 506
- 507 # Wait for pid 1 in container
- 508 for ((Count=1 ; Count<=40 ; Count++)); do
- 509 Pid1pid="$(docker inspect --format '{{.State.Pid}}' x11docker_X108_rstudioxhost-verse_32621422472 2>>/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log | rmcr)"
- 510 debugnote "dockerrc: $Count. check for PID 1: $Pid1pid"
- 511 checkpid "$Pid1pid" && break
- 512 rocknroll || exit 64
- 513 mysleep 0.1
- 514 done
- 515 storeinfo pid1pid="$Pid1pid"
- 516
- 517 # Get IP of container
- 518 Containerip="$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' x11docker_X108_rstudioxhost-verse_32621422472 2>>/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log)"
- 519 storeinfo containerip=$Containerip
- 520
- 521 # Check log for startup failure
- 522 Failure="$(rmcr < /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log | grep -v grep | grep -E 'Error response from daemon|OCI runtime exec' ||:)"
- 523 [ "$Failure" ] && {
- 524 echo "$Failure" >>/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log
- 525 error "Got error message from docker daemon:
- 526 $Failure
- 527
- 528 Last lines of logfile:
- 529 "
- 530 }
- 531
- 532 # copy containerrootrc inside of container to avoid possible noexec of host home.
- 533 docker exec --tty x11docker_X108_rstudioxhost-verse_32621422472 sh -c 'cp /x11docker/containerrootrc /tmp/containerrootrc ; chmod 644 /tmp/containerrootrc' 2>&1 | rmcr >>/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log
- 534 # run container root setup. containerrc will wait until setup script is ready.
- 535 docker exec --tty -u root x11docker_X108_rstudioxhost-verse_32621422472 /bin/sh /tmp/containerrootrc 2>&1 | rmcr >>/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log
- 536
- 537 storeinfo dockerrc=ready
- 538
- 539 [ "$Containerid" ] || [ "$Wmcontainerid" ] && {
- 540 # wait for signal of finish()
- 541 read Signal </home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/dockerrc.stopfifo
- 542 [ "$Signal" = "stop" ] && {
- 543 [ "$Containerid" ] && docker stop $Containerid >> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log 2>&1 &
- 544 [ "$Wmcontainerid" ] && docker stop $Wmcontainerid >> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log 2>&1 &
- 545 [ "$Dockerlogspid" ] && kill $Dockerlogspid >> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log 2>&1 &
- 546 }
- 547 } & storepid $! dockerstopshell
- 548 exit 0
- x11docker[07:43:43,452]: 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 # Check type of libc
- 68 ldd --version 2>&1 | grep -q 'musl libc' && Containerlibc='musl'
- 69 ldd --version 2>&1 | grep -q -E 'GLIBC|GNU libc' && Containerlibc='glibc'
- 70 debugnote "containerrootrc: Container libc: $Containerlibc"
- 71
- 72 # Prepare X environment
- 73 # Create some system dirs with needed permissions
- 74 mkdir -v -p /var/lib/dbus /var/run/dbus
- 75 mkdir -v -p -m 1777 /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix
- 76 chmod -c 1777 /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix
- 77 export DISPLAY=:108 XAUTHORITY=/x11docker/Xauthority.client
- 78 [ -e /X108 ] && ln -s /X108 /tmp/.X11-unix/X108
- 79 ls -l /X108
- 80 ls -l /tmp/.X11-unix/X108
- 81
- 82 # Time zone
- 83 [ ! -d /usr/share/zoneinfo ] && [ "$Containerlibc" = "glibc" ] && {
- 84 mkdir -p /usr/share/zoneinfo/America
- 85 cp '/x11docker/libc.localtime' '/usr/share/zoneinfo/America/Los_Angeles'
- 86 }
- 87 [ -e '/usr/share/zoneinfo/America/Los_Angeles' ] && ln -f -s '/usr/share/zoneinfo/America/Los_Angeles' /etc/localtime
- 88
- 89 # Container system
- 90 Containersystem="$(grep '^ID=' /etc/os-release 2>/dev/null | cut -d= -f2 || echo 'unknown')"
- 91 verbose "Container system ID: $Containersystem"
- 92
- 93 # Environment variables
- 94 export 'container=docker'
- 95 export 'XAUTHORITY=/x11docker/Xauthority.client'
- 96 export 'DISPLAY=:108'
- 97 export 'XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR'
- 98
- 99 # Check container user
- 100 Containeruser="$(storeinfo dump containeruser)"
- 101
- 102 mkdir -v -m 777 /fakehome
- 103 Containeruserhome='/fakehome/ignacio'
- 104
- 105 # Create user entry in /etc/passwd (and delete possibly existing same uid)
- 106 cat /etc/passwd | grep -v ':738202:' > /tmp/passwd
- 107
- 108 # Disable possible /etc/shadow passwords for other users
- 109 sed -i 's%:x:%:-:%' /tmp/passwd
- 110 echo 'ignacio:x:738202:89939:ignacio,,,:/fakehome/ignacio:/bin/sh' >> /tmp/passwd
- 111
- 112 rm /etc/passwd
- 113 mv /tmp/passwd /etc/passwd || warning 'Unable to change /etc/passwd. That may be a security risk.'
- 114
- 115 # Create password entry for container user in /etc/shadow
- 116 rm -v /etc/shadow || warning 'Cannot change /etc/shadow. That may be a security risk.'
- 117 echo "ignacio:sac19FwGGTx/A:17293:0:99999:7:::" > /etc/shadow
- 118 echo 'root:*:17219:0:99999:7:::' >> /etc/shadow
- 119
- 120 # Create user group entry (and delete possibly existing same gid)
- 121 cat /etc/group | grep -v ':89939:' > /tmp/group
- 122 echo "primarygroup:x:89939:" >> /tmp/group
- 123 mv /tmp/group /etc/group
- 124
- 125 # Create /etc/sudoers, delete /etc/sudoers.d. Overwrite possible sudo setups in image.
- 126 [ -e /etc/sudoers.d ] && rm -v -R /etc/sudoers.d
- 127 [ -e /etc/sudoers ] && rm -v /etc/sudoers
- 128 echo '# /etc/sudoers created by x11docker' > /etc/sudoers
- 129 echo 'root ALL=(ALL) ALL' >> /etc/sudoers
- 130
- 131 # Restrict PAM configuration of su and sudo
- 132 mkdir -p /etc/pam.d
- 133 [ -e /etc/pam.d/sudo ] && rm -v /etc/pam.d/sudo
- 134 case "$Containersystem" in
- 135 fedora)
- 136 echo '#%PAM-1.0' > /etc/pam.d/su
- 137 echo 'auth sufficient pam_rootok.so' >> /etc/pam.d/su
- 138 echo 'account sufficient pam_succeed_if.so uid = 0 use_uid quiet' >> /etc/pam.d/su
- 139 echo 'session include system-auth' >> /etc/pam.d/su
- 140 ;;
- 141 *)
- 142 echo '#%PAM-1.0' > /etc/pam.d/su
- 143 echo 'auth sufficient pam_rootok.so' >> /etc/pam.d/su # allow root to switch user without a password
- 144 echo '@include common-auth' >> /etc/pam.d/su
- 145 echo '@include common-account' >> /etc/pam.d/su
- 146 echo '@include common-session' >> /etc/pam.d/su
- 147 ;;
- 148 esac
- 149
- 150 # Set up container user groups
- 151 [ -e "$Containeruserhome" ] || {
- 152 # only create HOME here if capability CHOWN is allowed.
- 153 :>/tmp/chowntestfile
- 154 chown "$Containeruser" /tmp/chowntestfile && {
- 155 mkdir -v -p "$Containeruserhome"
- 156 chown "$Containeruser" "$Containeruserhome"
- 157 }
- 158 rm /tmp/chowntestfile
- 159 }
- 160
- 161 rocknroll || exit 64
- 162
- 163
- 164 # disable getty in inittab
- 165 [ -e /etc/inittab ] && sed -i 's/.*getty/##getty disabled by x11docker## \0/' /etc/inittab
- 166
- 167
- 168 rocknroll || exit 64
- 169
- 170 storeinfo containerrootrc=ready
- 171
- x11docker[07:43:43,468]: 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/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/message.fifo'
- 111 Output="$(getprimary)"
- 112 Storeinfofile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/store.info'
- 113 Storepidfile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/store.pids'
- 114 Timetosaygoodbyefile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/timetosaygoodbye'
- 115
- 116 export PATH='/usr/local/buildtools/java/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games'
- 117 export DISPLAY=:108 XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X108 XDG_RUNTIME_DIR=/run/user/738202
- 118
- 119 Cookie=''
- 120 Line=''
- 121 Var=''
- 122
- 123 debugnote 'Running xinitrc'
- 124
- 125 # background color
- 126 sleep 2 && xsetroot -solid '#7F7F7F' &
- 127
- 128 # create new XAUTHORITY cookies
- 129 :> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client
- 130
- 131 cp /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client.bak # nxagent workaround cookie was created before starting xinit
- 132 export XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client.bak
- 133
- 134 echo 'Requesting trusted cookie from X server'
- 135 xauth -v -i -f /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client generate :108 . trusted timeout 3600
- 136
- 137 [ -s '/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client' ] || {
- 138 [ 'trusted' = 'untrusted' ] && note 'Could not create untrusted cookie.
- 139 Maybe your X server misses extension SECURITY.'
- 140 }
- 141 [ -s '/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client' ] || {
- 142 # still no cookie? try to create one without extension security
- 143 debugnote 'xinitrc: Failed to retrieve trusted cookie from X server. Will bake one myself.'
- 144 echo 'Failed to retrieve trusted cookie from X server. Will bake one myself.'
- 145 xauth -v -i -f /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client add :108 . dc0c209b4d1bf6a720e0bf13204305c5
- 146 ls -l /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client
- 147 }
- 148
- 149 # Prepare cookie with localhost identification disabled by ffff, needed if X socket is shared. ffff means 'familiy wild'
- 150 Cookie="$(xauth -i -f /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client nlist | sed -e 's/^..../ffff/')"
- 151 echo "$Cookie" | xauth -v -i -f /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client nmerge -
- 152
- 153 debugnote "xinitrc: Created cookie: $(xauth -f /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client list 2>&1)"
- 154 ls -l /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client
- 155 cp /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/Xauthority.server
- 156 chmod 644 /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client
- 157
- 158 [ -s '/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client' ] || warning 'Cookie creation failed!'
- 159 rm /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client.bak
- 160 export XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client
- 161 [ 'yes' = 'no' ] || [ ! -s '/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client' ] && unset XAUTHORITY && warning '--nxagent: X server :108 runs without cookie authentication.'
- 162
- 163 # clean xhost
- 164 verbose 'Disabling any possible access to new X server possibly granted by xhost'
- 165 disable_xhost
- 166
- 167 verbose "Output of xrandr on :108
- 168 $(xrandr)"
- 169
- 170 echo 'xinitrc: xinitrc is ready'
- 171 storeinfo xinitrc=ready
- 172
- 173 # wait for the end
- 174 read Var </home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/timetosaygoodbye.fifo
- DEBUGNOTE[07:43:43,492]: Running xtermrc: Ask for password if needed (no)
- DEBUGNOTE[07:43:43,497]: storepid(): Stored pid '130731' of 'containershell': 130731 pts/6 00:00:00 bash
- DEBUGNOTE[07:43:43,507]: Running dockerrc: Setup as root or as user docker on host.
- DEBUGNOTE[07:43:43,508]: waitforlogentry(): start_xserver(): Waiting for logentry "readyforX=ready" in store.info
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log <==
- WARNING: No swap limit support
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- DEBUGNOTE[07:43:43,589]: dockerrc: Found default Runtime: runc
- DEBUGNOTE[07:43:43,602]: dockerrc: All Runtimes: nvidia runc
- DEBUGNOTE[07:43:43,613]: dockerrc: Container Runtime: runc
- DEBUGNOTE[07:43:43,625]: storeinfo(): runtime=runc
- DEBUGNOTE[07:43:43,717]: dockerrc: Image CMD: /bin/sh -c /usr/lib/rstudio/bin/rstudio
- DEBUGNOTE[07:43:43,730]: dockerrc: Image USER: developer
- 1 #! /bin/sh
- 2
- 3 # containerrc
- 4 # Created startscript for docker run used as container command.
- 5 # Runs as unprivileged user in container.
- 6
- 7 exec 6>&1 7>&2
- 8 exec >>/x11docker/container.log 2>&1
- 9
- 10 mysleep ()
- 11 {
- 12 sleep "${1:-1}" 2> /dev/null || sleep 1
- 13 }
- 14 rocknroll ()
- 15 {
- 16 [ -s "$Timetosaygoodbyefile" ] && return 1;
- 17 [ -e "$Timetosaygoodbyefile" ] || return 1;
- 18 return 0
- 19 }
- 20 saygoodbye ()
- 21 {
- 22 debugnote "time to say goodbye ($*)";
- 23 [ -e "$Timetosaygoodbyefile" ] && echo timetosaygoodbye >> $Timetosaygoodbyefile;
- 24 [ -e "$Timetosaygoodbyefifo" ] && echo timetosaygoodbye >> $Timetosaygoodbyefifo
- 25 }
- 26 storeinfo ()
- 27 {
- 28 [ -e "$Storeinfofile" ] || return 1;
- 29 case "${1:-}" in
- 30 dump)
- 31 grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
- 32 ;;
- 33 drop)
- 34 sed -i "/^${2:-}=/d" $Storeinfofile
- 35 ;;
- 36 test)
- 37 grep -q "^${2:-}=" $Storeinfofile
- 38 ;;
- 39 *)
- 40 debugnote "storeinfo(): ${1:-}";
- 41 grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && {
- 42 sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
- 43 };
- 44 echo "${1:-}" >> $Storeinfofile
- 45 ;;
- 46 esac
- 47 }
- 48 waitforlogentry ()
- 49 {
- 50 local Startzeit Uhrzeit Dauer Count=0 Schlaf;
- 51 local Errorkeys="${4:-}";
- 52 local Warten="${5:-60}";
- 53 Startzeit="$(date +%s ||:)";
- 54 Startzeit="${Startzeit:-0}";
- 55 [ "$Warten" = "infinity" ] && Warten=32000;
- 56 debugnote "waitforlogentry(): ${1:-}: Waiting for logentry \"${3:-}\" in $(basename ${2:-})";
- 57 while ! grep -q "${3:-}" < "${2:-}"; do
- 58 Count="$(( $Count + 1 ))";
- 59 Uhrzeit="$(date +%s ||:)";
- 60 Uhrzeit="${Uhrzeit:-0}";
- 61 Dauer="$(( $Uhrzeit - $Startzeit ))";
- 62 Schlaf="$(( $Count / 10 ))";
- 63 [ "$Schlaf" = "0" ] && Schlaf="0.5";
- 64 mysleep "$Schlaf";
- 65 [ "$Dauer" -gt "10" ] && debugnote "waitforlogentry(): ${1:-}: Waiting since ${Dauer}s for log entry \"${3:-}\" in $(basename ${2:-})";
- 66 [ "$Dauer" -gt "$Warten" ] && error "waitforlogentry(): ${1:-}: Timeout waiting for log entry \"${3:-}\" in $(basename ${2:-})
- 67 Last lines of logfile $(basename ${2:-}):
- 68 $(tail "${2:-}")";
- 69 [ "$Errorkeys" ] && grep -i -q -E "$Errorkeys" < "${2:-}" && error "waitforlogentry(): ${1:-}: Found error message in logfile.
- 70 Last lines of logfile $(basename ${2:-}):
- 71 $(tail "${2:-}")";
- 72 rocknroll || {
- 73 debugnote "waitforlogentry(): ${1:-}: Stopped waiting for ${3:-} in $(basename ${2:-}) due to terminating signal.";
- 74 return 1
- 75 };
- 76 done;
- 77 debugnote "waitforlogentry(): ${1:-}: Found log entry \"${3:-}\" in $(basename ${2:-}).";
- 78 return 0
- 79 }
- 80 calculate() {
- 81 LC_ALL=C printf %.3f\\n "$((10**9 * $@))e-9"
- 82 }
- 83
- 84 warning() {
- 85 echo "$*:WARNING" | sed "s/\$/ /" >>$Messagefile
- 86 }
- 87 note() {
- 88 echo "$*:NOTE" | sed "s/\$/ /" >>$Messagefile
- 89 }
- 90 verbose() {
- 91 echo "$*:VERBOSE" | sed "s/\$/ /" >>$Messagefile
- 92 }
- 93 debugnote() {
- 94 echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
- 95 }
- 96 error() {
- 97 echo "$*:ERROR" | sed "s/\$/ /" >>$Messagefile
- 98 exit 64
- 99 }
- 100 stdout() {
- 101 echo "$*:STDOUT" | sed "s/\$/ /" >>$Messagefile
- 102 }
- 103 Messagefile=/x11docker/message.fifo
- 104 Storeinfofile=/x11docker/store.info
- 105 Timetosaygoodbyefile=/x11docker/timetosaygoodbye
- 106
- 107 waitforlogentry containerrc $Storeinfofile containerrootrc=ready infinity
- 108 debugnote "Running containerrc: Unprivileged user commands in container"
- 109
- 110 Containercommand="/bin/sh -c /usr/lib/rstudio/bin/rstudio"
- 111 Entrypoint=""
- 112
- 113 verbose "containerrc: Container system:
- 114 $(cat /etc/os-release 2>&1 ||:)"
- 115
- 116
- 117 # USER and HOME
- 118 Containeruser="$(storeinfo dump containeruser)"
- 119 Containeruserhome="/fakehome/ignacio"
- 120 export USER="$Containeruser"
- 121 export HOME="$Containeruserhome"
- 122
- 123 # XDG_RUNTIME_DIR
- 124 Containeruseruid=$(id -u $Containeruser)
- 125 export XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR
- 126 [ -e /run/user/$Containeruseruid ] && ln -s /run/user/$Containeruseruid $XDG_RUNTIME_DIR || mkdir -p -m700 $XDG_RUNTIME_DIR
- 127
- 128 mkdir -p $Containeruserhome
- 129 # Copy files from /etc/skel into empty HOME
- 130 [ -d /etc/skel ] && [ -z "$(ls -A "/fakehome/ignacio" 2>/dev/null | grep -v gnupg)" ] && {
- 131 debugnote "containerrc: HOME is empty. Copying from /etc/skel"
- 132 cp -n -R /etc/skel/. $Containeruserhome
- 133 :
- 134 } || {
- 135 debugnote "containerrc: HOME not empty. Not copying from /etc/skel"
- 136 }
- 137
- 138 # Create softlink to X unix socket
- 139 [ -e /tmp/.X11-unix/X108 ] || ln -s /X108 /tmp/.X11-unix
- 140
- 141 unset WAYLAND_DISPLAY
- 142
- 143 export XDG_SESSION_TYPE=x11
- 144
- 145
- 146 bash --version >/dev/null 2>&1 && export SHELL=/bin/bash || export SHELL=/bin/sh
- 147 export TERM=xterm
- 148 storeinfo test locale && export LANG="$(storeinfo dump locale)"
- 149 [ -e "/usr/share/zoneinfo/America/Los_Angeles" ] || export TZ=UTC+08
- 150 [ "$(date -Ihours)" != "2019-11-15T07-08:00" ] && export TZ=UTC+08
- 151 [ "$DEBIAN_FRONTEND" = noninteractive ] && unset DEBIAN_FRONTEND && export DEBIAN_FRONTEND
- 152 [ "$DEBIAN_FRONTEND" = newt ] && unset DEBIAN_FRONTEND && export DEBIAN_FRONTEND
- 153 # container environment (--env)
- 154 export 'container=docker'
- 155 export 'XAUTHORITY=/x11docker/Xauthority.client'
- 156 export 'DISPLAY=:108'
- 157 export 'XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR'
- 158
- 159 env >> /x11docker/container.environment
- 160 verbose "Container environment:
- 161 $(env | sort)"
- 162
- 163 cd "$HOME"
- 164 [ -d "/home/developer" ] && cd "/home/developer" # WORKDIR in image
- 165
- 166 debugnote "containerrc: Running container command:
- 167 $Dbus /bin/sh -c /usr/lib/rstudio/bin/rstudio
- 168 "
- 169
- 170 exec 1>&6 2>&7 6>&- 7>&-
- 171 $Dbus /bin/sh -c /usr/lib/rstudio/bin/rstudio >>/x11docker/stdout 2>>/x11docker/stderr
- 172 storeinfo cmdexitcode=$?
- x11docker note: Found 'USER developer' in image.
- If you want to run with user developer instead of host user ignacio,
- than run with --user=RETAIN.
- DEBUGNOTE[07:43:43,758]: storeinfo(): containeruser=ignacio
- DEBUGNOTE[07:43:43,770]: dockerrc: Image ENTRYPOINT:
- DEBUGNOTE[07:43:43,785]: dockerrc: Image WORKDIR: /home/developer
- x11docker note: Found 'WORKDIR /home/developer' in image.
- You can change it with option --workdir=DIR.
- DEBUGNOTE[07:43:43,815]: storeinfo(): readyforX=ready
- DEBUGNOTE[07:43:43,831]: waitforlogentry(): dockerrc: Waiting for logentry "xinitrc is ready" in xinit.log
- DEBUGNOTE[07:43:44,027]: waitforlogentry(): start_xserver(): Found log entry "readyforX=ready" in store.info.
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/xinit.log <==
- Extension "COMPOSITE" is not recognized
- Only the following extensions can be run-time disabled:
- BIG-REQUESTS
- Composite
- DAMAGE
- DOUBLE-BUFFER
- DPMS
- GLX
- MIT-SCREEN-SAVER
- MIT-SHM
- RANDR
- RENDER
- SHAPE
- SECURITY
- SYNC
- X-Resource
- XC-MISC
- XFree86-Bigfont
- XFIXES
- XINERAMA
- XInputExtension
- XKEYBOARD
- XTEST
- XVideo
- NXAGENT - Version 3.5.99.19
- Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com)
- Copyright (c) 2008-2014 Oleksandr Shneyder <[email protected]>
- Copyright (c) 2011-2016 Mike Gabriel <[email protected]>
- Copyright (c) 2014-2016 Ulrich Sibiller <[email protected]>
- Copyright (c) 2014-2016 Mihai Moldovan <[email protected]>
- Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com)
- See https://github.com/ArcticaProject/nx-libs for more information.
- Info: Agent running with pid '131077'.
- Session: Starting session at 'Fri Nov 15 07:43:44 2019'.
- Info: Using alpha channel in render extension.
- Info: Not using local device configuration changes.
- Info: using keystrokes file '/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/nxagent.keys'
- Current known keystrokes:
- fullscreen Shift+F11
- fullscreen Ctrl+Shift+Alt+f
- Info: Keycode conversion auto-determined as on
- The XKEYBOARD keymap compiler (xkbcomp) reports:
- > Internal error: Could not resolve keysym XF86WWAN
- > Internal error: Could not resolve keysym XF86RFKill
- Errors from xkbcomp are not fatal to the X server
- Session: Session started at 'Fri Nov 15 07:43:44 2019'.
- xinit: XFree86_VT property unexpectedly has 0 items instead of 1
- xrandr: Failed to get size of gamma for output default
- xrandr: Failed to get size of gamma for output default
- xrandr: Failed to get size of gamma for output default
- xrandr: Failed to get size of gamma for output default
- Requesting trusted cookie from X server
- Ignoring locks on authority file /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client
- authorization id is 244
- Ignoring locks and writing authority file /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client
- Ignoring locks on authority file /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client
- 1 entries read in: 0 new, 1 replacement
- Ignoring locks and writing authority file /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- DEBUGNOTE[07:43:44,191]: Running xinitrc
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/xinit.log <==
- -rw------- 1 ignacio primarygroup 77 Nov 15 07:43 /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- DEBUGNOTE[07:43:44,207]: xinitrc: Created cookie: #ffff#6d617274696e657a69672e73666f2e636f72702e676f6f676c652e636f6d#:108 MIT-MAGIC-COOKIE-1 7068404b230e7f5f2f25707134013341
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/xinit.log <==
- access control enabled, only authorized clients can connect
- xrandr: Failed to get size of gamma for output default
- xinitrc: xinitrc is ready
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- x11docker[07:43:44,224]: Disabling any possible access to new X server possibly granted by xhost
- x11docker[07:43:44,297]: Output of xrandr on :108
- Screen 0: minimum 320 x 240, current 3840 x 2160, maximum 3840 x 2160
- default connected primary 3840x2160+0+0 0mm x 0mm
- 1920x1200 60.00
- 320x240 60.00
- 640x360 60.00
- 640x480 60.00
- 800x480 60.00
- 800x600 60.00
- 1024x600 60.00
- 1024x768 60.00
- 1152x864 60.00
- 1280x720 60.00
- 1280x800 60.00
- 1280x1024 60.00
- 1360x768 60.00
- 1440x900 60.00
- 1600x900 60.00
- 1600x1200 60.00
- 1680x1050 60.00
- 1920x1080 60.00
- 3840x2160 60.00*
- DEBUGNOTE[07:43:44,311]: storeinfo(): xinitrc=ready
- DEBUGNOTE[07:43:44,325]: waitforlogentry(): dockerrc: Found log entry "xinitrc is ready" in xinit.log.
- DEBUGNOTE[07:43:44,879]: waitforlogentry(): containerrc: Waiting for logentry "containerrootrc=ready" in store.info
- DEBUGNOTE[07:43:44,889]: storeinfo(): containerid=1a4fd70b6e1317ac0fbc891c1456743ab0e897a5eb37c64cf84f9ac33ceaceda
- DEBUGNOTE[07:43:45,064]: dockerrc: Container is up and running.
- DEBUGNOTE[07:43:45,108]: dockerrc: 1. check for PID 1: 131284
- DEBUGNOTE[07:43:45,118]: storeinfo(): pid1pid=131284
- DEBUGNOTE[07:43:45,158]: storeinfo(): containerip=192.168.9.2
- DEBUGNOTE[07:43:45,473]: Running containerrootrc: Setup as root in container
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log <==
- mkdir: created directory '/var/lib/dbus'
- mkdir: created directory '/var/run/dbus'
- mkdir: created directory '/tmp/.ICE-unix'
- mkdir: created directory '/tmp/.X11-unix'
- mkdir: created directory '/tmp/.font-unix'
- srwxrwxrwx 1 developer 89939 0 Nov 15 15:43 /X108
- lrwxrwxrwx 1 root root 5 Nov 15 15:43 /tmp/.X11-unix/X108 -> /X108
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- DEBUGNOTE[07:43:45,494]: containerrootrc: Container libc: glibc
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log <==
- mkdir: created directory '/fakehome'
- removed '/etc/shadow'
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- x11docker[07:43:45,514]: Container system ID: ubuntu
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/container.log <==
- chown: changing ownership of '/tmp/chowntestfile': Operation not permitted
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- DEBUGNOTE[07:43:45,531]: storeinfo(): containerrootrc=ready
- DEBUGNOTE[07:43:45,570]: storeinfo(): dockerrc=ready
- DEBUGNOTE[07:43:45,596]: storepid(): Stored pid '131819' of 'dockerstopshell': 131819 pts/6 00:00:00 bash
- DEBUGNOTE[07:43:45,600]: waitforlogentry(): start_docker(): Waiting for logentry "dockerrc=ready" in store.info
- DEBUGNOTE[07:43:45,606]: storeinfo(): xtermrc=ready
- DEBUGNOTE[07:43:45,606]: waitforlogentry(): start_docker(): Found log entry "dockerrc=ready" in store.info.
- DEBUGNOTE[07:43:45,613]: watchpidlist(): Setting pid 131284 on watchlist: pid1pid
- DEBUGNOTE[07:43:45,636]: watchpidlist(): Watching pids:
- 131284 pts/0 00:00:00 tini
- DEBUGNOTE[07:43:45,638]: storepid(): Stored pid '131284' of 'pid1pid': 131284 pts/0 00:00:00 tini
- DEBUGNOTE[07:43:45,657]: watchpidlist(): Setting pid 131076 on watchlist: xinit
- DEBUGNOTE[07:43:45,681]: storepid(): Stored pid '131076' of 'xinit': 131076 pts/6 00:00:00 xinit
- DEBUGNOTE[07:43:45,694]: watchpidlist(): Watching pids:
- 131284 pts/0 00:00:00 tini
- 131076 pts/6 00:00:00 xinit
- DEBUGNOTE[07:43:45,715]: watchpidlist(): Setting pid 131077 on watchlist: Xserver
- DEBUGNOTE[07:43:45,741]: storepid(): Stored pid '131077' of 'Xserver': 131077 pts/6 00:00:00 nxagent
- DEBUGNOTE[07:43:45,772]: watchpidlist(): Watching pids:
- 131284 pts/0 00:00:00 tini
- 131076 pts/6 00:00:00 xinit
- 131077 pts/6 00:00:00 nxagent
- DEBUGNOTE[07:43:45,831]: Process tree of container: (maybe not complete yet)
- tini(131284)---sh(131328)---sleep(131673)
- DEBUGNOTE[07:43:45,902]: waitforlogentry(): containerrc: Found log entry "containerrootrc=ready" in store.info.
- DEBUGNOTE[07:43:45,911]: Running containerrc: Unprivileged user commands in container
- x11docker[07:43:45,945]: containerrc: Container system:
- NAME="Ubuntu"
- VERSION="18.04.3 LTS (Bionic Beaver)"
- ID=ubuntu
- ID_LIKE=debian
- PRETTY_NAME="Ubuntu 18.04.3 LTS"
- VERSION_ID="18.04"
- HOME_URL="https://www.ubuntu.com/"
- SUPPORT_URL="https://help.ubuntu.com/"
- BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
- PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
- VERSION_CODENAME=bionic
- UBUNTU_CODENAME=bionic
- DEBUGNOTE[07:43:45,957]: containerrc: HOME is empty. Copying from /etc/skel
- x11docker[07:43:46,006]: Container environment:
- container=docker
- DISPLAY=:108
- HOME=/fakehome/ignacio
- HOSTNAME=1a4fd70b6e13
- LANG=en_US.UTF-8
- LC_ALL=en_US.UTF-8
- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- PWD=/tmp
- SHELL=/bin/bash
- TERM=xterm
- USER=ignacio
- XAUTHORITY=/x11docker/Xauthority.client
- XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR
- XDG_SESSION_TYPE=x11
- DEBUGNOTE[07:43:46,019]: Process tree of x11docker:
- bash(129655)-+-bash(130067)---tail(130069)
- |-bash(130070)
- |-bash(130071)
- |-bash(130091)
- |-bash(130104)
- |-bash(130731)---bash(131980)---pstree(131981)
- `-xinit(131076)-+-nxagent(131077)
- `-sh(131080)---sh(131096)---sleep(131099)
- Lost child of dockerrc (dockerstopshell):
- bash(131819)
- DEBUGNOTE[07:43:46,023]: containerrc: Running container command:
- /bin/sh -c /usr/lib/rstudio/bin/rstudio
- DEBUGNOTE[07:43:46,026]: storeinfo(): Stored info:
- cache=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472
- stdout=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/stdout
- stderr=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/stderr
- x11dockerpid=129655
- xserver=--nxagent
- DISPLAY=:108
- XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client
- XSOCKET=/tmp/.X11-unix/X108
- XDG_RUNTIME_DIR=/run/user/738202
- Xenv= DISPLAY=:108 XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X108 XDG_RUNTIME_DIR=/run/user/738202
- tini=/usr/bin/docker-init
- containername=x11docker_X108_rstudioxhost-verse_32621422472
- runtime=runc
- containeruser=ignacio
- readyforX=ready
- xinitrc=ready
- containerid=1a4fd70b6e1317ac0fbc891c1456743ab0e897a5eb37c64cf84f9ac33ceaceda
- pid1pid=131284
- containerip=192.168.9.2
- containerrootrc=ready
- dockerrc=ready
- xtermrc=ready
- DEBUGNOTE[07:43:46,031]: storepid(): Stored pids:
- 130091 watchpidlist
- 130104 watchmessagefifo
- 130731 containershell
- 131819 dockerstopshell
- 131284 pid1pid
- 131076 xinit
- 131077 Xserver
- DEBUGNOTE[07:43:46,034]: storeinfo(): x11docker=ready
- DEBUGNOTE[07:43:46,401]: waitforlogentry(): tailstderr: Found log entry "x11docker=ready" in store.info.
- DEBUGNOTE[07:43:46,403]: waitforlogentry(): tailstdout: Found log entry "x11docker=ready" in store.info.
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/stderr <==
- qt.qpa.xcb: X server does not support XInput 2
- [116:189:1115/074347.884867:ERROR:gl_surface_glx_qt.cpp(141)] GLX 1.3 or later is required.
- [116:189:1115/074347.884909:ERROR:gl_ozone_glx_qt.cpp(57)] GLSurfaceGLXQt::InitializeOneOff failed.
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/xinit.log <==
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- nxagentImportProperty: Remote property bigger than maximum limits.
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/share/stderr <==
- qt.glx: qglx_findConfig: Failed to finding matching FBConfig (8 8 8 0)
- qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 8 8 0)
- qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 8 0)
- qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
- qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
- qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
- qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
- qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
- WARNING: Application calling GLX 1.3 function "glXCreatePbuffer" when GLX 1.3 is not supported! This is an application bug!
- QSGContext::initialize: stencil buffer support missing, expect rendering errors
- qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 163, resource id: 209, major code: 129 (Unknown), minor code: 47
- Received signal 11 SEGV_MAPERR 000000000000
- #0 0x7f7307112a4f <unknown>
- #1 0x7f7307112e4b <unknown>
- #2 0x7f73071134ce <unknown>
- #3 0x7f730237b890 <unknown>
- #4 0x7f7305662e13 <unknown>
- #5 0x7f73056635c3 <unknown>
- #6 0x7f73079e6d09 <unknown>
- #7 0x7f73079e6e6d <unknown>
- #8 0x7f7309cc5707 <unknown>
- #9 0x7f7309cc964a <unknown>
- #10 0x7f7309cc3938 <unknown>
- #11 0x7f7309cc18d9 <unknown>
- #12 0x7f7309cc2b52 <unknown>
- #13 0x7f7309cc4a0d <unknown>
- #14 0x7f73070753d7 <unknown>
- #15 0x7f730709bcf7 <unknown>
- #16 0x7f730709c35d <unknown>
- #17 0x7f730709c62a <unknown>
- #18 0x7f7307095c92 <unknown>
- #19 0x7f73070b602f <unknown>
- #20 0x7f73070ec684 <unknown>
- #21 0x7f730711fa10 <unknown>
- #22 0x7f73023706db start_thread
- #23 0x7f73007d388f clone
- r8: 0000000000000000 r9: 0000000000000000 r10: 00007f72700008d0 r11: 0000000000000000
- r12: 00007f727bffdc30 r13: 00007f727bffdef0 r14: 00007f727bffdee0 r15: 00007f727bffde80
- di: 0000000000000000 si: 00005600ece20c80 bp: 00007f727bffdc20 bx: 00007f7270018480
- dx: 00005600ece592a0 ax: 00007f730c175620 cx: 00007f727bffda60 sp: 00007f727bffda60
- ip: 00007f7305662e13 efl: 0000000000010206 cgf: 002b000000000033 erf: 0000000000000004
- trp: 000000000000000e msk: 0000000000000000 cr2: 0000000000000000
- [end of stack trace]
- Calling _exit(1). Core file will not be generated.
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- DEBUGNOTE[07:43:48,115]: storeinfo(): cmdexitcode=1
- DEBUGNOTE[07:43:48,778]: watchpidlist(): PID 131284 has terminated
- DEBUGNOTE[07:43:48,782]: time to say goodbye (watchpidlist 131284)
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/xinit.log <==
- xinit: connection to X server lost
- waiting for X server to shut down Session: Terminating session at 'Fri Nov 15 07:43:48 2019'.
- Session: Session terminated at 'Fri Nov 15 07:43:48 2019'.
- FreeFontPath: FPE "/usr/share/fonts/X11/misc/" refcount is 2, should be 1; fixing.
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- DEBUGNOTE[07:43:48,788]: time to say goodbye (watchpidlist)
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/xinit.log <==
- ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-32621422472/message.log <==
- DEBUGNOTE[07:43:49,790]: time to say goodbye (main)
- DEBUGNOTE[07:43:49,798]: Terminating x11docker.
- DEBUGNOTE[07:43:49,804]: time to say goodbye (finish)
- DEBUGNOTE[07:43:49,848]: finish(): Checking pid 131077 (Xserver): (already gone)
- DEBUGNOTE[07:43:49,886]: finish(): Checking pid 131076 (xinit): (already gone)
- DEBUGNOTE[07:43:49,922]: finish(): Checking pid 131284 (pid1pid): (already gone)
- DEBUGNOTE[07:43:49,960]: finish(): Checking pid 131819 (dockerstopshell): 131819 pts/6 00:00:00 bash
- DEBUGNOTE[07:43:49,996]: finish(): Checking pid 130731 (containershell): (already gone)
- DEBUGNOTE[07:43:50,029]: finish(): Checking pid 130104 (watchmessagefifo): 130104 pts/6 00:00:00 bash
- DEBUGNOTE[07:43:50,068]: finish(): Checking pid 130091 (watchpidlist): (already gone)
- DEBUGNOTE[07:43:51,190]: termpid(): Terminating 130104 (watchmessagefifo): 130104 pts/6 00:00:00 bash
- DEBUGNOTE[07:43:51,320]: x11docker exit code: 0
- DEBUGNOTE[07:43:51,336]: CMD exit code: 1
Advertisement
Add Comment
Please, Sign In to add comment