Open baojiliu opened 1 year ago
Try
sudo pacman -S xorg-xhost
xhost +
https://github.com/huan/docker-wechat/issues/68#issuecomment-687655982
For ubuntu users, go
xhost +SI:localuser:YOUR_USER_NAME
I ran:
> xhost +
access control disabled, clients can connect from any host
Still seeing the same issue:
[DoChat] WeChat 3.3.0.115
[DoChat] Starting...
+ echo '[DoChat] Starting...'
+ '[' -n true ']'
+ wine 'C:\Program Files\Tencent\WeChat\WeChat.exe'
00e0:fixme:ver:GetCurrentPackageId (04BCFEF0 00000000): stub
00e0:fixme:sync:SetWaitableTimerEx (000000C0, 04BCFDA0, 0, 00000000, 00000000, 00000000, 1500) semi-stub
00dc:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
00dc:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
011c:fixme:iphlpapi:NotifyAddrChange (Handle 0x661fefc, overlapped 0x661fee4): stub
00dc:fixme:win:RegisterTouchWindow (00030040 00000000): stub
0120:err:seh:NtRaiseException Unhandled exception code c0000005 flags 0 addr 0x7bc2a1f5
I tinkered the script a bit to get an interactive shell:
diff --git a/dochat.sh b/dochat.sh
index 692aff0..55bdc93 100755
@@ -97,7 +97,7 @@ function main () {
"${DEVICE_ARG[@]}" \
--name DoChat \
--rm \
- -i \
+ -it \
\
-v "$HOME/DoChat/WeChat Files/":'/home/user/WeChat Files/' \
-v "$HOME/DoChat/Applcation Data":'/home/user/.wine/drive_c/users/user/Application Data/' \
--- a/dochat.sh
+++ b/dochat.sh
@@ -117,12 +117,13 @@ function main () {
-e UID="$(id -u)" \
\
--ipc=host \
\
+ --entrypoint /bin/bash \
"$DOCHAT_IMAGE_VERSION"
echo
And checked the X11 socket:
user@c400af7960ec:/$ whoami
user
user@c400af7960ec:/$ ls -l /tmp/.X11-unix/X0
srwxr-xr-x 1 root root 0 6月 20 18:13 /tmp/.X11-unix/X0
The socket itself is only writable by root, so the user running wechat cannot connect to it. An ugly hack could be to change the socket to be world writable (777
), but this also affects the socket in the host and is terrible security.
I'm not sure how to properly fix this. My user on the host (hugo
/1000
) maps to root on the container (i.e.: 0
). Running wechat as root inside the container would fix this, but would break in situations where docker itself is running as root.
在运行
DoChat
时,报错。随后启用DEBUG
模式,发现Make sure that your X server is running and that $DISPLAY is set correctly
,我认为X11
目录挂在是正常的。期待任何建议,谢谢。基本信息:
+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| +-----------------------------------------------------------------------------+
echo $DISPLAY :0 tree /tmp/.X11-unix /tmp/.X11-unix └── X0 0 directories, 1 file
错误日志: