Skip to content

Instantly share code, notes, and snippets.

@hackerzgz
Last active October 26, 2020 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hackerzgz/0ad8e64e25ed2ad5349f084ebcb387a3 to your computer and use it in GitHub Desktop.
Save hackerzgz/0ad8e64e25ed2ad5349f084ebcb387a3 to your computer and use it in GitHub Desktop.
Running wxwork on Linux by docker
#!/bin/env bash
# reference: https://github.com/BoringCat/docker-WXWork
WXWORK_NAME=wxwork
# enable xhost server
xhost +
sudo docker ps -a | grep -q "${WXWORK_NAME}"
if [ "$?" -eq "0" ]; then
sudo docker start "${WXWORK_NAME}"
exit 0
fi
# starting wxwork in docker
sudo docker run -d --name "${WXWORK_NAME}" --device /dev/snd --ipc host \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $HOME/WXWork:/WXWork \
-v $HOME:/HostHome \
-v $HOME/wine-WXWork:/home/wechat/.deepinwine/Deepin-WXWork \
-e DISPLAY=unix$DISPLAY \
-e XMODIFIERS=@im=fcitx \
-e QT_IM_MODULE=fcitx \
-e GTK_IM_MODULE=fcitx \
-e AUDIO_GID=`getent group audio | cut -d: -f3` \
-e GID=`id -g` \
-e UID=`id -u` \
-e DPI=96 \
-e WAIT_FOR_SLEEP=1 \
boringcat/wechat:work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment