Skip to content

Instantly share code, notes, and snippets.

@continue-revolution
Created January 3, 2024 12:35
Show Gist options
  • Select an option

  • Save continue-revolution/7ee9247066097fa77db88e9c95e46390 to your computer and use it in GitHub Desktop.

Select an option

Save continue-revolution/7ee9247066097fa77db88e9c95e46390 to your computer and use it in GitHub Desktop.
Docker script to setup Tencent QQ in Linux

QQ Docker Setup Code for Linux

System info: Ubuntu 22.04.3 LTS + KDE Plasma 5.27 + fcitx5

This bash script can quickly setup qq on linux, but it cannot enable you to type Chinese. I don't know how you can type Chinese in it. If you know, let me know.

# quick code to setup qq docker
docker run -it --name qq-container ubuntu:22.04 bash
# Update packages and install dependencies
apt update
apt install wget gdebi-core desktop-file-utils libgbm1 libasound2 fonts-wqy-zenhei fonts-wqy-microhei language-pack-zh-hans fcitx5 fcitx5-config-qt fcitx5-chinese-addons
# Download and install QQ
wget https://dldir1.qq.com/qqfile/qq/QQNT/9681283b/linuxqq_3.2.3-20201_amd64.deb
gdebi -n linuxqq_3.2.3-20201_amd64.deb
exit
docker commit qq-container qq-image
xhost +local:docker
# Run QQ in a Docker container with X11 and IBus support (container named qq-container)
docker run -it --name qq-container-p \
--env="DISPLAY" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
-e XMODIFIERS=@im=fcitx5 \
-e QT_IM_MODULE=fcitx5 \
-e GTK_IM_MODULE=fcitx5 \
-e AUDIO_GID=`getent group audio | cut -d: -f3` \
-e GID=`id -g` \
-e UID=`id -u` \
qq-image /usr/bin/qq --no-sandbox
docker restart qq-container-p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment