GithubHelp home page GithubHelp logo

Failure to save file in the default path will affect your experience on Wechat. Try other path. about dockerfile-x11docker-deepin HOT 23 CLOSED

mviereck avatar mviereck commented on June 19, 2024
Failure to save file in the default path will affect your experience on Wechat. Try other path.

from dockerfile-x11docker-deepin.

Comments (23)

mviereck avatar mviereck commented on June 19, 2024

I am not sure why wechat has a problem here.
Please check the output of echo $HOME. Maybe wechat has a problem if the path does not start with /home/. It should regard $HOME instead.

Two notes:

  • --share ~/x11docker shares the folder/softlink where x11docker stores all home directories created with --home. This can cause confusion, please avoid this.
  • --cap-add=ALL is really a bad idea and should not be used. Malicious container applications will be able to damage your host.

from dockerfile-x11docker-deepin.

hongyi-zhao avatar hongyi-zhao commented on June 19, 2024

I am not sure why wechat has a problem here.
Please check the output of echo $HOME. Maybe wechat has a problem if the path does not start with /home/. It should regard $HOME instead.

See following:

werner@e110043d87c5:~/Desktop$ echo $HOME
/home/werner

Two notes:

* `--share ~/x11docker` shares the folder/softlink where x11docker stores all home directories created with `--home`. This can cause confusion, please avoid this.

How exactly should I use this option?

* `--cap-add=ALL` is really a bad idea and should not be used. Malicious container applications will be able to damage your host.

Just for debug purpose and convenience.

from dockerfile-x11docker-deepin.

mviereck avatar mviereck commented on June 19, 2024

How exactly should I use this option?

Just rather share other folders.

from dockerfile-x11docker-deepin.

hongyi-zhao avatar hongyi-zhao commented on June 19, 2024

Based on my tries, only using the --share folder located directly under the $HOME won't trigger the problem, i.e., as below:

--share ~/x11docker-share
or
--home --share ~/x11docker-share

I really can't figure out the reason. It maybe a bug of x11docker.

from dockerfile-x11docker-deepin.

mviereck avatar mviereck commented on June 19, 2024

I have tried some of your suggested failing setups. I cannot reproduce the issue here.
Maybe there is some misconfiguration of wechat in the persistent home folder. You could try to delete the container home folder ~/x11docker/deepin-wine.

from dockerfile-x11docker-deepin.

hongyi-zhao avatar hongyi-zhao commented on June 19, 2024

Maybe there is some misconfiguration of wechat in the persistent home folder. You could try to delete the container home folder ~/x11docker/deepin-wine.

I don't have this folder at all:

$ ls ~/x11docker/deepin-wine
ls: cannot access '/home/werner/x11docker/deepin-wine': No such file or directory

from dockerfile-x11docker-deepin.

mviereck avatar mviereck commented on June 19, 2024

Ok, than it is /home/werner/x11docker/hongyi-zhao-deepin-wine.

from dockerfile-x11docker-deepin.

hongyi-zhao avatar hongyi-zhao commented on June 19, 2024
werner@X10DAi:~$ ls /home/werner/x11docker/hongyi-zhao-deepin-wine
ls: cannot access '/home/werner/x11docker/hongyi-zhao-deepin-wine': No such file or directory

from dockerfile-x11docker-deepin.

mviereck avatar mviereck commented on June 19, 2024

If you ran the image with option --home as you said, there must a a matching folder in ~/x11docker.

from dockerfile-x11docker-deepin.

hongyi-zhao avatar hongyi-zhao commented on June 19, 2024

If you ran the image with option --home as you said, there must a a matching folder in ~/x11docker.

Maybe we are discussing different problems. Could you please give the concrete example using the arguments combinations? Let us focus on each specific issue for discussion corresponding to all the situations I described above and take it one step at a time.

from dockerfile-x11docker-deepin.

mviereck avatar mviereck commented on June 19, 2024

My idea is that wechat might have stored a bad configuration.
With option --home x11docker creates persistent home folders in ~/x11docker.
You have made tests with option --home and also with --share ~/x11docker. This might have caused damaged configuration files.
An attempt to fix the issue is to remove the persistent home folder to delete possible configuration files.

from dockerfile-x11docker-deepin.

hongyi-zhao avatar hongyi-zhao commented on June 19, 2024

It seems the problem is not that simple. I've already deleted all the possible configuration folders before the testings:

$ sudo rm -fr ~/.local/share/x11docker
$ rm -fr ~/x11docker

from dockerfile-x11docker-deepin.

mviereck avatar mviereck commented on June 19, 2024

Can you give me an example how I could reproduce the issue?
My wechat image is build as described in README.md.

from dockerfile-x11docker-deepin.

hongyi-zhao avatar hongyi-zhao commented on June 19, 2024

Could you please first build the deepin and deepin-wine images with the same Dockerfiles used by me with the following commands:

$ docker build --network host -f Dockerfiles/deepin . -t hongyi-zhao/deepin
$ docker build --network host -f Dockerfiles/deepin-wine . -t hongyi-zhao/deepin-wine

Then do the tests I mentioned above.

from dockerfile-x11docker-deepin.

mviereck avatar mviereck commented on June 19, 2024

Could you please first build the deepin and deepin-wine images with the same Dockerfiles used by me with the following commands:

Sorry, I won't build them. I have very low internet speed and the build would take at least about 12 hours. I want to use the internet for other tasks meanwhile.

Running with your first example but my wechat image and a similar shared folder does not trigger the issue:

x11docker --share ~/Dokumente/Arduino --sudouser -c --desktop --init=systemd -- --cap-add=ALL --security-opt seccomp=unconfined -- wechat

Tests with --home or other --share paths did not trigger the issue, too.
Maybe you could investigate on the error message what it might mean and ask e.g. at deepin.org or at wechat.
I've checked for possible wrong ownership of '$HOME` in different setups, but it was always correct.

from dockerfile-x11docker-deepin.

hongyi-zhao avatar hongyi-zhao commented on June 19, 2024

Sorry, I won't build them. I have very low internet speed and the build would take at least about 12 hours.

Today, we all in the 21st century, and I am very surprised that Germany, as a world-famous developed country, should have mature internet technology infrastructure deployed everywhere in the country. How can you have such a low-speed Internet connection? BTW, what's internet bandwidth promised by ISP for you?

Anyway, I'll try to build the exactly same docker image as yours to further pinpoint and check the problem.

from dockerfile-x11docker-deepin.

mviereck avatar mviereck commented on June 19, 2024

Today, we all in the 21st century, and I am very surprised that Germany, as a world-famous developed country, should have mature internet technology infrastructure deployed everywhere in the country.

Yes, it's a shame. Major cities normally have a good high-speed internet, but in rural areas there is often close to no internet at all. Some still use 56K-Modems, others can be happy to receive an UMTS signal.
Many rather poor countries have a better internet infrastructure than Germany.

How can you have such a low-speed Internet connection?

I am living about 3 miles away from a small city in a forest. I have a DSL connection that serves about 50 kilobyte per second, sometimes less. I am happy to get this at all. I am paying for more than this, but the ISP directly said it will be much less and asked me if I really want this. I've tried LTE, too, but depending on the weather conditions the connection broke entirely.
Currently a nearby village is getting fiber glass internet, maybe I can pay to get part of it in one or two years.

from dockerfile-x11docker-deepin.

hongyi-zhao avatar hongyi-zhao commented on June 19, 2024

I created the exactly same docker image as you mentioned here with the following method:

$ cat x11docker-deepin-wechat 
#Example to add wine and wechat:

FROM x11docker/deepin
RUN env DEBIAN_FRONTEND=noninteractive dpkg --add-architecture i386 && apt-get update
RUN env DEBIAN_FRONTEND=noninteractive apt-get install -y \
    deepin-wine deepin-wine32 deepin-wine32-preloader deepin-wine-helper deepin-wine-uninstaller
RUN env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
    deepin.com.wechat

$ docker build --network host -t x11docker/deepin-wechat - < x11docker-deepin-wechat

$ mkdir ~/x11docker-share ~/Documents/x11docker-share

Then I perform the following 4 tests in sequence respectively:

1. $ x11docker --share ~/x11docker-share --sudouser -c --desktop --init=systemd -- --cap-add=ALL --security-opt seccomp=unconfined -- x11docker/deepin-wechat startdde
2. $ x11docker --share ~/Documents/x11docker-share --sudouser -c --desktop --init=systemd -- --cap-add=ALL --security-opt seccomp=unconfined -- x11docker/deepin-wechat startdde
3. $ x11docker --home --share ~/x11docker-share --sudouser -c --desktop --init=systemd -- --cap-add=ALL --security-opt seccomp=unconfined -- x11docker/deepin-wechat startdde
4. $ x11docker --home --share ~/Documents/x11docker-share --sudouser -c --desktop --init=systemd -- --cap-add=ALL --security-opt seccomp=unconfined -- x11docker/deepin-wechat startdde

Once the deepin desktop has been started successfully, I then run the following command under the deepin-terminal to start WeChat for checking whether the problem reported here will be triggered:

$ /opt/deepinwine/apps/Deepin-WeChat/run.sh

Between each of the above two tests, I run the following commands to clear the possible configuration cache:

$ rm -fr x11docker
$ sudo rm -fr ~/.local/share/x11docker

Below is the results obtained based on the above testings. Here , Yes/No means the problem will/won't be triggered.

1. No
2. Yes
3. No
4. Yes

To summarize: only using the --share folder located directly under the $HOME won't trigger the problem, i.e., as below:

--share ~/x11docker-share
or
--home --share ~/x11docker-share

Regards,
HY

from dockerfile-x11docker-deepin.

mviereck avatar mviereck commented on June 19, 2024

Thank you for the detailed analysis! Now I can reproduce the issue.

I've yet created ~/Documents/x11docker-share and shared it with --share ~/Documents/x11docker-share.
Before this I've used other folders with German names for test runs.

On host, ~/Documents and ~/Documents/x11docker-share are both owned by the host user.
But in container, ~/Documents is owned by root and only ~/Documents/x11docker-share is owned by the container user. Docker only sets the mounted folder itself to the same uid:gid as on host, the parent folders appear as root:root in container.

It seems wechat tries to access ~/Documents and fails because it is owned by root.
I can avoid the failure with --share ~/Documents/x11docker-share --share ~/Documents.

Well, I could have detected this with your earlier informations, too. But I did not thought of the possibility that the folder name itself makes a difference.

I am not sure how to handle this in future. Although --share ~/Documents might be a reasonable solution for this special case, it cannot be a general solution. One might not want to share the parent folders, too.

Another solution for the special wechat case could be to provide a ~/Documents folder so Docker does not need to create it. In the Dockerfile it could be provided with RUN mkdir -p /etc/skel/Documents

However, if a ~/Documents folder exists in the container, with --home --share ~/Documents/x11docker-share an ~/x11docker/wechat/x11docker-share folder with uid root is left on host although it should not. (mviereck/x11docker#303)

from dockerfile-x11docker-deepin.

hongyi-zhao avatar hongyi-zhao commented on June 19, 2024

Before this I've used other folders with German names for test runs.

As a rule of thumb, it's sensible and reasonable to only use the English ((path|file) name | input method), and so on, for code debugging and bug analysis.

Well, I could have detected this with your earlier informations, too. But I did not thought of the possibility that the folder name itself makes a difference.

Do you mean the German names used by your previous tests?

from dockerfile-x11docker-deepin.

mviereck avatar mviereck commented on June 19, 2024

Do you mean the German names used by your previous tests?

Yes.

from dockerfile-x11docker-deepin.

mviereck avatar mviereck commented on June 19, 2024

I'd say this ticket can finally be closed.

from dockerfile-x11docker-deepin.

hongyi-zhao avatar hongyi-zhao commented on June 19, 2024

Based on my tries, this problem doesn't appear for the wechat running on deepin apricot.

from dockerfile-x11docker-deepin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.