• Stars
    star
    2,245
  • Rank 20,508 (Top 0.5 %)
  • Language
    Shell
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DoChat is a Dockerized WeChat (盒装微信) PC Windows Client for Linux

DoChat /dɑɑˈtʃæt/ 盒装微信

Docker Powered By Wine

dockeri.co

DoChat(盒装微信) is a Dockerized WeChat(微信) PC Windows Client for Linux.

DoChat

Image Credit: Docker 101 + Icon Finder, and Ps-ed by Ruoxin Song

Honors

Disclaimer

We have received reports from our user said that their WeChat account has been disabled after using this project, so use it at your own risk:

  1. 昨天用了一下最新版的docker镜像立马微信就被封了 #55

Usage Powered Linux

WeChat PC will be started on your Linux desktop by running the following one-line command:

curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh | bash

If you’re in China, try the following one-line command if the above one-line command does not work well:

curl -sL https://gitee.com/mirrors/dochat/raw/main/dochat.sh | bash

Just copy/paste the above one-line command to your terminal and press Enter. Then the WeChat PC should appear in your XWindows desktop shortly.

DoChat Term Command

Attention

The dochat.sh script must not be with uid 0 (root user). Running it with uid 0 will lead to an infinite loop that is hard to kill from the terminal. If your user doesn't have the right to run docker please add the user to the docker group sudo usermod -aG docker $USER. A reboot might be neccessary for the changes to take place.

The issue is described in #60.

Features

It just works out-of-the-box with one-line of shell command!

  1. Input/Display Chinese characters perfectly.
  2. Paste copied images to WeChat with Ctrl+V

DoChat Screenshot

