Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not starting / endless loop in debug #60

Closed
f8-ptrk opened this issue May 26, 2020 · 5 comments
Closed

Not starting / endless loop in debug #60

f8-ptrk opened this issue May 26, 2020 · 5 comments
Labels
question Further information is requested

Comments

@f8-ptrk
Copy link
Contributor

f8-ptrk commented May 26, 2020

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

@huan huan added the question Further information is requested label May 26, 2020
@f8-ptrk
Copy link
Contributor Author

f8-ptrk commented May 26, 2020

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.

@f8-ptrk f8-ptrk closed this as completed May 26, 2020
@f8-ptrk
Copy link
Contributor Author

f8-ptrk commented May 26, 2020

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
Copy link
Owner

huan commented May 26, 2020

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.

@f8-ptrk
Copy link
Contributor Author

f8-ptrk commented May 26, 2020

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...

@f8-ptrk f8-ptrk mentioned this issue May 26, 2020
@f8-ptrk
Copy link
Contributor Author

f8-ptrk commented May 27, 2020

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

huan pushed a commit that referenced this issue May 27, 2020
* add waring about root user

* add issue link to todos

* add isse link to notice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants