Ubuntu20.04系统中安装微信、QQ和钉钉等应用(使用DeepinWine)

1.安装deepin-wine

首先将系统中的源修改为阿里云源或者是清华镜像源等等国内源,备份系统源并编辑apt源文件:

sudo mv /etc/apt/source.list /etc/apt/source.list.backup
sudo nano /etc/apt/source.list

这里笔者使用了清华镜像源,具体内容参考Ubuntu镜像使用帮助
然后更新源

sudo apt-get update

Wine可以使用官方的安装文件,但是官方的安装文件兼容性不是非常好,为了使得能够更好兼容系统,笔者这里选择了deepwine,同时在deepin中包含有很多兼容性比较好的Windows基本的deb安装文件。
创建临时下载文件夹

mkdir debpackages
cd debpackages

从清华镜像站中下载基本的安装包文件:

wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/deepin-wine/deepin-wine_2.18-22~rc0_all.deb
wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/deepin-wine/deepin-wine32_2.18-22~rc0_i386.deb
wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/deepin-wine/deepin-wine32-preloader_2.18-22~rc0_i386.deb
wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/deepin-wine-helper/deepin-wine-helper_1.2deepin8_i386.deb
wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/deepin-wine-plugin/deepin-wine-plugin_1.0deepin2_amd64.deb
wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/deepin-wine-plugin-virtual/deepin-wine-plugin-virtual_1.0deepin3_all.deb
wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/deepin-wine-uninstaller/deepin-wine-uninstaller_0.1deepin2_i386.deb
wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/u/udis86/udis86_1.72-2_i386.deb
wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/deepin-wine/deepin-fonts-wine_2.18-22~rc0_all.deb
wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/deepin-wine/deepin-libwine_2.18-22~rc0_i386.deb
wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.1-2_amd64.deb
wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.1-2_i386.deb

添加32位系统支持

sudo dpkg --add-architecture i386
sudo apt-get update

安装以上所有的文件

sudo dpkg -i *.deb

在安装过程中会出现依赖性关系的错误信息,可以直接对安装依赖进行修复

sudo apt-get install -f

或者是下面的命令,和上面的命令含义是等价的

sudo apt-get install --fix-broken

这样就成功安装了deepinwine

2. 安装Windows字体文件

在Linux系统中容易发生Windows字体缺失一些现象,导致一些应用不能正常显示文字信息,所以在这里可以将WIndows字体文件复制到Linux系统中。笔者这里使用的是Ubuntu20.04。命令行进入到Windows字体文件夹,复制过去即可:

sudo mkdir /usr/share/fonts/winfonts
sudo cp * /usr/share/fonts/winfonts

当然也可以将字体文件复制到文件夹/usr/local/share/fonts/winfonts下。然后将字体注册到系统中

cd /usr/share/fonts/microsoft/
sudo mkfontscale # 创建雅黑字体的fonts.scale文件,它用来控制字体旋转缩放
sudo mkfontdir # 创建雅黑字体的fonts.dir文件,它用来控制字体粗斜体产生
sudo fc-cache -fv # 建立字体缓存信息,也就是让系统认识认识雅黑

这样Windows系统字体文件就安装成功了。

3. 安装QQ、微信和钉钉

安装QQ、钉钉步骤比较简单,直接到对应的deepin源上下载安装即可

wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/deepin.com.qq.im/deepin.com.qq.im_9.1.8deepin0_i386.deb #QQ
wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/dingtalk/dingtalk_2.0.13-145_amd64.deb
sudo dpkg -i deepin.com.qq.im_9.1.8deepin0_i386.deb
sudo dpkg -i dingtalk_2.0.13-145_amd64.deb

打开之后可以直接使用。经过测试,QQ可以使用视频通话等等。
安装微信与上面的方法类似,下载并安装

wget https://mirrors.tuna.tsinghua.edu.cn/deepin/pool/non-free/d/deepin.com.wechat/deepin.com.wechat_2.6.8.65deepin0_i386.deb
sudo dpkg -i deepin.com.wechat_2.6.8.65deepin0_i386.deb

微信遇到的问题

安装成功之后发现不能正常显示文字。可以按照以下的方式安装
修改文件

sudo nano /opt/deepinwine/tools/run.sh

找到WINE_CMD修改为:

WINE_CMD="LC_ALL=zh_CN.UTF-8 deepin-wine"

下载msyh字体文件,下载地址如下所示

下载地址一:蓝奏云 (推荐)https://www.lanzous.com/i5wivmd
下载地址二:百度网盘 链接: https://pan.baidu.com/s/1rkjkmGJlpdaijCEWi7TZIw 提取码: btxw

解压文件夹,并将字体文件复制到对应Windows字体文件夹之下

cp msyh.ttc ~/.deepinwine/Deepin-WeChat/drive_c/windows/Fonts

修改微信容器中的注册表信息

nano ~/.deepinwine/Deepin-WeChat/system.reg

找到以下的信息并修改为

"MS Shell Dlg"="msyh"
"MS Shell Dlg 2"="msyh"

[Software\\Microsoft\\Windows NT\\CurrentVersion\\FontDpi] 1486457887一行和[Software\\Microsoft\\Windows NT\\CurrentVersion\\FontMapper] 1486457887修改注册表信息如下所示

[Software\\Microsoft\\Windows NT\\CurrentVersion\\FontLink\\SystemLink] 1603073841
#time=1d6a5bdf9fdae46
"Arial"="msyh.ttc"
"Arial Black"="msyh.ttc"
"Lucida Sans Unicode"="msyh.ttc"
"Microsoft Sans Serif"="msyh.ttc"
"MS Sans Serif"="msyh.ttc"
"msyh"="msyh.ttc"
"Tahoma"="msyh.ttc"
"Tahoma Bold"="msyhbd.ttc"

重新启动微信,就可以正常显示中文了。目前微信有一个bug就是不能够进行视频通话,这是一个缺陷。

QQ遇到的问题

登录QQ会发现无法正常显示头像,并且QQ群中的图片也无法正确显示,包括QQ界面也没有相应的图片设置,可以用下面的方法解决。

sudo nano /etc/sysctl.conf

在最下面添加

# IPv6 disabled
net.ipv6.conf.all.disable_ipv6 =1
net.ipv6.conf.default.disable_ipv6 =1
net.ipv6.conf.lo.disable_ipv6 =1

然后重新启动服务

sudo sysctl -p

清缓存

rm -rf~/.deepinwine/Deepin-QQ

这样重新启动QQ就可以看到头像了
方法来自于Deepin-TIM、QQ无法加载图片和头像

参考

[1] deepin wechat 中文乱码解决方案 Ubuntu18.04
[2] ubuntu20.04安装 deepin-wine

猜你喜欢

转载自blog.csdn.net/Zhang_Pro/article/details/109156145