huan/docker-wechat

Not starting / endless loop in debug

f8-ptrk opened this issue · 5 comments

docker -v
Docker version 18.09.1, build 4c52b90
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
fluxbox -v
Fluxbox 1.3.5 : (c) 2001-2011 Fluxbox Team

After running

curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh | DOCHAT_DEBUG=true bash

the whole thing gets caught up in an endless loop of debug output:

  • export HOSTNAME=DoChat
  • HOSTNAME=DoChat
  • echo DoChat
  • hostname DoChat
  • exec gosu user:group /entrypoint.sh
    ++ id -u
  • '[' 0 -ne 0 ']'
  • '[' -n 29 ']'
  • groupmod -o -g 29 audio
  • '[' -n 44 ']'
  • groupmod -o -g 44 video
    ++ id -g user
  • '[' 0 '!=' 0 ']'
    ++ id -u user
  • '[' 0 '!=' 0 ']'
  • chown user:group '/home/user/.wine/drive_c/users/user/Application Data' '/home/user/WeChat Files'

No Wechat GUI showing up. Hard to kill with ctrl+c/d, needs basically a kill -9

ok. solved. the whole thing cannot be run as root.

function main () {

  if [ "$(id -u)" -ne '0' ]; then
    startWechat
  else
    /dochat/set-user-group.sh
    /dochat/set-hostname.sh
    #
    # Switch to user:group, and re-run self to run user task
    #
    exec gosu user "$0" "$@"
  fi
}

this looks dangerous too me and is the reason for the infinite loop when running as root.

maybe mention that it cannot be run as root and the user needs to use usermod -aG docker $USER (or similar) to be able to run the thingy.

besides that: works. no more no less. looks like crap. (due to Fluxbox i assume).

Debian10 x64 wth custom Windowmanager (Fluxbox) can be marked as confirmed working.

it has a very thick black border that stays in the foreground even if the wechat window isn't focussed and completely vanished behind other windows. any idea if that could be changed somehow?

edit: minimizing it once seems to solve the border issue. it just vanishes after getting the back on screen

huan commented

It's great to know you make DoChat working for you!

And I agree with you that we should put a notice in README as a requirement that DoChat should be not run with user root. Or it will run into infinite loops...

Would you like to send a PR for adding this notice? Because you are just run into this problem and I believe you can describe it more accurately.

I would even fix the script if i would know how to build the docker images and test it accordingly.

the idea would be either a simple sleep 2 to mitigate the infinite loop running out of control without the chance to ctrl+c it.

will write the README PR tomorrow morning - almost 11pm...

besides that: works. no more no less. looks like crap. (due to Fluxbox i assume).

this seems to fixed by scaling to 125% or using the latest 2.9.xxx version of the image. i just setup the docker build flow and accidently used the 2.9.xxx version. it fixes the fonts too look much much better