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

Running x11docker as a normal user using --xorg option in a tty launches X11 on the host instead #84

Closed
sparklespdx opened this issue Oct 29, 2018 · 5 comments

Comments

@sparklespdx
Copy link

sparklespdx commented Oct 29, 2018

Is this expected behavior? From reading the documentation I thought that running it this way in a tty would spawn a docker container and then bind to the tty.

This is the command I was running: bash x11docker --gpu --xorg x11docker/xfce

x11docker.log

@mviereck
Copy link
Owner

mviereck commented Oct 29, 2018

Hello,

I am not sure what you mean. From your log you run x11docker on tty3. It runs an Xorg server and pulls image x11docker/xfce. The container did not start up, maybe you stopped the pull before it was ready.

What exactly did happen, and what did you expect instead?

Edit: Has there been an issue with pulling the image? Did a terminal window appear that asks for pulling?

Expected behaviour for x11docker --gpu --xorg x11docker/xfce:

  • Run Xorg on tty
  • If needed, ask for password in terminal window on new Xorg.
  • If needed, ask to pull docker image in a terminal window on new Xorg. If yes, show pull progress in same terminal window.
  • If image is available, start container on new Xorg.

@sparklespdx
Copy link
Author

Ah, I see. I did get weird behavior, but I also think I misunderstood the documentation. I expected the container to pull, the container start up with the TTY passed through, and X11 to start within the container's context.

The behavior on my system launched X11 with a config that is present on my host system; it launched Openbox and I had access to start up host programs.

@mviereck
Copy link
Owner

The behavior on my system launched X11 with a config that is present on my host system;

Yes, that is intended. Some Xorg options are changed on cli, but the base config is automatically used from host.

it launched Openbox and I had access to start up host programs.

Add option --desktop to run a desktop environment in container.
Without option --desktop x11docker assumes that you want to run a single application and provides a window manager from host. You can specify another one with open --wm.

Some window managers like openbox allow to run host applications with a context menu. That can be confusing.
To avoid abuse by container applications, x11docker disables extension XTEST that would otherwise allow applications to simulate keypresses and mouse clicks. Otherwise they could detect openbox and remotely run host applications.

I expected [...] X11 to start within the container's context.

That is difficult. Compare attempts in #40.
A half-way solution is to run Xwayland in container and weston on host, compare https://github.com/mviereck/dockerfile-x11docker-xwayland.

Ah, I see. I did get weird behavior, but I also think I misunderstood the documentation.

If you have suggestions where and how to improve documentation, it is quite appreciated!
It is difficult for me to estimate whether it is comprehensive to others and where it is rather confusing. For me as author of x11docker everything is too obvious, I cannot observe it like someone trying it the first time.

@mviereck
Copy link
Owner

I just found that gnome-terminal failed to ask for and show docker pull. So you only got an empty Xorg with openbox and no further useful action. That is quite confusing.

It is fixed now in master branch. You should get a terminal window asking for docker pull.

@mviereck
Copy link
Owner

mviereck commented Nov 5, 2018

@sparklespdx
Does the current version work for you now?

@mviereck mviereck closed this as completed Nov 8, 2018
@mviereck mviereck added the bug label Nov 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants