docker-wechat
docker-wechat copied to clipboard
ubantu 20.04 运行脚本报权限错误
已经按照要求设置docker的用户组,切换到root用户运行脚本后还是会报错
[DoChat] 盒装微信 v0.15.0 Disabling patch for /home/user/.wine/drive_c/users/user/AppData/Roaming/Tencent/WeChat ... Disabling patch for /home/user/.wine/drive_c/users/user/Application Data/Tencent/WeChat ... mkdir: 无法创建目录 “/home/user/.wine/drive_c/users/user/Application Data/Tencent”: 权限不够
$HOME/DoChat 目录没有写权限。 执行 chown -R $USER $HOME/DoChat
谢谢大哥指教,运行后却报了EXIT0
[DoChat] 盒装微信 v0.15.0 Disabling patch for /home/user/.wine/drive_c/users/user/AppData/Roaming/Tencent/WeChat ... Disabling patch for /home/user/.wine/drive_c/users/user/Application Data/Tencent/WeChat ... [DoChat] WeChat 3.3.0.115 [DoChat] Starting... [DoChat] WeChat.exe exit with code 0 [DoChat] Found new version? [DoChat] WeChat.exe exited
要打开调试选项看看 wecat 退出的原因是什么
curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh
| DOCHAT_DEBUG=true bash
ubunut 20.04 有修复吗? 好像一直都有问题~
要打开调试选项看看 wecat 退出的原因是什么 curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh | DOCHAT_DEBUG=true bash
遇到了相同的问题,我DEBUG了一下:
[d@H ~]$ DOCHAT_DEBUG=true ./dochat.sh
____ ____ _ _
| _ \ ___ / ___| |__ __ _| |_
| | | |/ _ \| | | '_ \ / _` | __|
| |_| | (_) | |___| | | | (_| | |_
|____/ \___/ \____|_| |_|\__,_|\__|
https://github.com/huan/docker-wechat
+--------------+
/| /|
/ | / |
*--+-----------* |
| | | |
| | 盒装 | |
| | 微信 | |
| +-----------+--+
| / | /
|/ |/
*--------------*
DoChat /dɑɑˈtʃæt/ (Docker-weChat) is:
📦 a Docker image
🤐 for running PC Windows WeChat
💻 on your Linux desktop
💖 by one-line of command
🚀 Pulling the docker image...
Trying to pull docker.io/zixia/wechat:3.3.0.115...
Getting image source signatures
Copying blob 7da118dfd759 skipped: already exists
Copying blob 4492e3431c45 skipped: already exists
Copying blob 6770d884c4ca skipped: already exists
Copying blob 6479dda2349e skipped: already exists
Copying blob 489a5e619cf1 skipped: already exists
Copying blob dc2b599b494d skipped: already exists
Copying blob 27beeb660306 skipped: already exists
Copying blob 8b198ec01dfb skipped: already exists
Copying blob 2330e6709ff5 skipped: already exists
Copying blob 0580846f9751 skipped: already exists
Copying blob 71464f4fc36f skipped: already exists
Copying blob 07f320282ffc skipped: already exists
Copying blob a6308aac6678 skipped: already exists
Copying blob 98e390ac2ddd skipped: already exists
Copying blob bb7d5a84853b skipped: already exists
Copying config 69b2b2eb67 done
Writing manifest to image destination
Storing signatures
69b2b2eb67703d32f9764665a36e9b81a5d7cb97fbc5e90763e8f62a4da03f46
🚀 Pulling the docker image done. WARNING: you should run this program as super-user. WARNING: output may be incomplete or inaccurate, you should run this program as super-user. 🚀 Starting DoChat /dɑɑˈtʃæt/ ...
- main ++ id -u
- '[' 1000 -ne 0 ']'
- startWechat
- hello ++ cat /VERSION
- VERSION=0.15.0 [DoChat] 盒装微信 v0.15.0
- echo '[DoChat] 盒装微信 v0.15.0'
- setupFontDpi
- DELETE_KEYS=('HKEY_CURRENT_USER\Control Panel\Desktop' 'HKEY_CURRENT_USER\Software\Wine\Fonts')
- for key in "${DELETE_KEYS[@]}"
- wine reg DELETE 'HKEY_CURRENT_USER\Control Panel\Desktop' /v LogPixels /f
- true
- for key in "${DELETE_KEYS[@]}"
- wine reg DELETE 'HKEY_CURRENT_USER\Software\Wine\Fonts' /v LogPixels /f
- wine reg ADD 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Hardware Profiles\Current\Software\Fonts' /v LogPixels /t REG_DWORD /d 120 /f
- /dochat/patch-hosts.sh
- /dochat/disable-upgrade.sh Disabling patch for /home/user/.wine/drive_c/users/user/AppData/Roaming/Tencent/WeChat ... Disabling patch for /home/user/.wine/drive_c/users/user/Application Data/Tencent/WeChat ...
- '[' -n true ']'
- unset WINEDEBUG
- wine reg query 'HKEY_CURRENT_USER\Software\Tencent\WeChat'
HKEY_CURRENT_USER\Software\Tencent\WeChat NeedUpdateType REG_DWORD 0x0
- echo '[DoChat] DISPLAY=:2' [DoChat] DISPLAY=:2 ++ head -1 /home/VERSION.WeChat
- VERSION=3.3.0.115 [DoChat] WeChat 3.3.0.115 [DoChat] Starting...
- echo '[DoChat] WeChat 3.3.0.115'
- true
- echo '[DoChat] Starting...'
- '[' -n true ']'
- wine 'C:\Program Files\Tencent\WeChat\WeChat.exe' 00e0:fixme:ver:GetCurrentPackageId (04BCFEF0 00000000): stub 00e0:fixme:sync:SetWaitableTimerEx (000000BC, 04BCFDA0, 0, 00000000, 00000000, 00000000, 1500) semi-stub 00dc:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 00dc:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly. 011c:fixme:iphlpapi:NotifyAddrChange (Handle 0x661fefc, overlapped 0x661fee4): stub 00dc:fixme:win:RegisterTouchWindow (00030040 00000000): stub 00dc:err:seh:NtRaiseException Unhandled exception code c0000005 flags 0 addr 0x7bc2a1f5 [d@H ~]$
我用的AlmaLinux 9.
有人有什么解决办法嘛,试了Ubuntu和debian都是这个问题……
您好,您的邮件我已收到。我会尽快给您回复。
I solve this problem by adding
sudo chown $USER:$USER -R $HOME/DoChat
before running the docker container.
$HOME/DoChat 目录没有写权限。 执行 chown -R $USER $HOME/DoChat
Thanks you! it works
简单调试了下
情景一:
运行时加了 sudo,如下:
curl -sL https://gitee.com/mirrors/dochat/raw/main/dochat.sh | sudo bash
加 sudo
运行会导致脚本里的用户变为 root。会在 /root/Dochat/
映射 docker 目录。请执行以下命令修改权限:
sudo chown 1000:1000 /root/DoChat -R
完成后重新执行脚本。
情景二:
docker 用户组是 root。
会在 $HOME/DoChat
创建目录。目录权限为 root,需要修改权限,执行以下命令:
sudo chown 1000:1000 $HOME/DoChat -R
完成后重新执行脚本。
其他
如果开发者能将权限修改放到脚本内最好。
For English:
Scene One
If you are using sudo
, like this:
curl -sL https://gitee.com/mirrors/dochat/raw/main/dochat.sh | sudo bash
It promotes user to root
in script, and creates the directory in /root/DoChat
. You should give the directory appropriate permissions like this:
sudo chown 1000:1000 /root/DoChat -R
And re-run the script.
Scene Two
If the user group of docker
is root
, you should give the directory appropriate permissions too, like this:
sudo chown 1000:1000 $HOME/DoChat -R
And also re-run the script.
您好,您的邮件我已收到。我会尽快给您回复。
Same original issue 无法创建目录 ... 权限不够
, after runned sudo chown 1000:1000 /root/DoChat -R
appear new issue shows:
[DoChat] WeChat.exe exit with code 0
[DoChat] Found new version?
[DoChat] WeChat.exe exited
📦 DoChat Exited with code [0]
🐞 Bug Report: https://github.com/huan/docker-wechat/issues
The system is RancherOS
, full console log is:
[root@rancher ~]# wget https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh | bash
Connecting to raw.githubusercontent.com (185.199.110.133:443)
dochat.sh 100% |***********************************************************************| 3148 0:00:00 ETA
[root@rancher ~]# sudo chown 1000:1000 /root/DoChat -R
[root@rancher ~]# sudo chown 1000:1000 $HOME/DoChat -R
[root@rancher ~]# sudo bash dochat.sh
____ ____ _ _
| _ \ ___ / ___| |__ __ _| |_
| | | |/ _ \| | | '_ \ / _` | __|
| |_| | (_) | |___| | | | (_| | |_
|____/ \___/ \____|_| |_|\__,_|\__|
https://github.com/huan/docker-wechat
+--------------+
/| /|
/ | / |
*--+-----------* |
| | | |
| | 盒装 | |
| | 微信 | |
| +-----------+--+
| / | /
|/ |/
*--------------*
DoChat /dɑɑˈtʃæt/ (Docker-weChat) is:
📦 a Docker image
🤐 for running PC Windows WeChat
💻 on your Linux desktop
💖 by one-line of command
🚀 Pulling the docker image...
3.3.0.115: Pulling from zixia/wechat
Digest: sha256:851ef44dcbdaed6f0db8f538ea2a29d713292347a54ee711225f77682417673b
Status: Image is up to date for zixia/wechat:3.3.0.115
docker.io/zixia/wechat:3.3.0.115
🚀 Pulling the docker image done.
dochat.sh: line 82: lshw: command not found
🚀 Starting DoChat /dɑɑˈtʃæt/ ...
dochat.sh: line 96: getent: command not found
dochat.sh: line 96: getent: command not found
[DoChat] 盒装微信 v0.15.0
Disabling patch for /home/user/.wine/drive_c/users/user/AppData/Roaming/Tencent/WeChat ...
Disabling patch for /home/user/.wine/drive_c/users/user/Application Data/Tencent/WeChat ...
[DoChat] WeChat 3.3.0.115
[DoChat] Starting...
[DoChat] WeChat.exe exit with code 0
[DoChat] Found new version?
[DoChat] WeChat.exe exited
📦 DoChat Exited with code [0]
🐞 Bug Report: https://github.com/huan/docker-wechat/issues
Debug log:
[root@rancher ~]# sudo DOCHAT_DEBUG=true bash dochat.sh
____ ____ _ _
| _ \ ___ / ___| |__ __ _| |_
| | | |/ _ \| | | '_ \ / _` | __|
| |_| | (_) | |___| | | | (_| | |_
|____/ \___/ \____|_| |_|\__,_|\__|
https://github.com/huan/docker-wechat
+--------------+
/| /|
/ | / |
*--+-----------* |
| | | |
| | 盒装 | |
| | 微信 | |
| +-----------+--+
| / | /
|/ |/
*--------------*
DoChat /dɑɑˈtʃæt/ (Docker-weChat) is:
📦 a Docker image
🤐 for running PC Windows WeChat
💻 on your Linux desktop
💖 by one-line of command
🚀 Pulling the docker image...
Error response from daemon: error parsing HTTP 408 response body: invalid character '<' looking for beginning of value: "<html><body><h1>408 Request Time-out</h1>\nYour browser didn't send a complete request in time.\n</body></html>\n"
简单调试了下
情景一:
运行时加了 sudo,如下:
curl -sL https://gitee.com/mirrors/dochat/raw/main/dochat.sh | sudo bash
加
sudo
运行会导致脚本里的用户变为 root。会在/root/Dochat/
映射 docker 目录。请执行以下命令修改权限:sudo chown 1000:1000 /root/DoChat -R
完成后重新执行脚本。
情景二:
docker 用户组是 root。
会在
$HOME/DoChat
创建目录。目录权限为 root,需要修改权限,执行以下命令:sudo chown 1000:1000 $HOME/DoChat -R
完成后重新执行脚本。
其他
如果开发者能将权限修改放到脚本内最好。
For English:
Scene One
If you are using
sudo
, like this:curl -sL https://gitee.com/mirrors/dochat/raw/main/dochat.sh | sudo bash
It promotes user to
root
in script, and creates the directory in/root/DoChat
. You should give the directory appropriate permissions like this:sudo chown 1000:1000 /root/DoChat -R
And re-run the script.
Scene Two
If the user group of
docker
isroot
, you should give the directory appropriate permissions too, like this:sudo chown 1000:1000 $HOME/DoChat -R
And also re-run the script.
Yep,you are right.I use the root to run the script,and the solution2 works for me.Thanks a lot.
@Mehver You are missing the getent
command on your host. Ask in your distribution's support channels which package provide this command.
您好,您的邮件我已收到。我会尽快给您回复。