Install QQ/TIM in Linux with Wine

This tutorial introduces how to install QQ/TIM in Linux with Wine, which had been tested on ArchLinux with Wine 2.4.

Prerequisites

Before start, you need to get the latest Wine. I'm not sure whether QQ/TIM can run on lower version of Wine. In ArchLinux, you can easily get the latest Wine using following command:

pacman -S wine

However, in Debian, you need to install Wine with some more steps. You can see this tutorial.

Then, you need to install a helper of Wine, Winetricks. Winetricks is a script to download and install various redistributable runtime libraries needed to run some programs in Wine. To install Winetricks, you can use following command:

sudo wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks -O /usr/local/bin/winetricks
sudo chmod a+x /usr/local/bin/winetricks

After that, we need to fix some problems manually caused by Winetricks. According to this Bug Report, we need to download W2KSP4_EN.EXE from other mirror sites:

mkdir -p $HOME/.cache/winetricks/win2ksp4/
wget ftp://ftp.gnome.org/mirror/archive/ftp.sunet.se/pub/security/vendor/microsoft/win2000/Service_Packs/usa/W2KSP4_EN.EXE -O $HOME/.cache/winetricks/win2ksp4/W2KSP4_EN.EXE

Similarly, we need to download InstMsiW.exe manually:

mkdir -p $HOME/.cache/winetricks/msls31
wget ftp://ftp.iop.org/pub/ESXP6/instmsiw.exe -O $HOME/.cache/winetricks/msls31/InstMsiW.exe

Initialize Wine Environment

To create a 32-bit WINE system, you need to open a terminal and run the following command:

 WINEARCH=win32 wine wineboot 

Then you need to run winecfg in terminal and change Windows version to Windows 7.

Install Core Fonts

Next, we are going to install essential fonts for Wine.

winetricks corefonts cjkfonts

where corefonts stands for MS Arial, Courier, Times fonts, and cjkfonts denotes all Chinese, Japanese and Korean fonts and alias.

Install Windows Components

Then, we need to install components which are need by QQ / TIM.

winetricks msxml6 riched20 riched30 vcrun6

where msxml6 represents MS XML Core Services 6.0 SP1, riched20 and riched30 mean MS RichEdit Control 2.0 and MS RichEdit Control 3.0 respectively, and vcrun6 is Visual C++ 6 SP4 libraries.

You are supposed to be asked to fill in information during the MSXML6 installation.

Install QQ / TIM

In this section, we are about to install QQ / TIM. We are assume that you have already get installers from official website. Run your installer with following command:

LC_ALL=zh_CN.utf8 wine /path/to/installer.exe

In this tutorial, we use TIM installer as an example:

Please be patient and ignore following error message in terminal:

[8:142:0322/131343:4128351:ERROR:qd_helper.cpp(234)] 328 Status: 2

An instance of QQ / TIM will automatically started after installation finished.

Due to security check of QQ / TIM, QQ cannot start normally when you restart your PC. We need to apply a patch to remove security check components. You can download this patch from this link or search "QQ安全校验补丁" from the Internet.

After unzip this patch, use following commands to apply this patch:

mv QQ-Security-Check-10.0.exe ~/.wine/drive_c/Program\ Files/Tencent/QQ/Bin
LC_ALL=zh_CN.utf8 wine ~/.wine/drive_c/Program\ Files/Tencent/QQ/Bin/QQ-Security-Check-10.0.exe

Click the "应用" button.

Create Shortcut

Now you can start QQ using following commands:

# Start QQ
LC_ALL=zh_CN.utf8 wine ~/.wine/drive_c/Program\ Files/Tencent/QQ/Bin/QQ.exe

# Or start TIM
LC_ALL=zh_CN.utf8 wine ~/.wine/drive_c/Program\ Files/Tencent/TIM/Bin/TIM.exe

In order to start up QQ / TIM, you can create a desktop entry in /usr/share/applications/TIM.desktop as follows:

[Desktop Entry]
Categories=Network;InstantMessaging;
Exec=env LC_ALL=zh_CN.utf8 wine $HOME/.wine/drive_c/Program\ Files/Tencent/TIM/Bin/TIM.exe
Icon=/path/to/logo.png
NoDisplay=false
StartupNotify=true
Terminal=false
Type=Application
Name[en_US]=TIM
Name[zh_CN]=TIM

Enjoy!

Known Issues

  • Cannot use remember password function.
  • Happy Neils

    The TIM can not run a long time. Actually, it just run for 1 minitues, then it will throw a error to carsh.

  • SimonChen

    You should replace the iphlpapi.dll . after do that, you can use find friend function and open url by default browser.

  • Xing Fang

    I'm in Linux mint18, after I followed this article, tim works in terminal but not in desktop shortcut.
    desktop-file-validate /usr/share/applications/TIM.desktop
    #=> error: value "$HOME/.wine/....." for key "Exec" in group "Desktop Entry" contains a reserved character '$' outside of a quote
    I changed $HOME to /home/fangxing, then it output nothing. However I still can not start TIM from desktop shotcut, but I can start it from terminal, finally I created a .sh file with: LC_ALL=zh_CN.utf8 wine /home/fangxing/.wine/drive_c/Program Files (x86)/Tencent/TIM/Bin/TIM.exe, then it works!

    • Yes, you're right.
      I've correct this in the article.

  • 王金彪
    • Maybe it is little hard to focus on this input control if you have installed all dependencies mentioned in this article.

  • yf z (追随)

    Hello, Can you copy text or other things in TIM or qq to outside?

    • yf z (追随)

      I found the solution. Because I use native ole32 wrongly.

Contact Us
  • Room 614, Zonghe Building, Harbin Institute of Technology
  • cshzxie [at] gmail.com