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 able to have the sample application (lxde) exposed on the PORT for access in browser #534

Open
MyCodeBits opened this issue Aug 31, 2024 · 0 comments

Comments

@MyCodeBits
Copy link

MyCodeBits commented Aug 31, 2024

Running sample application ldxe. The application :


  • Runs fine and ldxe UI comes up when network=host is passed, but doesn't get exposed on a PORT
$ x11docker --desktop lxde --xorg --xpra --xtest --network=host --ipc=host

x11docker WARNING: User newuser is member of group docker.
  That allows unprivileged processes on host to gain root privileges.

x11docker note: Option --xc for X in container enabled automatically.

x11docker WARNING: You are running GNOME desktop in outdated version
  GNOME Shell 3.36.7
  This might cause issues with host applications if using additional X servers.
  It is recommended to use another desktop environment or GNOME >= 3.38.
  Only --xorg or discouraged option --hostdisplay might work as expected.

x11docker note: Option --xpra: If you encounter issues with xpra,
  you can try --nxagent instead.
  Rather use xpra from www.xpra.org than from distribution repositories.

x11docker WARNING: Option --ipc=host severely degrades
  container isolation. IPC namespace remapping is disabled.

x11docker WARNING: Option --network=host severely degrades
  container isolation. Network namespacing is disabled.
  Container shares host network stack.
  Spying on network traffic may be possible.
  Access to host X server :10.0 may be possible
  through abstract unix socket.

x11docker note: Option -I, --network: The container is able to provide
  access to X server :160 (--xpra) to the entire world.

x11docker/lxde: If the panel does not show an approbate menu
  and you encounter high CPU usage (seen with kata-runtime),
  please run with option --init=systemd.

** Message: 11:28:18.115: main.vala:101: Session is LXDE
** Message: 11:28:18.115: main.vala:102: DE is LXDE
** Message: 11:28:18.119: main.vala:133: log directory: /home/newuser/.cache/lxsession/LXDE
** Message: 11:28:18.119: main.vala:134: log path: /home/newuser/.cache/lxsession/LXDE/run.log
x11docker note: Option --xpra: xpra terminated unexpectedly.
  Last lines of xpra server log:  909554 ?        00:00:00 xpra
2024-08-31 18:28:18,509 client   1 @00.737  (press Control-C to detach)
2024-08-31 18:28:18,510 client   1 @00.759 running, 1 window
2024-08-31 18:28:18,749 Warning: the python netifaces package is missing
2024-08-31 18:28:19,027 temporarily switching to 1560x971 as a Xinerama workaround
2024-08-31 18:28:19,033 server virtual display now set to 1632x983 (best match for 1728x1015)
2024-08-31 18:28:19,045 DPI set to 96 x 96
  • UI:
Screenshot 2024-08-31 at 11 28 31 AM
  • From Docker ps:
$ sudo docker ps
CONTAINER ID   IMAGE                                     COMMAND                  CREATED          STATUS                          PORTS                                           NAMES
37681a9eb721   lxde                                      "env /usr/local/bin/…"   20 seconds ago   Up 19 seconds                                                                   x11docker_X162_lxde_290892291083

  • Runs fine and ldxe UI comes up when network=NET is passed, but AGAIN doesn't get exposed on a PORT
$ x11docker --desktop lxde --xorg --xpra --xtest --network=NET --ipc=host -I
x11docker WARNING: User newuser is member of group docker.
  That allows unprivileged processes on host to gain root privileges.

x11docker note: Option --xc for X in container enabled automatically.

x11docker WARNING: You are running GNOME desktop in outdated version
  GNOME Shell 3.36.7
  This might cause issues with host applications if using additional X servers.
  It is recommended to use another desktop environment or GNOME >= 3.38.
  Only --xorg or discouraged option --hostdisplay might work as expected.

x11docker note: Option --xpra: If you encounter issues with xpra,
  you can try --nxagent instead.
  Rather use xpra from www.xpra.org than from distribution repositories.

x11docker WARNING: Option --ipc=host severely degrades
  container isolation. IPC namespace remapping is disabled.

x11docker WARNING: Option --network: Container has access to
  local network and internet.

x11docker note: Option -I, --network: The container is able to provide
  access to X server :179 (--xpra) to the entire world.

x11docker/lxde: If the panel does not show an approbate menu
  and you encounter high CPU usage (seen with kata-runtime),
  please run with option --init=systemd.

** Message: 22:47:53.503: main.vala:101: Session is LXDE
** Message: 22:47:53.503: main.vala:102: DE is LXDE
** Message: 22:47:53.507: main.vala:133: log directory: /home/newuser/.cache/lxsession/LXDE
** Message: 22:47:53.507: main.vala:134: log path: /home/newuser/.cache/lxsession/LXDE/run.log


  • Tried passing -p [PORT]:[PORT] (-p 8089:8089)
    Doesn't run. ldxe UI doesn't comes up when network=NET and PORT is passed. Thus, doesn't get exposed on a PORT
$ sudo x11docker --desktop lxde -p 8078:8078 --xorg --xpra --xtest --network=NET --ipc=host -I 
x11docker note: Option --xc for X in container enabled automatically.

x11docker note: Option --xpra: If you encounter issues with xpra,
  you can try --nxagent instead.
  Rather use xpra from www.xpra.org than from distribution repositories.

x11docker WARNING: Option --ipc=host severely degrades
  container isolation. IPC namespace remapping is disabled.

x11docker WARNING: Option --network: Container has access to
  local network and internet.

x11docker note: Option -I, --network: The container is able to provide
  access to X server :177 (--xpra) to the entire world.

x11docker WARNING: Option --pulseaudio allows container applications
  to catch your audio output and microphone input.

/x11docker/cmdrc: 92: 8078:8078: not found



The verbose logs for above command is attached Verbose output when Port passed.log

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

No branches or pull requests

1 participant