top-bettercode / docker-wechat

微信 docker 镜像
https://hub.docker.com/r/bestwu/wechat/
486 stars 69 forks source link

Failed to run docker-wechat: X Error of failed request: BadWindow (invalid Window parameter). #24

Open hongyi-zhao opened 3 years ago

hongyi-zhao commented 3 years ago

Hi,

On Ubuntu 2.04, I try to run docker-wechat but failed. See following for more info:

werner@X10DAi-01:~$ docker-compose -f docker-wechat.yml up
WARNING: Found orphan containers (qq) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Creating wechat ... done
Attaching to wechat
wechat    | 启动 WeChat
wechat    | Run Deepin-WeChat 2.6.8.65deepin0 c:/Program Files/Tencent/WeChat/WeChat.exe
wechat    | run Deepin-WeChat progress pid 
wechat    | 
wechat    | 7-Zip [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
wechat    | p7zip Version 16.02 (locale=zh_CN.UTF-8,Utf16=on,HugeFiles=on,32 bits,88 CPUs Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz (406F1),ASM,AES-NI)
wechat    | 
wechat    | Scanning the drive for archives:
wechat    | 1 file, 50232547 bytes (48 MiB)
wechat    | 
wechat    | Extracting archive: /opt/deepinwine/apps/Deepin-WeChat/files.7z
wechat    | --
wechat    | Path = /opt/deepinwine/apps/Deepin-WeChat/files.7z
wechat    | Type = 7z
wechat    | Physical Size = 50232547
wechat    | Headers Size = 9283
wechat    | Method = LZMA2:26 BCJ2
wechat    | Solid = +
wechat    | Blocks = 1
wechat    | 
wechat    | Everything is Ok
wechat    | 
wechat    | Folders: 109
wechat    | Files: 976
wechat    | Size:       156938730
wechat    | Compressed: 50232547
wechat    | total 0
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 c: -> ../drive_c
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com1 -> /dev/ttyS0
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com10 -> /dev/ttyS9
wechat    | lrwxrwxrwx 1 wechat wechat 11 11月  4 10:39 com11 -> /dev/ttyS10
wechat    | lrwxrwxrwx 1 wechat wechat 11 11月  4 10:39 com12 -> /dev/ttyS11
wechat    | lrwxrwxrwx 1 wechat wechat 11 11月  4 10:39 com13 -> /dev/ttyS12
wechat    | lrwxrwxrwx 1 wechat wechat 11 11月  4 10:39 com14 -> /dev/ttyS13
wechat    | lrwxrwxrwx 1 wechat wechat 11 11月  4 10:39 com15 -> /dev/ttyS14
wechat    | lrwxrwxrwx 1 wechat wechat 11 11月  4 10:39 com16 -> /dev/ttyS15
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com2 -> /dev/ttyS1
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com3 -> /dev/ttyS2
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com4 -> /dev/ttyS3
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com5 -> /dev/ttyS4
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com6 -> /dev/ttyS5
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com7 -> /dev/ttyS6
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com8 -> /dev/ttyS7
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com9 -> /dev/ttyS8
wechat    | lrwxrwxrwx 1 wechat wechat  8 11月  4 10:39 d:: -> /dev/sdb
wechat    | lrwxrwxrwx 1 wechat wechat 17 11月  4 10:39 e: -> /media/wayne/Ntfs
wechat    | lrwxrwxrwx 1 wechat wechat  9 11月  4 10:39 e:: -> /dev/sdb1
wechat    | lrwxrwxrwx 1 wechat wechat 12 11月  4 10:39 y: -> /home/wechat
wechat    | lrwxrwxrwx 1 wechat wechat  1 11月  4 10:39 z: -> /
wechat    | total 0
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 c: -> ../drive_c
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com1 -> /dev/ttyS0
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com10 -> /dev/ttyS9
wechat    | lrwxrwxrwx 1 wechat wechat 11 11月  4 10:39 com11 -> /dev/ttyS10
wechat    | lrwxrwxrwx 1 wechat wechat 11 11月  4 10:39 com12 -> /dev/ttyS11
wechat    | lrwxrwxrwx 1 wechat wechat 11 11月  4 10:39 com13 -> /dev/ttyS12
wechat    | lrwxrwxrwx 1 wechat wechat 11 11月  4 10:39 com14 -> /dev/ttyS13
wechat    | lrwxrwxrwx 1 wechat wechat 11 11月  4 10:39 com15 -> /dev/ttyS14
wechat    | lrwxrwxrwx 1 wechat wechat 11 11月  4 10:39 com16 -> /dev/ttyS15
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com2 -> /dev/ttyS1
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com3 -> /dev/ttyS2
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com4 -> /dev/ttyS3
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com5 -> /dev/ttyS4
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com6 -> /dev/ttyS5
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com7 -> /dev/ttyS6
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com8 -> /dev/ttyS7
wechat    | lrwxrwxrwx 1 wechat wechat 10 11月  4 10:39 com9 -> /dev/ttyS8
wechat    | lrwxrwxrwx 1 wechat wechat  8 11月  4 10:39 d:: -> /dev/sdb
wechat    | lrwxrwxrwx 1 wechat wechat 17 11月  4 10:39 e: -> /media/wayne/Ntfs
wechat    | lrwxrwxrwx 1 wechat wechat  9 11月  4 10:39 e:: -> /dev/sdb1
wechat    | lrwxrwxrwx 1 wechat wechat 12 11月  4 10:39 y: -> /home/wechat
wechat    | lrwxrwxrwx 1 wechat wechat  1 11月  4 10:39 z: -> /
wechat    | CallApp Deepin-WeChat c:/Program Files/Tencent/WeChat/WeChat.exe
wechat    | Disable auto update
wechat    | rm: cannot remove '/home/wechat/.deepinwine/Deepin-WeChat/drive_c/users/wechat/Application Data/Tencent/WeChat/All Users/config/configEx.ini': 没有那个文件或目录
wechat    | 2020年 11月 04日 星期三 10:39:36 UTC:kill WeChat.exe block
wechat    | 2020年 11月 04日 星期三 10:39:36 UTC:No wine process found
wechat    | /home/wechat/.deepinwine/Deepin-WeChat/drive_c/Program Files/Tencent/WeChat
wechat    | Starting process c:/Program Files/Tencent/WeChat/WeChat.exe ...
wechat    | X Error of failed request:  BadWindow (invalid Window parameter)
wechat    |   Major opcode of failed request:  20 (X_GetProperty)
wechat    |   Resource id in failed request:  0x0
wechat    |   Serial number of failed request:  10
wechat    |   Current serial number in output stream:  10
wechat    | 退出
wechat exited with code 0

werner@X10DAi-01:~$ cat docker-wechat.yml 
version: '2'
services:
  wechat:
    image: bestwu/wechat
    container_name: wechat
    devices:
      - /dev/snd
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix
      - $HOME/WeChatFiles:/WeChatFiles
    environment:
      - DISPLAY=unix$DISPLAY
      - QT_IM_MODULE=fcitx
      - XMODIFIERS=@im=fcitx
      - GTK_IM_MODULE=fcitx
      # getent group audio | cut -d: -f3
      - AUDIO_GID=29 # 可选 默认63(fedora) 主机audio gid 解决声音设备访问权限问题
      - GID=1000 # 可选 默认1000 主机当前用户 gid 解决挂载目录访问权限问题
      - UID=1000 # 可选 默认1000 主机当前用户 uid 解决挂载目录访问权限问题
werner@X10DAi-01:~$ docker -v
Docker version 19.03.12, build 48a66213fe

Any hints for this problem?

Regards, HY

top-bettercode commented 3 years ago

install gnome-settings-daemon,run /usr/lib/gsd-xsettings or install xfce4-settings, run /usr/bin/xfsettingsd

see https://www.cnblogs.com/fly2wind/p/10680428.html

hongyi-zhao commented 3 years ago

install gnome-settings-daemon,run /usr/lib/gsd-xsettings

For Ubuntu 20.04, the file is located at:

$ apt-file search -x /gsd-xsettings$
gnome-settings-daemon: /usr/libexec/gsd-xsettings
hongyi-zhao commented 3 years ago

Though I successfully started the wechat now, but I can log into the desktop with normal way anymore. See the following screenshot for the error message:

image

If I want to log into the desktop, I must run startx command from terminal.

Any hints for this problem?

Regards, HY