Comments (14)
x11docker has a new option --lang
to set language locales.
If you like to, you can run with --lang=zh_CN
or with --lang=$LANG
to get a chinese LXDE desktop.
from x11docker.
i tried again, after run CJK fonts installer, all fonts is show correct when install QQ, i think current issue is resolved completely.
Thanks!
from x11docker.
Hello!
Can you tell me what you did?
Currently, x11docker sometimes uses xmessage, but no other dialog boxes.
Does xmessage "hello world"
work for you, respective some chinese message?
Your screenshot does not look like xmessage. Maybe it is a message from an application in docker image? Then I assume the docker image needs chinese fonts to be installed in its Dockerfile.
from x11docker.
This is from a famous IM from china, following is a download link:
http://dldir1.qq.com/qqfile/qq/QQ8.9.4/21584/QQ8.9.4.exe
I installed it use wine, but run failed.
I think chinese fonts to be installed too, how to do this?
thanks.
from x11docker.
The issue is within wine. The chinese font has to be enabled as default in wine.
wine uses a custom Tahoma font that does not support chinese.
Using "Droid Sans Fallback" instead works.
Save this as file chinese.reg
:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink]
"FontLinkControl"=dword:00004000
"FontLinkDefaultChar"=dword:00003000
/* 平滑化(anti-alias) 備註 */
/* 如果覺得開了之後字體難看,把三個 Y 改成 N,有些字型要開啟平滑化才好看 */
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"ClientSideAntiAliasWithCore"="Y"
"ClientSideAntiAliasWithRender"="Y"
"ClientSideWithRender"="Y"
/* 平滑字型 */
[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2"
/* 替換字型1 */
/* 這裡以 Droid Sans Fallback 為例,請自行改成你要的字型名稱 */
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"Arial Baltic,186"="Droid Sans Fallback"
"Arial CE,238"="Droid Sans Fallback"
"Arial CYR,204"="Droid Sans Fallback"
"Arial Greek,161"="Droid Sans Fallback"
"Arial TUR,162"="Droid Sans Fallback"
"Courier New Baltic,186"="Droid Sans Fallback"
"Courier New CE,238"="Droid Sans Fallback"
"Courier New CYR,204"="Droid Sans Fallback"
"Courier New Greek,161"="Droid Sans Fallback"
"Courier New TUR,162"="Droid Sans Fallback"
"Helv"="Droid Sans Fallback"
"Helvetica"="Droid Sans Fallback"
"MS Shell Dlg"="Droid Sans Fallback"
"MS Shell Dlg 2"="Droid Sans Fallback"
"PMingLiU"="Droid Sans Fallback"
"新細明體"="Droid Sans Fallback"
"Tahoma"="Droid Sans Fallback"
"Times"="Droid Sans Fallback"
"Times New Roman Baltic,186"="Droid Sans Fallback"
"Times New Roman CE,238"="Droid Sans Fallback"
"Times New Roman CYR,204"="Droid Sans Fallback"
"Times New Roman Greek,161"="Droid Sans Fallback"
"Times New Roman TUR,162"="Droid Sans Fallback"
"Tms Rmn"="Droid Sans Fallback"
/* 替換字型2 */
[HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements]
@="Droid Sans Fallback"
"Arial"="Droid Sans Fallback"
"Fixedsys"="Droid Sans Fallback"
"Microsoft Sans Serif"="Droid Sans Fallback"
"MingLiU"="Droid Sans Fallback"
"MS UI Gothic"="Droid Sans Fallback"
"PMingLiU"="Droid Sans Fallback"
"Simsun"="Droid Sans Fallback"
"Songti"="Droid Sans Fallback"
"System"="Droid Sans Fallback"
"Tahoma"="Droid Sans Fallback"
"Terminal"="Droid Sans Fallback"
/* 取代字型 */
"Microsoft Sans Serif"="DroidSansFallback.ttf,Droid Sans Fallback"
"SimSun"="DroidSansFallback.ttf,Droid Sans Fallback"
"Tahoma"="DroidSansFallback.ttf,Droid Sans Fallback"
"PMingLiU"="DroidSansFallback.ttf,Droid Sans Fallback"
"Lucida Sans Unicode"="DroidSansFallback.ttf,Droid Sans Fallback"
(If you get an error message about encoding, use encoding option UTF8
. Or remove all chinese entrys).
Run wine regedit
and import this registry file.
Now it works!
Source: https://daviwa.blogspot.de/2016/04/playonlinux-422-how-to-correct-chinese.html
Edit: It seems that with this solution only chinese works, but no latin chars anymore... there should be a solution to allow both of them. If you find a solution for this, please tell me! Then I could include it as default in x11docker/lxde-wine.
from x11docker.
Forget about the solution mentioned above. It is quite simple, just run
winetricks cjkfonts
and all is fine!
winetricks downloads the missing fonts and configures wine well.
The winetricks solution adds about 300 MB to the image, thus I won't include it as default.
The solution with "Droid Sans Fallback" uses an already given font; if it could be configured to display chinese and latin chars as well, I would like to include it in x11docker/lxde-wine.
from x11docker.
winetricks cjkfonts
and all is fine!
Cool, that worked, though because others reason, that app still not worked, but, all message displayed as chinese now.
Thanks
from x11docker.
Cool, Thanks, will try it later
from x11docker.
hi, @mviereck , I want to try this again in another linux distro (Deepin 15.6), but got another error
╰─ $ 1 ./x11docker --desktop x11docker/xfce --verbose
x11docker: x11docker version 4.3.6
docker version: Docker version 18.03.1-ce, build 9ee9f40
Host system: Deepin 15
Command: ./x11docker --desktop x11docker/xfce --verbose
Parsed options: --desktop --verbose -- 'x11docker/xfce'
x11docker:
Wanda the fish says: Install fortunes to find wisdom.
x11docker: Image name: x11docker/xfce
x11docker: Image command:
x11docker note: Using X server option --xephyr
x11docker note: Xephyr is a quite stable nested X server.
Less stable, but resizeable is nxagent with option --nxagent.
x11docker: Logfile: /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/x11docker.log
In container: /x11docker/x11docker.log
After finish: /home/zw963/.cache/x11docker/x11docker.log
==> /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.log <==
==> /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/stdout <==
==> /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/stderr <==
==> /home/zw963/.cache/x11docker/X200-x11docker-xfce/xpraserver.log <==
==> /home/zw963/.cache/x11docker/X200-x11docker-xfce/xpraclient.log <==
==> /home/zw963/.cache/x11docker/X200-x11docker-xfce/xinit.log <==
==> /home/zw963/.cache/x11docker/X200-x11docker-xfce/compositor.log <==
x11docker: Virtual screen size: 1824x984
x11docker: Physical screen size:
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
x11docker note: Xephyr not found. Fallback: using Xnest.
Xnest is less stable and has less features than Xephyr.
For example, it misses RandR and Composite extensions and fullscreen mode.
It is recommended to install 'Xephyr'.
x11docker: X server command:
/usr/bin/Xnest :200 -geometry 1824x984 -scrns 1 \
-name 'x11docker/xfce on :200' \
-nolisten tcp -dpms -s off -retro \
+extension Composite +extension RANDR +extension RENDER +extension GLX \
+extension XVideo +extension DOUBLE-BUFFER \
-extension X-Resource +extension SECURITY +extension DAMAGE \
-extension XINERAMA -xinerama -extension MIT-SHM \
-auth /home/zw963/.cache/x11docker/X200-x11docker-xfce/Xservercookie \
-extension XTEST -tst -dpi 96
x11docker: Environment variables:
DISPLAY=:200 XAUTHORITY=/home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie XSOCKET=/tmp/.X11-unix/X200 XPRA_XSHM=0 X11DOCKER_CACHE=/home/zw963/.cache/x11docker/X200-x11docker-xfce
x11docker: Found tini binary: /home/zw963/Dropbox/linux/utils/docker/bin/docker-init
x11docker: Container name: x11docker_X200_57a700_x11docker-xfce
x11docker: docker command:
docker run -d --tty --rm --name=x11docker_X200_57a700_x11docker-xfce \
--user=1000:1000 --env USER=zw963 \
--cap-drop ALL \
--volume /home/zw963/Dropbox/linux/utils/docker/bin/docker-init:/x11docker/tini:ro \
--security-opt no-new-privileges \
--security-opt label=type:container_runtime_t \
--group-add 29 \
--group-add 44 \
--tmpfs /run --tmpfs /run/lock \
--entrypoint=env \
--env container=docker \
-v /home/zw963/.cache/x11docker/X200-x11docker-xfce/share:/x11docker:rw \
-e DISPLAY=:200 -e XAUTHORITY=/x11docker/Xclientcookie \
-v /tmp/.X11-unix/X200:/X200:rw \
--workdir /tmp \
-- x11docker/xfce /bin/sh - /x11docker/container.CMD.sh
x11docker: Users and terminal:
x11docker was started by: zw963
As host user serves (running X, storing cache): zw963
Container user will be: zw963
Container user password: x11docker
Getting permission to run docker with: bash -c sudo -E
Running X and other user commands with: bash -c
Terminal for password frontend: dbus-launch konsole --nofork -e
Terminal to show docker pull progress: dbus-launch konsole --nofork -e
Running on console: no
Running over SSH: no
x11docker: Generated container.rootsetup.sh:
1 #! /bin/sh
2 # set up docker container as root before ongoing in unprivileged container.CMD.sh
3 # commands in this script are executed as root in container
4
5
6 warning() {
7 echo "$*:WARNING" >&3
8 }
9 note() {
10 echo "$*:NOTE" >&3
11 }
12 verbose() {
13 echo "$*:VERBOSE" >&3
14 }
15 debugnote() {
16 echo "$*:DEBUGNOTE" >&3
17 }
18 error() {
19 echo "$*:ERROR" >&3
20 exit 1
21 }
22 stdout() {
23 echo "$*:STDOUT" >&3
24 }
25 exec 3<>/x11docker/message.fifo
26
27 verbose -d 'Running setup as root in container'
28 ldd --version 2>&1 | grep -q 'musl libc' && Containerlibc='musl'
29 ldd --version 2>&1 | grep -q -E 'GLIBC|GNU libc' && Containerlibc='glibc'
30 verbose -d "Container libc: $Containerlibc"
31
32 # create some system dirs with needed permissions
33 mkdir -v -p /var/lib/dbus /var/run/dbus
34 mkdir -v -p -m 1777 /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix
35 chmod -c 1777 /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix
36 ln -s /X200 /tmp/.X11-unix/X200
37 ls -l /tmp/.X11-unix/X200
38 export DISPLAY=:200 XAUTHORITY=/x11docker/Xclientcookie
39
40 [ ! -d /usr/share/zoneinfo ] && [ "$Containerlibc" = "glibc" ] && {
41 mkdir -p /usr/share/zoneinfo
42 cp '/x11docker/timezone' '/usr/share/zoneinfo/PRC'
43 }
44 [ -e '/usr/share/zoneinfo/PRC' ] && ln -f -s '/usr/share/zoneinfo/PRC' /etc/localtime
45
46 Containersystem=$(. /etc/os-release; echo $ID)
47 verbose "Container system ID: $Containersystem"
48
49
50 # create user entry in /etc/passwd (and delete possibly existing same uid)
51 getent passwd | grep -v $(getent passwd 1000 || echo USERNOTFOUND) > /tmp/passwd
52 # disable possible /etc/shadow passwords for other users
53 sed -i s%:x:%:-:% /tmp/passwd
54 echo zw963:x:1000:1000:zw963,,,:/fakehome/zw963:/bin/sh >> /tmp/passwd
55 rm /etc/passwd
56 mv /tmp/passwd /etc/passwd || warning 'Unable to change /etc/passwd. That may be a seurity risk.'
57
58 # create password entry for container user in /etc/shadow
59 rm -v /etc/shadow || warning 'Cannot change /etc/shadow. That may be a security risk.'
60 echo "zw963:sac19FwGGTx/A:17293:0:99999:7:::" > /etc/shadow
61 echo 'root:*:17219:0:99999:7:::' >> /etc/shadow
62
63 # add user to groups video, audio, systemd-journal
64 # replace container GIDs of video and audio with host GIDs
65 Gidvideo=44
66 Gidaudio=29
67 [ "$Gidvideo" ] || Gidvideo=$(getent group video | cut -d: -f3)
68 [ "$Gidaudio" ] || Gidaudio=$(getent group audio | cut -d: -f3)
69 getent group | sed "s/^video.*/video:x:$Gidvideo:$(getent group video | cut -d: -f4 ),zw963/ ;
70 s/^audio.*/audio:x:$Gidaudio:$(getent group audio | cut -d: -f4 ),zw963/ ;
71 s/^systemd-journal.*/\0,zw963/ " | sed 's/:,/:/' > /tmp/group
72 cp /tmp/group /etc/group
73
74 # create user group entry (and delete possibly existing same gid)
75 getent group | grep -v $(getent group 1000 || echo USERNOTFOUND) > /tmp/group
76 echo zw963:x:1000: >> /tmp/group
77 mv /tmp/group /etc/group
78
79 mkdir -v -m 777 /fakehome
80
81 # create /etc/sudoers, delete /etc/sudoers.d. Overwrite possible sudo setups in image.
82 [ -e /etc/sudoers.d ] && rm -v -R /etc/sudoers.d
83 [ -e /etc/sudoers ] && rm -v /etc/sudoers
84 echo '# /etc/sudoers created by x11docker' > /etc/sudoers
85 echo 'root ALL=(ALL) ALL' >> /etc/sudoers
86
87 # restrict PAM configuration of su and sudo
88 echo 'auth sufficient pam_rootok.so' > /etc/pam.d/su # allow root to switch user without a password
89 [ -e /etc/pam.d/sudo ] && rm -v /etc/pam.d/sudo
90
91 # disable getty in inittab
92 [ -e /etc/inittab ] && sed -i 's/.*getty/##getty disabled by x11docker## \0/' /etc/inittab
93 echo 'x11docker: Container root setup is ready'
94 :> /x11docker.setupready
x11docker: Generated dockerrc:
1 #! /bin/bash
2 mkfile ()
3 {
4 : > "${1:-}";
5 chown $Hostuser "${1:-}";
6 chgrp $Hostusergid "${1:-}";
7 [ -n "${2:-}" ] && chmod ${2:-} "${1:-}" || :
8 }
9 rocknroll ()
10 {
11 [ -s "$Timetosaygoodbye" ] && return 1;
12 [ -e "$Timetosaygoodbye" ] || return 1;
13 return 0
14 }
15 waitforfilecreation ()
16 {
17 local Zeit= Warten= Dauer= Count=;
18 Zeit=$(date +%s);
19 verbose -d "Waiting for file creation of ${1:-}";
20 case ${2:-} in
21 "")
22 Warten=15
23 ;;
24 infinity | inf)
25 Warten=32000
26 ;;
27 *)
28 Warten=${2:-}
29 ;;
30 esac;
31 while [ ! "$(find "${1:-}" 2>/dev/null)" ]; do
32 Count=$(( Count + 1 ));
33 Dauer=$(( $(date +%s) - $Zeit ));
34 sleep $(awk "BEGIN { print $Count * 0.1 }");
35 [ $Warten -lt $Dauer ] && {
36 warning "Failed to wait for file creation of
37 ${1:-}";
38 return 1
39 };
40 verbose "Waiting since ${Dauer}s for ${1:-} to be created, will wait up to $Warten seconds.";
41 rocknroll || {
42 verbose -d "Stopped waiting for ${1:-} due to terminating signal.";
43 return 1
44 };
45 done;
46 verbose "Found new created file $(ls ${1:-})";
47 return 0
48 }
49 escapestring ()
50 {
51 echo "${1:-}" | LC_ALL=C sed -e 's/[^a-zA-Z0-9,._+@=:/-]/\\&/g; 1{$s/^$/""/}; 1!s/^/"/; $!s/$/"/'
52 }
53 Hostuser=zw963
54 Hostusergid=1000
55 Timetosaygoodbye=/home/zw963/.cache/x11docker/X200-x11docker-xfce/share/timetosaygoodbye
56
57 warning() {
58 echo "$*:WARNING" >&3
59 }
60 note() {
61 echo "$*:NOTE" >&3
62 }
63 verbose() {
64 echo "$*:VERBOSE" >&3
65 }
66 debugnote() {
67 echo "$*:DEBUGNOTE" >&3
68 }
69 error() {
70 echo "$*:ERROR" >&3
71 exit 1
72 }
73 stdout() {
74 echo "$*:STDOUT" >&3
75 }
76 exec 3<>/home/zw963/.cache/x11docker/X200-x11docker-xfce/share/message.fifo
77
78 verbose -d 'Running dockerrc'
79 Imagename="x11docker/xfce"
80 Imagecommand=""
81
82 # check whether docker daemon is running and refresh images.list for x11docker-gui
83 docker images --format '{{.Repository}}:{{.Tag}}' >>/home/zw963/.cache/x11docker/X200-x11docker-xfce/images.list 2>>/home/zw963/.cache/x11docker/X200-x11docker-xfce/container.log || error "Calling docker daemon failed.
84 Is docker daemon running at all?
85 Try to start docker daemon with:
86 systemctl start docker
87
88 Last lines of log:
89 $(tail /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.log)"
90 mkfile /home/zw963/.cache/x11docker/x11docker-gui/images.list
91 while read -r Line ; do
92 grep -q "<none>" <<<$Line || echo $Line >> /home/zw963/.cache/x11docker/x11docker-gui/images.list
93 done < <(sort < /home/zw963/.cache/x11docker/X200-x11docker-xfce/images.list)
94
95 # check if image is available locally
96 docker inspect --type=image x11docker/xfce >/dev/null 2>&1 || {
97 export DISPLAY=:0 XAUTHORITY=/home/zw963/.cache/x11docker/X200-x11docker-xfce/Xauthority-0 XSOCKET=/tmp/.X11-unix/X0 XDG_RUNTIME_DIR=/run/user/1000
98 dbus-launch konsole --nofork -e /bin/bash /home/zw963/.cache/x11docker/X200-x11docker-xfce/pullrc
99 waitforfilecreation /home/zw963/.cache/x11docker/X200-x11docker-xfce/pullready
100 docker inspect --type=image x11docker/xfce > /dev/null 2>&1 || error "Image 'x11docker/xfce' not found locally and not pulled from docker hub.
101
102 Last lines of log:
103 $(tail /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.log)"
104 }
105 # check CMD
106 [ -z "$Imagecommand" ] && {
107 # extract image command from image if not given on cli
108 Imagecommand="$(docker inspect --format='{{.Config.Cmd}}' x11docker/xfce)"
109 Imagecommand="${Imagecommand#[}"
110 Imagecommand="${Imagecommand%]}"
111 Imagecommand="${Imagecommand#/bin/sh -c }"
112 }
113 Tini="/x11docker/tini --"
114 Exec=exec
115 # check ENTRYPOINT
116 Entrypoint=$(docker inspect --format='{{.Config.Entrypoint}}' x11docker/xfce)
117 Entrypoint=${Entrypoint#[}
118 Entrypoint=${Entrypoint#/bin/sh -c }
119 Entrypoint=${Entrypoint%]}
120 echo "$Entrypoint" | grep -qE '/tini|/init|/systemd' && {
121 note "There seems to be an init system in ENTRYPOINT of image:
122 $Entrypoint
123 x11docker will run this instead of tini from host.
124 You can disable this ENTRYPOINT with option --no-entrypoint."
125 Tini=
126 }
127
128 [ -z "$Imagecommand$Entrypoint" ] && warning 'No image command specified and no CMD or ENTRYPOINT found in image.'
129
130 # create container.CMD.sh (shared with container and given as image command to docker run)
131 { echo '#! /bin/sh'
132 echo '# created startscript for docker run: container.CMD.sh'
133 echo '# runs as unprivileged user in container'
134 echo '
135 warning() {
136 echo "$*:WARNING" >&3
137 }
138 note() {
139 echo "$*:NOTE" >&3
140 }
141 verbose() {
142 echo "$*:VERBOSE" >&3
143 }
144 debugnote() {
145 echo "$*:DEBUGNOTE" >&3
146 }
147 error() {
148 echo "$*:ERROR" >&3
149 exit 1
150 }
151 stdout() {
152 echo "$*:STDOUT" >&3
153 }'
154 echo 'exec 3<>/x11docker/message.fifo'
155 echo ''
156 echo '# wait for container setup script do be ready'
157 echo 'Zeit=$(date +%s)'
158 echo 'for Count in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50; do'
159 echo ' [ -e /x11docker.setupready ] && break'
160 echo ' verbose "Waiting since $(($(date +%s) - $Zeit))s for container setup to be ready"'
161 echo ' sleep $(awk "BEGIN { print $Count*0.2 }")'
162 echo 'done'
163 echo ''
164 echo 'verbose -d "Running unprivileged user commands in container"'
165 echo ''
166 echo Imagecommand="\"$Imagecommand\""
167 echo Entrypoint="\"$Entrypoint\""
168 echo ''
169 echo 'verbose "Container system:'
170 echo '$(cat /etc/os-release)"'
171 echo ''
172 } >> /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/container.CMD.sh
173 {
174 echo ''
175 echo '# x11docker variable settings'
176 echo export USER="zw963"
177 echo mkdir -p -v /fakehome/zw963
178 echo 'export HOME="/fakehome/zw963"'
179 echo 'export DISPLAY=:200'
180 echo '[ -e /tmp/.X11-unix/X200 ] || ln -s /X200 /tmp/.X11-unix'
181 echo 'export XAUTHORITY=/x11docker/Xclientcookie'
182 echo 'verbose -d "Running dbus user session with: ${Dbus:-(none)}"'
183 echo ''
184 echo "[ -e \"\$XDG_RUNTIME_DIR\" ] || {"
185 echo ' export XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR'
186 echo ' mkdir -v -m 700 -p $XDG_RUNTIME_DIR'
187 echo ' export XDG_RUNTIME_DIR'
188 echo '}'
189 echo ''
190 echo 'export XDG_SESSION_TYPE=x11'
191 echo ''
192 echo ''
193 echo '# xpra environment settings'
194 echo 'export UBUNTU_MENUPROXY= QT_X11_NO_NATIVE_MENUBAR=1 MWNOCAPTURE=true MWNO_RIT=true MWWM=allwm'
195 echo 'export XPRA_XSHM=0'
196 echo ''
197 echo 'bash --version >/dev/null 2>&1 && export SHELL=/bin/bash || export SHELL=/bin/sh'
198 echo 'export TERM=xterm'
199 echo '[ -e /x11docker.LANG ] && export LANG="$(cat /x11docker.LANG)"'
200 echo '[ -e "/usr/share/zoneinfo/PRC" ] || export TZ=UTC-08'
201 echo '[ "$(date -Ihours)" != "2018-07-28T19+08:00" ] && export TZ=UTC-08'
202 echo '[ "$DEBIAN_FRONTEND" = noninteractive ] && unset DEBIAN_FRONTEND'
203 echo '[ "$DEBIAN_FRONTEND" = newt ] && unset DEBIAN_FRONTEND'
204 echo '# custom environment (--env)'
205 echo ''
206 echo 'env >> /x11docker/environment'
207 echo 'sed -i "/\(PWD=\|_=\)/d" /x11docker/environment'
208 echo 'verbose "Container environment:'
209 echo '$(env | sort)"'
210 echo 'verbose "Copy of environment stored in /x11docker/environment"'
211 echo ''
212 echo 'cd "$HOME"'
213 Workdir=$(docker inspect --format='{{.Config.WorkingDir}}' x11docker/xfce)
214 [ "$Workdir" ] && echo "[ -d \"$Workdir\" ] && cd \"$Workdir\" # WORKDIR in image"
215 echo ''
216 echo verbose -d "Running image command: $Tini \$Dbus $Entrypoint $Imagecommand"
217 echo "$Exec $Tini \$Dbus $Entrypoint $Imagecommand >>/x11docker/stdout 2>>/x11docker/stderr"
218 echo '# Ready for docker run'
219 } >> /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/container.CMD.sh
220
221 nl -ba >> /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/x11docker.log < /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/container.CMD.sh
222
223 read Containerid < <(docker run -d --tty --rm --name=x11docker_X200_57a700_x11docker-xfce \
224 --user=1000:1000 --env USER=zw963 \
225 --cap-drop ALL \
226 --volume /home/zw963/Dropbox/linux/utils/docker/bin/docker-init:/x11docker/tini:ro \
227 --security-opt no-new-privileges \
228 --security-opt label=type:container_runtime_t \
229 --group-add 29 \
230 --group-add 44 \
231 --tmpfs /run --tmpfs /run/lock \
232 --entrypoint=env \
233 --env container=docker \
234 -v /home/zw963/.cache/x11docker/X200-x11docker-xfce/share:/x11docker:rw \
235 -e DISPLAY=:200 -e XAUTHORITY=/x11docker/Xclientcookie \
236 -v /tmp/.X11-unix/X200:/X200:rw \
237 --workdir /tmp \
238 -- x11docker/xfce /bin/sh - /x11docker/container.CMD.sh 2>>/home/zw963/.cache/x11docker/X200-x11docker-xfce/container.log)
239
240 verbose -d "Container ID: $Containerid"
241 [ "$Containerid" ] || error "Startup of docker failed. Did not receive a container ID.
242
243 Last lines of container log:
244 $(tail /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.log)"
245 echo $Containerid >> /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.id
246 docker logs -f $Containerid >> /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.log 2>&1 &
247
248 # wait for container to be ready
249 for ((Count=1 ; Count<=20 ; Count++)); do
250 docker exec x11docker_X200_57a700_x11docker-xfce sh -c : 2>>/home/zw963/.cache/x11docker/X200-x11docker-xfce/container.log && { verbose -d 'Container is up and running.' ; break ; } || verbose -d "Container not ready on $Count. attempt, trying again."
251 sleep 0.2
252 done
253 Failure="$(cat /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.log | grep -v grep | grep -E 'Error response from daemon|OCI runtime exec' ||:)"
254 [ "$Failure" ] && {
255 echo "$Failure" >>/home/zw963/.cache/x11docker/X200-x11docker-xfce/container.log
256 error "Got error message from docker daemon:
257 $Failure"
258 }
259
260 docker inspect --format '{{ .NetworkSettings.IPAddress }}' x11docker_X200_57a700_x11docker-xfce >> /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.ip
261 verbose -d "Container IP: $(cat /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.ip)"
262
263 docker inspect --format '{{.State.Pid}}' x11docker_X200_57a700_x11docker-xfce >> /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.pid1pid
264 verbose -d "Host PID of container PID 1: $(cat /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.pid1pid)"
265
266 # get PID of container
267 Containerpid=$(ps ax | grep $Containerid | grep -v grep | grep -v ' logs' | awk '{print $1}')
268 verbose -d "Container PID: $Containerpid"
269 echo $Containerpid >> /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.pid
270
271 docker exec --tty -u root x11docker_X200_57a700_x11docker-xfce /bin/sh /x11docker/container.rootsetup.sh >>/home/zw963/.cache/x11docker/X200-x11docker-xfce/container.log 2>&1
272 exit 0
x11docker: Generated xtermrc:
1 #! /bin/bash
2 touchxtermready() {
3 bash -c 'touch /home/zw963/.cache/x11docker/X200-x11docker-xfce/xtermready'
4 trap - EXIT
5 exit
6 }
7 trap touchxtermready EXIT
8 export TERM=xterm SHELL=/bin/bash
9 bash -c "sudo -E bash /home/zw963/.cache/x11docker/X200-x11docker-xfce/dockerrc "
10 exit
x11docker: Generated xinitrc:
1 #! /bin/sh
2 Timetosaygoodbye=/home/zw963/.cache/x11docker/X200-x11docker-xfce/share/timetosaygoodbye
3 Bgpidfile=/home/zw963/.cache/x11docker/X200-x11docker-xfce/backgroundpids
4 storepid ()
5 {
6 echo ${1:-} ${2:-} >> $Bgpidfile;
7 verbose -d "Stored background pid ${1:-} of ${2:-}";
8 disown ${1:-} 2> /dev/null || :
9 }
10 rocknroll ()
11 {
12 [ -s "$Timetosaygoodbye" ] && return 1;
13 [ -e "$Timetosaygoodbye" ] || return 1;
14 return 0
15 }
16 waitfortheend ()
17 {
18 while rocknroll; do
19 bash -c "read -n1 -t1 <&8 ||:";
20 done
21 }
22 no_xhost ()
23 {
24 local Line=;
25 xhost;
26 xhost | tail -n +2 /dev/stdin | while read -r Line; do
27 xhost -$Line;
28 done;
29 xhost -;
30 [ "$(xhost | wc -l)" -gt "1" ] && {
31 warning "Remaining xhost permissions found on display $DISPLAY
32 $(xhost)";
33 return 1
34 };
35 return 0
36 }
37
38 warning() {
39 echo "$*:WARNING" >&3
40 }
41 note() {
42 echo "$*:NOTE" >&3
43 }
44 verbose() {
45 echo "$*:VERBOSE" >&3
46 }
47 debugnote() {
48 echo "$*:DEBUGNOTE" >&3
49 }
50 error() {
51 echo "$*:ERROR" >&3
52 exit 1
53 }
54 stdout() {
55 echo "$*:STDOUT" >&3
56 }
57 exec 3<>/home/zw963/.cache/x11docker/X200-x11docker-xfce/share/message.fifo
58
59 verbose -d 'Running xinitrc'
60 export DISPLAY=:200 XAUTHORITY=/home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie XSOCKET=/tmp/.X11-unix/X200 XPRA_XSHM=0 X11DOCKER_CACHE=/home/zw963/.cache/x11docker/X200-x11docker-xfce
61 # background color
62 xsetroot -solid '#7F7F7F'
63 # create new XAUTHORITY cookies
64 :> /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie
65 verbose 'Requesting trusted cookie from X server'
66 xauth -v -f /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie generate :200 . trusted timeout 3600
67 export XAUTHORITY=/home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie
68 [ -s '/home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie' ] || {
69 [ 'trusted' = 'untrusted' ] && note 'Could not create untrusted cookie.
70 Maybe your X server misses extension SECURITY.'
71 }
72 [ -s '/home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie' ] || {
73 # still no cookie? try to create one without extension security
74 verbose 'Failed to retrieve cookie from X server. Will bake one myself.'
75 xauth -f /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie add :200 . 3b208de047954b800df24e98bbc9bf7d
76 }
77 # create prepared cookie with localhost identification disabled by ffff, needed if X socket is shared. ffff means 'familiy wild'
78 Cookie=$(xauth -f /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie nlist | sed -e 's/^..../ffff/')
79 echo $Cookie | xauth -v -f /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie nmerge -
80 cp /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie /home/zw963/.cache/x11docker/X200-x11docker-xfce/Xservercookie
81 [ -s '/home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie' ] || warning 'Cookie creation failed!'
82 verbose "Created cookie: $(xauth list)"
83 chmod 644 /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie
84 export XAUTHORITY=/home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie
85 [ 'yes' = 'no' ] || [ ! -s '/home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie' ] && unset XAUTHORITY && warning 'X server :200 runs without cookie authentication.'
86 verbose 'Disabling any possible access to new X server possibly granted by xhost'
87 no_xhost
88 #
89 # set keyboard layout on :200 to same as on host
90 echo 'x11docker: keyboard layout:'
91 cat /home/zw963/.cache/x11docker/X200-x11docker-xfce/xkb_keymap
92 xkbcomp /home/zw963/.cache/x11docker/X200-x11docker-xfce/xkb_keymap :200
93 getscreensize() {
94 CurrentXaxis=$(xrandr | grep primary | cut -d' ' -f4 | cut -dx -f1 )
95 CurrentYaxis=$(xrandr | grep primary | cut -d' ' -f4 | cut -dx -f2 | cut -d+ -f1)
96 }
97 checkscreensize() {
98 getscreensize
99 [ "$Xaxis" = "$CurrentXaxis" ] || return 1
100 [ "$Yaxis" = "$CurrentYaxis" ] || return 1
101 return 0
102 }
103 getprimary() {
104 xrandr | grep -q primary || xrandr --output $(xrandr | grep ' connected' | head -n1 | cut -d' ' -f1) --primary
105 echo $(xrandr | grep primary | cut -d' ' -f1)
106 }
107 Output=$(getprimary)
108 verbose "Output of xrandr on :200
109 $(xrandr)"
110 touch /home/zw963/.cache/x11docker/X200-x11docker-xfce/Xready
111 waitfortheend
x11docker: Stored background pid 9509 of watchpidlist
x11docker: Stored background pid 9510 of watchmessagefifo
x11docker: Stored background pid 9512 of containershell
==> /home/zw963/.cache/x11docker/X200-x11docker-xfce/xinit.log <==
[mi] Extension "Composite" is not recognized
[mi] Only the following extensions can be run-time enabled:
[mi] Generic Events
[mi] DAMAGE
[mi] DOUBLE-BUFFER
[mi] GLX
[mi] MIT-SCREEN-SAVER
[mi] RANDR
[mi] RENDER
[mi] SECURITY
[mi] X-Resource
[mi] XFIXES
[mi] XINERAMA
[mi] SELinux
[mi] XTEST
[mi] XVideo
[mi] Extension "MIT-SHM" is not recognized
[mi] Only the following extensions can be run-time disabled:
[mi] Generic Events
[mi] DAMAGE
[mi] DOUBLE-BUFFER
[mi] GLX
[mi] MIT-SCREEN-SAVER
[mi] RANDR
[mi] RENDER
[mi] SECURITY
[mi] X-Resource
[mi] XFIXES
[mi] XINERAMA
[mi] SELinux
[mi] XTEST
[mi] XVideo
xinit: XFree86_VT property unexpectedly has 0 items instead of 1
Using authority file /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie
authorization id is 48
Writing authority file /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie
Using authority file /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie
1 entries read in: 0 new, 1 replacement
Writing authority file /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/Xclientcookie
access control enabled, only authorized clients can connect
access control enabled, only authorized clients can connect
x11docker: Running xinitrc
x11docker: keyboard layout:
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+inet(evdev)" };
xkb_geometry { include "pc(pc105)" };
};
Warning: Key <OUTP> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: Key <KITG> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: Key <KIDN> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: Key <KIUP> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: Key <RO> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: Key <I192> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: Key <I193> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: Key <I194> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: Key <I195> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: Key <I196> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: Key <I255> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
Warning: No symbols defined for <AB11> (keycode 97)
Warning: No symbols defined for <JPCM> (keycode 103)
Warning: No symbols defined for <I120> (keycode 120)
Warning: No symbols defined for <AE13> (keycode 132)
Warning: No symbols defined for <I149> (keycode 149)
Warning: No symbols defined for <I154> (keycode 154)
Warning: No symbols defined for <I168> (keycode 168)
Warning: No symbols defined for <I178> (keycode 178)
Warning: No symbols defined for <I183> (keycode 183)
Warning: No symbols defined for <I184> (keycode 184)
Warning: No symbols defined for <FK19> (keycode 197)
Warning: No symbols defined for <FK24> (keycode 202)
Warning: No symbols defined for <I217> (keycode 217)
Warning: No symbols defined for <I219> (keycode 219)
Warning: No symbols defined for <I221> (keycode 221)
Warning: No symbols defined for <I222> (keycode 222)
Warning: No symbols defined for <I230> (keycode 230)
Warning: No symbols defined for <I247> (keycode 247)
Warning: No symbols defined for <I248> (keycode 248)
Warning: No symbols defined for <I249> (keycode 249)
Warning: No symbols defined for <I250> (keycode 250)
Warning: No symbols defined for <I251> (keycode 251)
Warning: No symbols defined for <I252> (keycode 252)
Warning: No symbols defined for <I253> (keycode 253)
x11docker: Requesting trusted cookie from X server
RandR extension missing
x11docker: Waiting since 0s for --xephyr to be ready.
RandR extension missing
x11docker: Created cookie: #ffff#7a773936332d5043#:200 MIT-MAGIC-COOKIE-1 ea08163bdab759f323aaeda90502d47b
RandR extension missing
RandR extension missing
x11docker: Disabling any possible access to new X server possibly granted by xhost
RandR extension missing
x11docker: Output of xrandr on :200
x11docker: Waiting since 0s for --xephyr to be ready.
x11docker: --xephyr is ready
x11docker: Stored background pid 9514 of xinit
x11docker: Stored background pid 9518 of Xserver
x11docker: Running dockerrc
1 #! /bin/sh
2 # created startscript for docker run: container.CMD.sh
3 # runs as unprivileged user in container
4
5 warning() {
6 echo "$*:WARNING" >&3
7 }
8 note() {
9 echo "$*:NOTE" >&3
10 }
11 verbose() {
12 echo "$*:VERBOSE" >&3
13 }
14 debugnote() {
15 echo "$*:DEBUGNOTE" >&3
16 }
17 error() {
18 echo "$*:ERROR" >&3
19 exit 1
20 }
21 stdout() {
22 echo "$*:STDOUT" >&3
23 }
24 exec 3<>/x11docker/message.fifo
25
26 # wait for container setup script do be ready
27 Zeit=$(date +%s)
28 for Count in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50; do
29 [ -e /x11docker.setupready ] && break
30 verbose "Waiting since $(($(date +%s) - $Zeit))s for container setup to be ready"
31 sleep $(awk "BEGIN { print $Count*0.2 }")
32 done
33
34 verbose -d "Running unprivileged user commands in container"
35
36 Imagecommand="startxfce4"
37 Entrypoint="/usr/local/bin/start"
38
39 verbose "Container system:
40 $(cat /etc/os-release)"
41
42
43 # x11docker variable settings
44 export USER=zw963
45 mkdir -p -v /fakehome/zw963
46 export HOME="/fakehome/zw963"
47 export DISPLAY=:200
48 [ -e /tmp/.X11-unix/X200 ] || ln -s /X200 /tmp/.X11-unix
49 export XAUTHORITY=/x11docker/Xclientcookie
50 verbose -d "Running dbus user session with: ${Dbus:-(none)}"
51
52 [ -e "$XDG_RUNTIME_DIR" ] || {
53 export XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR
54 mkdir -v -m 700 -p $XDG_RUNTIME_DIR
55 export XDG_RUNTIME_DIR
56 }
57
58 export XDG_SESSION_TYPE=x11
59
60
61 # xpra environment settings
62 export UBUNTU_MENUPROXY= QT_X11_NO_NATIVE_MENUBAR=1 MWNOCAPTURE=true MWNO_RIT=true MWWM=allwm
63 export XPRA_XSHM=0
64
65 bash --version >/dev/null 2>&1 && export SHELL=/bin/bash || export SHELL=/bin/sh
66 export TERM=xterm
67 [ -e /x11docker.LANG ] && export LANG="$(cat /x11docker.LANG)"
68 [ -e "/usr/share/zoneinfo/PRC" ] || export TZ=UTC-08
69 [ "$(date -Ihours)" != "2018-07-28T19+08:00" ] && export TZ=UTC-08
70 [ "$DEBIAN_FRONTEND" = noninteractive ] && unset DEBIAN_FRONTEND
71 [ "$DEBIAN_FRONTEND" = newt ] && unset DEBIAN_FRONTEND
72 # custom environment (--env)
73
74 env >> /x11docker/environment
75 sed -i "/\(PWD=\|_=\)/d" /x11docker/environment
76 verbose "Container environment:
77 $(env | sort)"
78 verbose "Copy of environment stored in /x11docker/environment"
79
80 cd "$HOME"
81
82 verbose -d Running image command: /x11docker/tini -- $Dbus /usr/local/bin/start startxfce4
83 exec /x11docker/tini -- $Dbus /usr/local/bin/start startxfce4 >>/x11docker/stdout 2>>/x11docker/stderr
84 # Ready for docker run
x11docker: Container ID: 4d7d32a414daa7750444a94d95d0a67d84267923c74a80342ce07587c859f86a
x11docker: Waiting since 0s for container setup to be ready
x11docker: Container is up and running.
x11docker: Container IP: 172.17.0.4
x11docker: Host PID of container PID 1: 9903
x11docker: Container PID: 9874
x11docker: Waiting since 0s for container setup to be ready
==> /home/zw963/.cache/x11docker/X200-x11docker-xfce/container.log <==
mkdir: created directory '/var/run/dbus'
mkdir: created directory '/tmp/.ICE-unix'
mkdir: created directory '/tmp/.X11-unix'
mkdir: created directory '/tmp/.font-unix'
lrwxrwxrwx 1 root root 5 Jul 28 11:46 /tmp/.X11-unix/X200 -> /X200
removed '/etc/shadow'
x11docker: Running setup as root in container
mkdir: created directory '/fakehome'
x11docker: Container root setup is ready
x11docker: Container libc: glibc
x11docker: Waiting for file creation of /home/zw963/.cache/x11docker/X200-x11docker-xfce/xtermready
x11docker: Found new created file /home/zw963/.cache/x11docker/X200-x11docker-xfce/xtermready
x11docker: Container system ID: debian
mkdir: created directory '/fakehome/zw963'
mkdir: created directory '/tmp/XDG_RUNTIME_DIR'
==> /home/zw963/.cache/x11docker/X200-x11docker-xfce/share/stderr <==
/x11docker/tini: line 5: /x11docker/../bin.real/tini: No such file or directory
x11docker: Running unprivileged user commands in container
x11docker: Container system:
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
x11docker: Running dbus user session with: (none)
x11docker: Container environment:
container=docker
DISPLAY=:200
HOME=/fakehome/zw963
HOSTNAME=4d7d32a414da
LANG=en_US.UTF-8
MWNOCAPTURE=true
MWNO_RIT=true
MWWM=allwm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/tmp
QT_X11_NO_NATIVE_MENUBAR=1
SHELL=/bin/bash
TERM=xterm
UBUNTU_MENUPROXY=
USER=zw963
XAUTHORITY=/x11docker/Xclientcookie
XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR
XDG_SESSION_TYPE=x11
XPRA_XSHM=0
x11docker: Copy of environment stored in /x11docker/environment
x11docker: Running image command: /x11docker/tini -- /usr/local/bin/start startxfce4
x11docker ERROR: Container startup seems to have failed!
Last lines of container.log:
mkdir: created directory '/var/run/dbus'
mkdir: created directory '/tmp/.ICE-unix'
mkdir: created directory '/tmp/.X11-unix'
mkdir: created directory '/tmp/.font-unix'
lrwxrwxrwx 1 root root 5 Jul 28 11:46 /tmp/.X11-unix/X200 -> /X200
removed '/etc/shadow'
mkdir: created directory '/fakehome'
x11docker: Container root setup is ready
mkdir: created directory '/fakehome/zw963'
mkdir: created directory '/tmp/XDG_RUNTIME_DIR'
Last lines of command stderr:
/x11docker/tini: line 5: /x11docker/../bin.real/tini: No such file or directory
Last lines of command stdout:
Type 'x11docker --help' for usage information
For debugging, run x11docker in terminal and/or enable option '--verbose'
or look afterwards at logfile /home/zw963/.cache/x11docker/x11docker.log
Please report issues at https://github.com/mviereck/x11docker
Warning: Cannot convert string "vlines2" to type Pixmap
Warning: Missing charsets in String to FontSet conversion
x11docker: Terminating x11docker.
x11docker: time to say goodbye (finish-subshell)
==> /home/zw963/.cache/x11docker/X200-x11docker-xfce/xinit.log <==
xinit: connection to X server lost
waiting for X server to shut down x11docker: Terminating 9518 (Xserver) Xorg|Xephyr|Xvfb|Xwayland|nxagent: 9518 pts/5 00:00:00 Xnest <defunct>
x11docker: time to say goodbye (watchpidlist)
x11docker: time to say goodbye (xinit)
x11docker: Terminating x11docker.
x11docker: Terminating 9512 (containershell) x11docker: 9512 pts/5 00:00:00 x11docker
x11docker: Terminating 9510 (watchmessagefifo) x11docker: 9510 pts/5 00:00:00 x11docker
x11docker: time to say goodbye (finish)
x11docker: Exitcode 1
I think my docker config is correct, because i can run kcachegrind in my another own build images
with -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix
.
I use v4.3.6 from git repo. thanks
from x11docker.
Can you please show me the output of:
ls -l /home/zw963/Dropbox/linux/utils/docker/bin/docker-init
The log shows an issue with init system tini
, stored as docker-init
on your system.
The resulting path in container /x11docker/../bin.real/tini
does not make sense and causes the error.
Maybe the path /home/zw963/Dropbox/linux/utils/docker/bin/docker-init
is a softlink and x11docker has to resolve it.
from x11docker.
@mviereck , thanks for quickly reply.
╰─ $ cat /home/zw963/Dropbox/linux/utils/docker/bin/docker-init
#!/bin/bash
ROOT=$(dirname `readlink -e $0`)/..
name=$(basename $0)
exec -a $name $ROOT/bin.real/$name "$@"
Yes, it is a link, but not a softlink, just a wrapper for docker commends, following is my own
docker compiled docker work tree:
├── bin
│ ├── docker
│ ├── docker-compose
│ ├── docker-containerd
│ ├── docker-containerd-ctr
│ ├── docker-containerd-shim
│ ├── dockerd
│ ├── docker-detect
│ ├── docker-init
│ ├── docker-proxy
│ └── docker-runc
├── bin.real
│ ├── completion
│ │ ├── bash
│ │ │ └── docker
│ │ ├── fish
│ │ │ └── docker.fish
│ │ └── zsh
│ │ └── _docker
│ ├── docker
│ ├── docker-compose
│ ├── docker-containerd
│ ├── docker-containerd-ctr
│ ├── docker-containerd-shim
│ ├── dockerd
│ ├── docker-init
│ ├── docker-proxy
│ └── docker-runc
What i run is bin/docker
, or bin/dockerd
, those bash script just load bin.real same name binary.
from x11docker.
After move bin.real/docker-init to bin/docker-init (in fact, this wrapper script is do nothing), i can enter GUI now, thanks.
from x11docker.
Did you write the wrapper yourself, or it is something commonly used?
If this setup is somehow common, I would develop a general solution.
I just checked x11docker code, it already resolves symlinks to docker-init
. Instead of:
move bin.real/docker-init to bin/docker-init
you can set a symlink if you want to.
from x11docker.
Did you write the wrapper yourself, or it is something commonly used?
I don't think this pattern is common used by docker, though, i don't discuss what wrong with this.
in fact, why I do like this, just for my own purpose, e.g. following is my dockerd
exec -a dockerd sudo $ROOT/bin.real/dockerd \
--data-root $docker_directory/containers \
--userland-proxy=false \
--registry-mirror=https://registry.docker-cn.com \
"$@"
just for extra dockerd options is specified. docker-init no need for this, i think this just is a my own bug.
thanks.
from x11docker.
Related Issues (20)
- x11docker: Permission denied
- Clipboard not working when using --xwayland HOT 4
- What is x11docker doing differently? HOT 2
- How to add microphone access to container for multiple clients? HOT 3
- Pass --device option to podman HOT 1
- wrong repo sorry
- Run X11 server on Ubuntu Server Installtion? HOT 3
- Using --gpu with rootless podman
- How to make a container not disappear after x11docker is shut down, how to start the previous container on startup HOT 1
- x11docker ERROR: Image xx:xx not found locally (with docker engine) HOT 2
- Disable system keyboard repeat for the running window HOT 1
- x11docker doesn't seem to recognise nvidia vgpu HOT 1
- Question: Using Viewer From Different Host (Client/Viewer) HOT 1
- PID Judge comes too fast results in premature kill. HOT 2
- --pulseaudio fails with pipewire
- Application not fill the entire window and not resizing correctly
- Did not receive PID of PID1 in container (podman)
- how do i create my own custom (updated) docker images HOT 2
- accessing gpu for Mali G610 from docker in orangepi 5, on ubuntu 20 docker with host ubuntu 22. HOT 2
- Unable to start weston and wayland session without pre-existing wayland compositor in Docker
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from x11docker.