Open Wentao0909 opened 5 years ago
我的也是 貌似没法解决 只能先用着ubuntu商店里的wechat了
我的也是,但是退出然后重启微信这个黑色的方框就消失了。勉强可以忍受
安装deepin桌面 在dde下用就没这问题
ubuntu18.04出现同样的问题
这里ubuntu18.10,我暂时写了一个脚本
先安装xdotool
$ sudo apt install xdotool
创建/opt/deepinwine/apps/Deepin-WeChat/runrun.sh
$ sudo vim /opt/deepinwine/apps/Deepin-WeChat/runrun.sh
#!/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 1
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" == "Log In" ]
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 0.5
done
修改desktop
文件
$ sudo vim /usr/share/applications/deepin.com.wechat.desktop
找到Exec
那一行,替换为
Exec="/opt/deepinwine/apps/Deepin-WeChat/runrun.sh"
sleep
的值是在自己电脑上调的,如果失败,尝试增大sleep
的值
OS:Ubuntu18.04
我的也是,打开微信后出现一个黑框,很难受,更奇怪的是关闭不了
只需要随便打开个人聊天,然后输入比如“开心”,然后会自动跳出表情包推荐(没跳出的话翻翻你的表情包名称随便找个)。再把字删掉,黑方块就没了。
@Espylapiza 的方法有用,十分感谢,不过要记得给runrun.sh加执行权限
sudo chmod +x /opt/deepinwine/apps/Deepin-WeChat/runrun.sh
只需要随便打开个人聊天,然后输入比如“开心”,然后会自动跳出表情包推荐(没跳出的话翻翻你的表情包名称随便找个)。再把字删掉,黑方块就没了。
实测,该方法有效
@Espylapiza 的方法有用,十分感谢,不过要记得给runrun.sh加执行权限
替换之后微信启动图标都看不见了,请问你遇到这种情况了吗 @Espylapiza
@laiweixing 你看下是不是路径设置错了或者是权限问题
@Espylapiza 的方法有用,十分感谢,不过要记得给runrun.sh加执行权限
其实不用增大sleep的值,只要看到dock微信图标那里有多个窗口指示器,再次点击微信运行黑框和多余的窗口就关闭了
@ Espylapiza的方法可行,不过我在试的时候需要修改一下sleep的值
只需要随便打开个人聊天,然后输入比如“开心”,然后会自动跳出表情包推荐(没跳出的话翻翻你的表情包名称随便找个)。再把字删掉,黑方块就没了。
真是个人才啊 哈哈
只需要随便打开个人聊天,然后输入比如“开心”,然后会自动跳出表情包推荐(没跳出的话翻翻你的表情包名称随便找个)。再把字删掉,黑方块就没了。
真是个人才啊 哈哈
我也是和别人聊天的时候突然发现的哈哈
这里ubuntu18.10,我暂时写了一个脚本
先安装
xdotool
$ sudo apt install xdotool
创建
/opt/deepinwine/apps/Deepin-WeChat/runrun.sh
$ sudo vim /opt/deepinwine/apps/Deepin-WeChat/runrun.sh
#!/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 1 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" == "Log In" ] 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 0.5 done
修改
desktop
文件$ sudo vim /usr/share/applications/deepin.com.wechat.desktop
找到
Exec
那一行,替换为Exec="/opt/deepinwine/apps/Deepin-WeChat/runrun.sh"
sleep
的值是在自己电脑上调的,如果失败,尝试增大sleep
的值
管用,感谢
脚本方法sleep时间加到5有效...
这里ubuntu18.10,我暂时写了一个脚本
先安装
xdotool
$ sudo apt安装xdotool
创建
/opt/deepinwine/apps/Deepin-WeChat/runrun.sh
$ sudo vim /opt/deepinwine/apps/Deepin-WeChat/runrun.sh
#!/ bin / bash “ /opt/deepinwine/apps/Deepin-WeChat/run.sh ” > / dev / null 2>&1 start_succ = false 对于 我 在 {} 1..5 做 xdotool搜索--onlyvisible --classname “ wechat.exe ” 如果 [ $? == 0] 然后 start_succ = true 打破 fi 睡觉1 完成 如果 [ $ start_succ == false ] 然后 退出 1 fi windowclose = false while : 做 retval = $( xdotool search --onlyvisible --classname “ wechat.exe ”) 如果 [ $? != 0] 然后 退出 0 fi login = true 为 ID 在 $ RETVAL DO windowname = $( xdotool getwindowname $ ID ) 如果 [ “ $ windowname ” == “登录” ] 然后 登录=假 科幻 如果 [ $ windowclose == 真 ] &&([ “ $ windowname ” == “ ” ] || [ “ $ windowname ” == “ ChatContactMenu ” ]) 然后 xdotool windowclose 的$ id 网络 做起来难 如果 [ $ windowclose == true ], 则 退出 0 fi 如果 [ $ login == true ] 则 windowclose = true 科幻 睡0.5 完成
修改
desktop
文件$ sudo vim /usr/share/applications/deepin.com.wechat.desktop
找到
Exec
那一行,替换为Exec="/opt/deepinwine/apps/Deepin-WeChat/runrun.sh"
sleep
的值是在自己电脑上调的,如果失败,尝试增大sleep
的值
有两个sleep,请问改哪个呢
这里ubuntu18.10,我暂时写了一个脚本 先安装
xdotool
$ sudo apt安装xdotool
创建
/opt/deepinwine/apps/Deepin-WeChat/runrun.sh
$ sudo vim /opt/deepinwine/apps/Deepin-WeChat/runrun.sh
#!/ bin / bash “ /opt/deepinwine/apps/Deepin-WeChat/run.sh ” > / dev / null 2>&1 start_succ = false 对于 我 在 {} 1..5 做 xdotool搜索--onlyvisible --classname “ wechat.exe ” 如果 [ $? == 0] 然后 start_succ = true 打破 fi 睡觉1 完成 如果 [ $ start_succ == false ] 然后 退出 1 fi windowclose = false while : 做 retval = $( xdotool search --onlyvisible --classname “ wechat.exe ”) 如果 [ $? != 0] 然后 退出 0 fi login = true 为 ID 在 $ RETVAL DO windowname = $( xdotool getwindowname $ ID ) 如果 [ “ $ windowname ” == “登录” ] 然后 登录=假 科幻 如果 [ $ windowclose == 真 ] &&([ “ $ windowname ” == “ ” ] || [ “ $ windowname ” == “ ChatContactMenu ” ]) 然后 xdotool windowclose 的$ id 网络 做起来难 如果 [ $ windowclose == true ], 则 退出 0 fi 如果 [ $ login == true ] 则 windowclose = true 科幻 睡0.5 完成
修改
desktop
文件$ sudo vim /usr/share/applications/deepin.com.wechat.desktop
找到
Exec
那一行,替换为Exec="/opt/deepinwine/apps/Deepin-WeChat/runrun.sh"
sleep
的值是在自己电脑上调的,如果失败,尝试增大sleep
的值有两个sleep,请问改哪个呢
上面的
把微信的 语言设置成了 英文,黑框 不见了 .(笑脸)
把微信的 语言设置成了 英文,黑框 不见了 .(笑脸)
:)真的耶
这里ubuntu18.10,我暂时写了一个脚本
先安装
xdotool
$ sudo apt install xdotool
创建
/opt/deepinwine/apps/Deepin-WeChat/runrun.sh
$ sudo vim /opt/deepinwine/apps/Deepin-WeChat/runrun.sh
#!/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 1 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" == "Log In" ] 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 0.5 done
修改
desktop
文件$ sudo vim /usr/share/applications/deepin.com.wechat.desktop
找到
Exec
那一行,替换为Exec="/opt/deepinwine/apps/Deepin-WeChat/runrun.sh"
sleep
的值是在自己电脑上调的,如果失败,尝试增大sleep
的值
我试了这个方法可以,但是一重启就不行了,然后我在vi打开改文件再关闭,然后重新运行微信又可以了,这个问题很迷惑啊,每次都需要vi打开文件不用改任何东西关闭才能消除黑框
@sp910 我觉得应该不是vi的问题 你可以试一下我修改过后的代码
#!/bin/bash
"/opt/deepinwine/apps/Deepin-WeChat/run.sh">/dev/null 2>&1
for i in {0..9}; do
xdotool search --onlyvisible --classname "wechat.exe"
if [ $? == 0 ]; then
break
fi
sleep 1
done
sleep 1
# wait for at most 1 hour
for i in {1..3600}; do
retval=$(xdotool search --onlyvisible --classname "wechat.exe")
if [ $? != 0 ]; then
exit 0
fi
login=false
for id in $retval; do
windowname=$(xdotool getwindowname $id)
if [ "$windowname" == "Log In" ]; then
login=true
break
fi
done
if [ $login == true ]; then
sleep 1
else
break
fi
done
sleep 0.5
for i in {0..49}; do
retval=$(xdotool search --onlyvisible --classname "wechat.exe")
if [ $? != 0 ]; then
exit 0
fi
for id in $retval; do
windowname=$(xdotool getwindowname $id)
if [ "$windowname" == "" ] || [ "$windowname" == "ChatContactMenu" ]; then
xdotool windowclose $id
fi
done
sleep 0.2
done
更新 deepin-wine 里的 微信 (双系统的话从windows里复制过来), 黑框也消失了
@sp910 我觉得应该不是vi的问题 你可以试一下我修改过后的代码
#!/bin/bash "/opt/deepinwine/apps/Deepin-WeChat/run.sh">/dev/null 2>&1 for i in {0..9}; do xdotool search --onlyvisible --classname "wechat.exe" if [ $? == 0 ]; then break fi sleep 1 done sleep 1 # wait for at most 1 hour for i in {1..3600}; do retval=$(xdotool search --onlyvisible --classname "wechat.exe") if [ $? != 0 ]; then exit 0 fi login=false for id in $retval; do windowname=$(xdotool getwindowname $id) if [ "$windowname" == "Log In" ]; then login=true break fi done if [ $login == true ]; then sleep 1 else break fi done sleep 0.5 for i in {0..49}; do retval=$(xdotool search --onlyvisible --classname "wechat.exe") if [ $? != 0 ]; then exit 0 fi for id in $retval; do windowname=$(xdotool getwindowname $id) if [ "$windowname" == "" ] || [ "$windowname" == "ChatContactMenu" ]; then xdotool windowclose $id fi done sleep 0.2 done
替换新代码之后,微信启动的同时和黑框一起消失了,啥也没有了。
更新 deepin-wine 里的 微信 (双系统的话从windows里复制过来), 黑框也消失了
你是更新的哪个版本呀,从哪里更新的呢?
更新 deepin-wine 里的 微信 (双系统的话从windows里复制过来), 黑框也消失了
你是更新的哪个版本呀,从哪里更新的呢?
微信 2.8.0.121, 我是双系统,从 windows 分区里复制微信安装目录到 ~/.deepinwine/Deepin-WeChat/drive_c/Program Files/Tencent
这就算更新了
更新 deepin-wine 里的 微信 (双系统的话从windows里复制过来), 黑框也消失了
你是更新的哪个版本呀,从哪里更新的呢?
微信 2.8.0.121, 我是双系统,从 windows 分区里复制微信安装目录到
~/.deepinwine/Deepin-WeChat/drive_c/Program Files/Tencent
这就算更新了
赞,你的方法简单又好使,是我目前试了所有方法里面唯一好使的
更新 deepin-wine 里的 微信 (双系统的话从windows里复制过来), 黑框也消失了
你是更新的哪个版本呀,从哪里更新的呢?
微信 2.8.0.121, 我是双系统,从 windows 分区里复制微信安装目录到
~/.deepinwine/Deepin-WeChat/drive_c/Program Files/Tencent
这就算更新了赞,你的方法简单又好使,是我目前试了所有方法里面唯一好使的
deepin-wine
的其他软件也可以这样更新
@liulu1998 现在微信的问题解决了,不知道你有没有在用企业微信,我现在遇到两个问题,一个是企业微信运行一段时间够系统卡的不行,吃cpu特别厉害,还有一个就是企业微信语音时我能听见别人声音,但是对方听不见我的声音,微信是正常的,所以麦克风肯定没问题,我用以上方法把企业微信也更新了,但是以上问题仍然存在,不知你有何好的建议吗?
@liulu1998 现在微信的问题解决了,不知道你有没有在用企业微信,我现在遇到两个问题,一个是企业微信运行一段时间够系统卡的不行,吃cpu特别厉害,还有一个就是企业微信语音时我能听见别人声音,但是对方听不见我的声音,微信是正常的,所以麦克风肯定没问题,我用以上方法把企业微信也更新了,但是以上问题仍然存在,不知你有何好的建议吗?
我目前还没用过 微信企业版。之前微信不能发图片是因为缺少依赖,语音的问题应该也是吧,具体的我就不清楚了。
替换之后微信启动图标都看不见了,请问你遇到这种情况了吗 @Espylapiza
我也是,然后我重新安装了一下?然后就好了,黑框框也不在了
有人成功使用过摄像头嘛,,,是不是我想太多了
@jiangzhengdu 图标是desktop文件控制的,你检查一下有没有改错了,以及chmod了没有
chmod 有效
把微信的 语言设置成了 英文,黑框 不见了 .(笑脸)
真的啊,666
这里ubuntu18.10,我暂时写了一个脚本
先安装
xdotool
$ sudo apt install xdotool
创建
/opt/deepinwine/apps/Deepin-WeChat/runrun.sh
$ sudo vim /opt/deepinwine/apps/Deepin-WeChat/runrun.sh
#!/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 1 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" == "Log In" ] 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 0.5 done
修改
desktop
文件$ sudo vim /usr/share/applications/deepin.com.wechat.desktop
找到
Exec
那一行,替换为Exec="/opt/deepinwine/apps/Deepin-WeChat/runrun.sh"
sleep
的值是在自己电脑上调的,如果失败,尝试增大sleep
的值
sleep 0.5 偶现黑框,sleep 1 后未再出现。 管用,感谢大佬。
/opt/deepinwine/ 默认为所属root, 修改为当前用户及用户组 $ sudo chown -R 当前用户:当前用户 /opt/deepinwine/ 重启后小黑框消失
这里ubuntu18.10,我暂时写了一个脚本
先安装
xdotool
$ sudo apt install xdotool
创建
/opt/deepinwine/apps/Deepin-WeChat/runrun.sh
$ sudo vim /opt/deepinwine/apps/Deepin-WeChat/runrun.sh
#!/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 1 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" == "Log In" ] 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 0.5 done
修改
desktop
文件$ sudo vim /usr/share/applications/deepin.com.wechat.desktop
找到
Exec
那一行,替换为Exec="/opt/deepinwine/apps/Deepin-WeChat/runrun.sh"
sleep
的值是在自己电脑上调的,如果失败,尝试增大sleep
的值
验证可行,感谢!调整语言为中文的话记得Log In
调整成登录
/opt/deepinwine/ 默认为所属root, 修改为当前用户及用户组 $ sudo chown -R 当前用户:当前用户 /opt/deepinwine/ 重启后小黑框消失
这个简单可用啊
不同于@espylapiza的脚本,我使用了一种不需要重写脚本的方法:
1.首先安装xdotool和wmctrl
sudo apt-get install xdotool
sudo apt-get install wmctrl
2.编辑run.sh
sudo gedit /opt/deepinwine/apps/Deepin-WeChat/run.sh
3.追加
sleep 2
B="登录"
C="
登录"
while true
do
sleep 2
A=`wmctrl -l -G -p -x | grep wechat.exe.Win | grep -v 微信| awk '{print $10 }'`;
if [ "$A" != "$C" ];then
if [ "$A" != "$B" ];then
wmctrl -l -G -p -x | grep wechat.exe.Wine | grep -v 微信| awk '{print $1}' | xargs -r -i xdotool windowunmap {};
break;
fi
fi
done
sleep 5
while true
do
A=`wmctrl -l -G -p -x | grep wechat.exe.Win | grep -v 微信| awk '{print $10 }'`;
if [ "$A" != "$C" ];then
if [ "$A" != "$B" ];then
wmctrl -l -G -p -x | grep wechat.exe.Wine | grep -v 微信| awk '{print $1}' | xargs -r -i xdotool windowunmap {};
break;
fi
fi
done
4.这只适用于中文ubuntu,英文的话需要修改代码中B和C——"登录”对应的英文,可以在微信登录窗口弹出时,开启一个新的终端输入 wmctrl -l -G -p -x | grep wechat.exe.Win | grep -v 微信| awk '{print $10 }'
查看对应的英文名称。
5.如果没有成功,可以试着先增大第2个sleep的值尝试(一般会没问题),还不行的话再增加第1/3个sleep的值,如果有其他问题,可以在我的博客留言 https://blog.csdn.net/qq_49030008/article/details/121367065
ubuntu mate 登录微信后,会出现一个小框,在屏幕中央。打开迅雷后有时候会消失,影响微信使用。不知道能不能解决。版本号 Ubuntu mate 16.04