Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Anbox with xvfb #714

Closed
v1nc opened this issue May 18, 2018 · 7 comments
Closed

Anbox with xvfb #714

v1nc opened this issue May 18, 2018 · 7 comments

Comments

@v1nc
Copy link

v1nc commented May 18, 2018

I tried to run anbox with xvfb today.
Neither xvfb-run nor changing the display env var to the xvfb display worked.
If you try xvfb-run anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity, you will see the appmgr launching on your display.
I think the display env does not apply because the anbox launch command does not start the applications with the terminal display env. How can i change the display server of anbox ?

@lag-linaro
Copy link
Contributor

Forgive me if I'm wrong, but I believe you have to start the Session Manager on the specified FB, not the Launcher.

@morphis
Copy link
Member

morphis commented May 25, 2018

@lag-linaro is correct. The session manager is what talks to the X11 display server. The anbox launch command only sends a dbus call to the session manager to start a specific application (which is then owned by the session manager). There is an edge case where the anbox launch command spawns the session manager but I would recommend that in your case you start the session manager always manually.

@morphis morphis closed this as completed May 25, 2018
@v1nc
Copy link
Author

v1nc commented Jun 6, 2018

Why is this closed ? I never got anbox running with xvfb or xpra/xdummy, did you ? Starting the session manager manually does not fix it.

@lag-linaro
Copy link
Contributor

Probably because it's not broken. #worksforme

Please provide exact steps to recreate and maybe we can see what's going wrong.

@imShara
Copy link

imShara commented Jan 26, 2020

@morphis How to run anbox in specific X? Like:

DISPLAY=:1 anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity

This not works, anbox runs in DISPLAY=:0

And what you mean about starting session manager manually? I'm trying to run:

Xvfb :0 -screen 0 1024x768x16 &
DISPLAY=:0 dbus-launch
DISPLAY=:0 openbox-session
DISPLAY=:0 anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity

But anbox not works

realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
[ 2020-01-26 01:13:39] [daemon.cpp:61@Run] Failed to connect to DBus

Where is mistake?

@baptx
Copy link

baptx commented Feb 19, 2020

@morphis Isn't Anbox using X11 isolation by default? Otherwise is there a way to use Xephyr (or Xvfb / Xpra) with Anbox like it can be done with firejail? This would improve the security to prevent an Android app using a spyware to track the host OS (keylogger, screenshots, clipboard). An alternative for security could be to use VNC or NX (X2Go) but it is less convenient. Otherwise Anbox should not be used at the same time when we are doing something sensitive on the computer, for example logging in to a bank website.
I asked a related security question here: #880

@imShara
Copy link

imShara commented Oct 6, 2020

Is there changes since last comment?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants