緣由:網(wǎng)頁版微信登錄不上瓷耙,找了很多方法無果
在網(wǎng)上搜到通過deepin-wine安裝微信:
https://blog.csdn.net/qq_27731689/article/details/93371065
https://www.lulinux.com/archives/1319
參照deepin-wine的gitee: https://gitee.com/wszqkzqk/deepin-wine-for-ubuntu
安裝deepin-wine
sudo git clone https://gitee.com/wszqkzqk/deepin-wine-for-ubuntu
sudo sh ./install.sh
下載微信版本https://mirrors.aliyun.com/deepin/pool/non-free/d/deepin.com.wechat/
安裝微信sudo dpkg -i deepin.com.wechat_2.6.8.65deepin0_i386.deb
遇到了版本不兼容朱躺,按照wiki下載了另外一個(gè)包
啟動(dòng)微信可在應(yīng)用程序中搜索wechat
微信啟動(dòng)后刁赖,出現(xiàn)中間有黑色方塊,重啟后有時(shí)有有時(shí)沒有,
方案1:有黑框的時(shí)候室琢,打開聊天窗口乾闰,在輸入框輸入可以提示出表情的文字(比如:666)可以去掉黑框落追,治標(biāo)不治本的方法
方案2:安裝xdotool盈滴,寫微信啟動(dòng)腳本,修改wechat的desktop配置文件轿钠,參見:修復(fù) wine 微信黑色色塊問題
1)安裝xdotool:
sudo apt-get install xdotool
- 微信啟動(dòng)腳本
新建腳本文件 “run-wechat.sh”, 寫入如下內(nèi)容:
#!/bin/bash
"/opt/deepinwine/apps/Deepin-WeChat/run.sh">/dev/null 2>&1
start_succ=false
for i in {1..5}
do
xdotool search --onlyvisible --classname "WeChat.exe"
if [ $? == 0 ]
then
start_succ=true
break
fi
sleep 10
done
if [ $start_succ == false ]
then
exit 1
fi
windowclose=false
while :
do
retval=$(xdotool search --onlyvisible --classname "WeChat.exe")
if [ $? != 0 ]
then
exit 0
fi
login=true
for id in $retval
do
windowname=$(xdotool getwindowname $id)
if [ "$windowname" == "登錄" ]
then
login=false
fi
if [ $windowclose == true ] && ([ "$windowname" == "" ] || [ "$windowname" == "ChatContactMenu" ])
then
xdotool windowclose $id
fi
done
if [ $windowclose == true ]
then
exit 0
fi
if [ $login == true ]
then
windowclose=true
fi
sleep 2
done
給腳本添加可執(zhí)行權(quán)限:
chmod +x ./run-wechat.sh
此時(shí)腳本設(shè)置完成巢钓,可以嘗試執(zhí)行此腳本。腳本會(huì)在微信成功登錄之后關(guān)閉黑色色塊.
3)修改微信快捷方式
找到微信的快捷方式疗垛,deepin-wine-wechat 的快捷方式為 /usr/share/applications/deepin.com.wechat.desktop, 將 desktop 文件中 Exec 一行修改為:
Exec="${path}/run-wechat.sh" -u %u
其中:
${path} 表示 run-wechat.sh 腳本所在路徑.
至此症汹,就可以通過快捷方式啟動(dòng)微信,并且擺脫黑色色塊的煩擾了.