ubuntu通过wine安装腾讯通rtx

1.系统设置->软件源->其他软件->添加,输入apt行:

ppa:ubuntu-wine/ppa

2.安装wine

sudo apt-get update
sudo apt-get install wine

3.下载winetricks安装wine中的windows组件

sudo apt-get install cabextract
winetricks riched20 msxml3 msxml6 vcrun6 win2k

msxml3, ie6, flash几个文件可能自动下载不了, 可以从下面的地址下载,用手工安装来替代winetricks安装:

 wget http://www.beyondlinux.com/files/pub/wine/msxml3.msi

或者这里下载msxml3.msi http://download.cnet.com/Microsoft-XML-Parser-MSXML-3-0-Service-Pack-7-SP7/3000-7241_4-10731613.html

wget http://www.beyondlinux.com/files/pub/wine/ie60.exe
wget http://www.beyondlinux.com/files/pub/wine/install_flash_player_ax.exe
wine msiexec /i msxml3.msi
wine ie60.exe
wine install_flash_player_ax.exe

其中如果64位系统,安装msxml6时,要下载64位的 http://www.microsoft.com/en-us/download/details.aspx?id=3988,下载完后再

wine msiexec /i /home/kyle/.cache/winetricks/msxml6/msxml6_x64.msi

4.从windows拷贝字体,修改Wine注册表,解决乱码问题

从Windows系统里(路径:c:/windows/Fonts/)复制宋体(SimSun.ttc)到~/.wine/dosdevices/c:/windows/Fonts/:

cp /home/zhu/simsun.ttc /.wine/drive_c/windows/Fonts

然后修改Wine注册表,终端输入regedit (界面和windows一样)
打开[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes]

MS Shell Dlg = SimSun
MS Shell Dlg 2 = SimSun
Tahoma = SimSun (手动新建字符串)

或者:创建zh.reg注册表文件,添加以下内容:

REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"Arial"="simsun"
"Arial CE,238"="simsun"
"Arial CYR,204"="simsun"
"Arial Greek,161"="simsun"
"Arial TUR,162"="simsun"
"Courier New"="simsun"
"Courier New CE,238"="simsun"
"Courier New CYR,204"="simsun"
"Courier New Greek,161"="simsun"
"Courier New TUR,162"="simsun"
"FixedSys"="simsun"
"Helv"="simsun"
"Helvetica"="simsun"
"MS Sans Serif"="simsun"
"MS Shell Dlg"="simsun"
"MS Shell Dlg 2"="simsun"
"System"="simsun"
"Tahoma"="simsun"
"Times"="simsun"
"Times New Roman CE,238"="simsun"
"Times New Roman CYR,204"="simsun"
"Times New Roman Greek,161"="simsun"
"Times New Roman TUR,162"="simsun"
"Tms Rmn"="simsun"

保存为zh.reg,然后执行regedit zh.reg导入注册表

5.安装RTX

wine rtxclient2010formal.exe

6.解决乱码问题

点开“应用程序”->“Wine”->“Configure Wine”->“函数库”->在“新增函数库顶替”中,输入“oleaut32.dll”,再点击“添加”->“应用”->“确定”。

7. 自动掉线的问题解决

在登录RTX后在“个人设置”里的“回复设置中”把“自动状态转换”的勾去掉。

8. 解决RTX对话窗口中姓名乱码的问题

在RTX的“个人设置”里的“姓名”重新设置一下

9. 通过命令启动rtx

在.bashrc中加入:

alias rtx='cd "/home/kyle/.wine/dosdevices/c:/Program Files (x86)/Tencent/RTXC/" && wine RTX.exe > /dev/null 2>&1 &'

然后执行 . .bashrc 生效。

10. 与compiz冲突的bug

通过wine运行的rtx,在关闭窗体的时候会导致unity异常,见 https://bugs.launchpad.net/compiz-core/+bug/993265 和 http://askubuntu.com/questions/141802/photoshop-cs2-under-wine-1-4-messes-up-unity-desktop。
unity界面死掉后,用 unity –replace 命令,或执行以下脚本:

#!/bin/bash
sudo killall compiz
compiz --replace

可以设置一个快捷键,执行 unity –replace > /dev/null & 命令。