Requirements

  1. Linux Ubuntu distribution will be recommended (DoChat was developed with the Ubuntu Desktop 19.10)
    1. Debian support confirmed (#9)
    2. OpenSUSE Leap 15.1 support confirmed (#16)
    3. OpenSUSE Tumbleweed support confirmed (#150)
    4. Arch support confirmed (#26)
    5. Ubuntu(19.04/18.10/18.04) should be able to support
    6. Other Linux distributions: might be able to support
  2. Docker (run sudo apt update && apt install docker.io to install Docker for Ubuntu users)

Environment Variables

DOCHAT_DPI

DPI Scale Factors for graphic screen resolution.

DPI Scale factor
96 100%
120 125%
144 150%
192 200%

Default: 120

To enlarge the window & fonts size:

curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh \
  | DOCHAT_DPI=192 bash

DOCHAT_SKIP_PULL

If you do not want to pull docker image for the latest version at startup everytime, you can set DOCHAT_SKIP_PULL environment variable.

curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh \
  | DOCHAT_SKIP_PULL=true bash

In case you have downloaded dochat.sh:

DOCHAT_SKIP_PULL=true ./dochat.sh

DOCHAT_DEBUG

Show more debug log messages.

curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh \
  | DOCHAT_DEBUG=true bash

DOCHAT_WECHAT_VERSION

Use a specific version for WeChat.

You can get a full list of the supported versions from Docker Hub Image Tags at https://hub.docker.com/r/zixia/wechat/tags

For example:

curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh \
  | DOCHAT_WECHAT_VERSION=3.3.0.115 bash

For Hackers

If you want to control everything by yourself, for example, open multiple WeChat PC client on your desktop; then, you might want to inspect the dochat.sh in our repository and try the following docker command:

docker run \
  --name DoChat \
  --rm \
  -i \
  \
  -v "$HOME/DoChat/WeChat Files/":'/home/user/WeChat Files/' \
  -v "$HOME/DoChat/Applcation Data":'/home/user/.wine/drive_c/users/user/Application Data/' \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  \
  -e DISPLAY \
  \
  -e XMODIFIERS=@im=fcitx \
  -e GTK_IM_MODULE=fcitx \
  -e QT_IM_MODULE=fcitx \
  -e GID="$(id -g)" \
  -e UID="$(id -u)" \
  \
  --ipc=host \
  --privileged \
  \
  zixia/wechat

Modify it whatever you want to fulfill your needs.

Versioning

The docker image has two schema of the versioning:

  1. X.Y.Z.a: This is for the WeChat PC Windows Client version
    1. zixia/wechat:2.7.1.85: WeChat 2.7.1.85
    2. zixia/wechat:2.8.0.112: WeChat 2.8.0.112
  2. x.y: This is for the docker image version.
    1. zixia/wechat:0.2: docker-wechat version 0.2

The two version schema may overlap with each other.

For example: the zixia/wechat:0.2 may be the same image as the zixia/wechat:2.8.0.112.

Known Issues

  • WeChat 2.8.0.x can not send big images/files (#341)
    • Work around: use 2.7.1.85 instead. (DOCHAT_WECHAT_VERSION=2.7.1.85)
  • In-WeChat Browser does not work (#2)

To-do List

  • Permanent Storage for WeChat PC Login Data Information (#3)
  • Automatically install WeChat PC from .EXE installer when building the Dockerfile. (Test Automation tools might be needed)
  • Monitor WeChat PC version publications so that we can publish the same version number of the docker image with it.
  • Resolve the infinite loop situation when running with uid 0 (#60)
  • New feature: wechat_pc_api, #125

FAQ

System Tray Icon with Gnome Desktop

Install Gnome Extension: Top Icons Plus Git by bijignome

Note 1: there's almost half dozen of the TopIcons extensions with very similar name: TopIcons, TopIcons Redux, TopIcons Plus, TopIcons Plus Git, TopIconsFix. Use TopIcons Plus Git, it's the right one.

Note 2: The TopIcons Plus has the bug that cause the wine itself shows a window on your desktop. (#19)

Exit with code 5 on openSUSE Leap

When you encounter problem that the app exit with code 5 on openSUSE Leap, you need to disable X server access control to allow any user to connect to the X server before you start the app. Use below command to disable it:

$ xhost +

OpenSUSE Tumbleweed Configurations

To address the issue (#150) do the following: (Thanks Wu Bo)

$ xhost +; sudo chown -R $USER $HOME/DoChat/

No main window after start up with 2 or more monitor setup

This could be caused by an old bug in wine with multiple monitor setup. Workaround is to start it up with single monitor and then switch to multiple monitors

This behavior may cause the view disappear when you use the Join Displays mode, so you need change the mode to mirrors when the app start, this script may help:

#bin/bash
xrandr --output HDMI-1-2 --same-as eDP-1-1

curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh \
  | DOCHAT_SKIP_PULL=true bash &

sleep 5
xrandr --output HDMI-1-2 --right-of eDP-1-1

Change the HDMI-1-2 to your external display name and eDP-1-1 to your built in display name. Display more than two, link to this.

Notice: you must drag the login dialog to built in display side when the process sleep 5, otherwise the view may stuck in the external display.

Links

History

master v0.14

  1. Update to WeChat version 3.3.0.115 (#131)
  2. Upgrade to Wine version 6.0
  3. Upgrade to Debian 11 (bullseye)
  4. Rename default branch from master to main

v0.10 (Mar 12, 2020)

  1. Upgrade wine from v4.0 to v5.0
  2. Deploy to Docker Hub by GitHub Actions with Automatic WeChat Version Number.

v0.8 (Mar 3, 2020)

  1. Add a new configuration environment variable DOCHAT_WECHAT_VERSION to select WeChat version.
  2. Add WeChat v2.8.0.112
    1. 新增订阅号浏览
    2. 新增IPv6网络支持
    3. 新增看一看精选内容
    4. 新增打开聊天中小程序消息
    5. 新增在小程序中使用微信支付
    6. 新增聊天文件面板,可查看和管理所有聊天文件
curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh \
  | DOCHAT_WECHAT_VERSION=2.8.0.112 bash

v0.5 (Feb 24, 2020)

  1. Add environment variable DOCHAT_DPI to set DPI scale factors for graphicg screen resolution.
  2. Disable auto-update.

v0.4 (Feb 21, 2020)

Got a great logo from my art friend Ruoxin SONG.

  1. Fix Sound (#1)
  2. Fix to not exit during the upgrading progress.

v0.2 (Feb 18, 2020)

The first working version, cheers!

v0.1 (Feb 17, 2020)

Project created.

Thanks

  1. WeChat Desktop on Linux - by @ferrolho
  2. Wine HQ App Database - WeChat
  3. 基于深度操作系统的微信 docker 镜像 by @bestwu
  4. DoChat logo designed by my friend Ruoxin SONG.

Related Projects

  1. DoWork /dɑɑˈwɜːk/ 盒装企业微信: Dockerized WeChat Work (企业微信) PC Windows Client for Linux
  2. Put your WeChat in the box: https://github.com/ChisBread/wechat-box

Contributors

contributor contributor contributor contributor contributor contributor contributor contributor

Author

Huan LI (李卓桓) Tencent TVP of Chatbot [email protected]

Profile of Huan LI (李卓桓) on StackOverflow

Copyright & License

  • Code & Docs © 2020-now Huan LI <[email protected]>
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons

More Repositories

1

docker-simple-mail-forwarder

Simplest and Smallest Email Forward Service based on Docker.
Shell
537
star
2

node-facenet

Solve face verification, recognition and clustering problems: A TensorFlow backed FaceNet implementation for Node.js.
TypeScript
399
star
3

docker-wxwork

DoWork is a Dockerized WeChat Work (盒装企业微信) PC Windows Client for Linux
Shell
126
star
4

gast

Google Apps Script TAP Testing-framework
JavaScript
96
star
5

rx-queue

Easy to Use RxJS Queue for Throttle/Debounce/Delay/DelayExecute
JavaScript
73
star
6

file-box

Pack a File into Box for easy move/transfer between servers no matter of where it is.(local, remote url, or cloud storage)
TypeScript
56
star
7

mailbox

Mailbox is the predictable states & transitions container for actors.
TypeScript
48
star
8

sidecar

Easily hook/call binary functions using ES6 class with TypeScript annotation (Powered by Frida)
JavaScript
47
star
9

docker-windows

Run Windows GUI Applications in a Linux Docker Container
Shell
44
star
10

hot-import

Hot Module Replacement (HMR) for Node.js
TypeScript
23
star
11

sshpass.sh

a ssh loader wrote by bash shell script to let ssh accept command line password
Shell
23
star
12

docker-wine

Docker Base Image for Wine
Shell
21
star
13

flash-store

FlashStore is a high-performance Key-Value Persistent Local Database using ES6 Map's API (Async & Sync), Powered by LevelDB/RocksDB/SQLite and TypeScript.
TypeScript
21
star
14

gasl

Google Apps Script Logging-framework
JavaScript
20
star
15

tensorflow-handbook-javascript

TensorFlow Handbook for JavaScript/TypeScript
TypeScript
19
star
16

tensorflow-handbook-tpu

TensorFlow 2 Handbook for TPU on Google Cloud
Jupyter Notebook
17
star
17

wechaty-blinder

Face Blinder Bot Powered by Wechaty
TypeScript
15
star
18

swagger-edit

Swagger-Editor for local files like VIM.
JavaScript
14
star
19

gas-freshdesk

OO Freshdesk API(v2) Class for Google Apps Script
JavaScript
12
star
20

brolog

Logger for AngularJS in Browser like Npmlog
JavaScript
11
star
21

chinese-whispers

An Efficient Graph Clustering Algorithm for Node.js
TypeScript
9
star
22

swift-MNIST

Swift Module for MNIST Dataset
Swift
9
star
23

watchdog

An Timer used to Detect and Recover from Malfunctions
TypeScript
9
star
24

tstest

Helps you write better TypeScript programs
JavaScript
8
star
25

paper-morpho-vector-presentation

A Mini Review of Word Embedding in Morpho
TeX
7
star
26

ffi-adapter

Foreign Function Interface Adapter Powered by Decorator & TypeScript
TypeScript
6
star
27

tensorflow-handbook-swift

TensorFlow Handbook for Swift
Jupyter Notebook
6
star
28

emoji-net

EmojiNet is an image to emoji recognizer based on MobileNet / Google Emoji Scavenger Hunt
TypeScript
6
star
29

ng-plus-wechaty

Conversational AI TensorFlow.js NLP examples with Wechaty SDK and Angular
TypeScript
5
star
30

memory-card

Memory Card is an Easy to Use Key/Value Store Implements ES6 Map with Async API in Distribution Scenarios.
TypeScript
5
star
31

liao.ga

尬聊助手
4
star
32

awesome-lucid-dream

A lucid dream is a dream during which the dreamer is aware that they are dreaming.
4
star
33

clone-class

Clone an ES6 Class as Another Class Name for Isolating Class Static Properties.
JavaScript
4
star
34

state-switch

State Switch is a Monitor/Guard for Managing Your Async Operations.
TypeScript
4
star
35

dofi

DoFi is a Docker Wifi Manager for converting your PC/Raspberry Pi to a Wireless Router
Shell
3
star
36

docker-swift-tensorflow

Dockerized Swift for TensorFlow with Jupyter and GPU Support.
3
star
37

face-blinder

API for Whom is Suffering form Face Blindess
TypeScript
3
star
38

microsoft-ai-bootcamp

Global AI Bootscamp Beijing
2
star
39

Browser-based-Models-with-TensorFlow.js

Course: Browser-based Models with TensorFlow.js
JavaScript
2
star
40

ai-art-design-workshop

AI Art & Design Workshop
2
star
41

docker-chown

`chown -r` & `COPY --chown` not work in my Dockerfile (?!)
Shell
2
star
42

sockie

Easy to Use Reactive Extensioned WebSocket Client/Server Framework for Node.js
TypeScript
2
star
43

wechaty-io

DEPRECATED(use @chatie/io instead) Wechaty IO Server
TypeScript
1
star
44

sse-3d-seg

Secondary Structure Elements 3D Segmentation for Protein
1
star
45

mike-bo

Mike Bo is an assitant bot for Huan@PreAngel
TypeScript
1
star
46

awkward-chat-assistant

尬聊助手
1
star
47

bbsnet

zixia bbsnet
TypeScript
1
star
48

watchdog.icu

Watchdog ICU for your Cloud Service
TypeScript
1
star
49

pkg-jq

Find the nearest package.json then deal with jq syntax on it. (in-line edit supported!)
TypeScript
1
star
50

python-concise-chitchat

Concise Chit Chat in Python
Jupyter Notebook
1
star