linuxserver / docker-baseimage-kasmvnc

Base Images for remote web based Linux desktops using KasmVNC for many popular distros.
GNU General Public License v3.0
344 stars 60 forks source link

[BUG] No GUI application shows up in the VNC webviewer #5

Closed lczerner closed 1 year ago

lczerner commented 1 year ago

Is there an existing issue for this?

Current Behavior

Originally I've noticed the issue with docker-firefox here https://github.com/linuxserver/docker-firefox/issues/23, where the firefox instance seems to be running in the docker container but nothing shows up in the VNC web viewer. I tried to run docker-chromium and webtop with exactly the same result so I elected to try docker-baseimage-kasmvnc directly and it is manifesting exactly the same behaviour.

When an GUI application is run, such as firefox, xterm, chromium or even the entide desktop environment using webtop image, nothing shows up in the VNC webviewer. I can connect to it no problem on the default localhost:3000, but I can only see the background with nothing there.

My understanding is also that there is supposed to be a way of launching the GUI application directly from the desktop as there should be some kind of menu present. Nothing resembling this shows up either even though the proper menu.xml is present.

Expected Behavior

Gui application is displayed on the VNC web viewer.

Steps To Reproduce

This is entirely taken from the https://github.com/linuxserver/docker-baseimage-kasmvnc README file except that I am using podman.

Create the following Dockerfile: FROM ghcr.io/linuxserver/baseimage-kasmvnc:alpine317 RUN apk add --no-cache firefox COPY ./root /

Define the application to start: mkdir -p root/defaults echo "firefox" > ./root/defaults/autostart

Then build and test podman build -t firefox . podman run --rm -it -p 3000:3000 firefox bash

I can connect to the http://localhost:3000/ where the VNC viewer is runnig, however nothing is showing up.

Environment

- OS: Fedora Workstation 37
- How docker service was installed: podman via distro's packagemanager

Client:       Podman Engine
Version:      4.4.4
API Version:  4.4.4
Go Version:   go1.19.7
Built:        Mon Apr  3 13:31:25 2023
OS/Arch:      linux/amd64

Docker creation

reate the following Dockerfile:
FROM ghcr.io/linuxserver/baseimage-kasmvnc:alpine317 
RUN apk add --no-cache firefox
COPY ./root /

Define the application to start:
mkdir -p root/defaults
echo "firefox" > ./root/defaults/autostart

Then build and test
podman build -t firefox .
podman run --rm -it -p 3000:3000 firefox bash

Container logs

[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────
  _____ __ __ _____ _____ _____ _____ 
 |     |  |  |   __|_   _|     |     |
 |   --|  |  |__   | | | |  |  | | | |
 |_____|_____|_____| |_| |_____|_|_|_|
       _____ __ __ _ __    ____  
      | __  |  |  | |  |  |    \ 
      | __ -|  |  | |  |__|  |  |
      |_____|_____|_|_____|____/ 

  Based on images from linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    911
User GID:    911
───────────────────────────────────────

............+..+...+.+...+..............................+...+..+.+..+....+...+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....+......+.......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+.....+.+......+...+...+...............+..+......+....+...+.....+....+...+.................+..........+.....+...+.............+.........+...............+...............+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
..+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.+.+..............+.+..+.+......+.....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.....+...........+.+......+..................+..+.......+..+......+.......+......+..+.........+.+..+...+....+.....+......+............+.+.....+.......+...+...........+......+.......+.....+...+.......+..+...............+...+.......+.....+....+..+....+......+..+......+.+........+............+......+.......+...+..+...+....+...+...+...+.....+....+..+..........+.....+....+..+...+..........+.....+......+....+............+.....+...+......+..........+...+..+.+.....+.......+.....+.+..+....+...+....................+.......+........+.+...............+..+..........+.........+......+............+..+...+............+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
[custom-init] No custom files found, skipping...
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
[ls.io-init] done.

Xvnc KasmVNC 1.1.0 - built Apr 10 2023 21:26:03
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

ee395b2c4de5:/# Obt-Message: Xinerama extension is not present on the server

ee395b2c4de5:/# ps aux | grep firefox
abc          260 45.4  1.2 11270100 398520 ?     Sl   07:03   0:03 /usr/lib/firefox/firefox
abc          357  0.2  0.1 184076 62336 ?        Sl   07:03   0:00 /usr/lib/firefox/firefox -contentproc -parentBuildID 20230130132623 -prefsLen 19664 -prefMapSize 225995 -appDir /usr/lib/firefox/browser {7eb3d67f-41d3-44c7-bc7d-6df170e4fde8} 260 socket
abc          379  2.6  0.3 2393120 111764 ?      Sl   07:03   0:00 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 20059 -prefMapSize 225995 -jsInitLen 247032 -parentBuildID 20230130132623 -appDir /usr/lib/firefox/browser {4278ad2e-7fdb-481f-9ebf-2cda21945fb4} 260 tab
abc          398  5.5  0.4 10797268 135000 ?     Sl   07:03   0:00 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 21185 -prefMapSize 225995 -jsInitLen 247032 -parentBuildID 20230130132623 -appDir /usr/lib/firefox/browser {c6e9b31d-8927-4440-8af5-43658e0b9d35} 260 tab
abc          432  2.8  0.3 19168600 117036 ?     Sl   07:03   0:00 /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 22140 -prefMapSize 225995 -jsInitLen 247032 -parentBuildID 20230130132623 -appDir /usr/lib/firefox/browser {a875275b-7d45-448b-885f-95b08ea79845} 260 tab
abc          520  0.8  0.2 2355768 83200 ?       Sl   07:03   0:00 /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 28715 -prefMapSize 225995 -jsInitLen 247032 -parentBuildID 20230130132623 -appDir /usr/lib/firefox/browser {bcef693c-afc9-44fa-96a1-80a1ad5c2344} 260 tab
abc          524  0.8  0.2 2355752 82688 ?       Sl   07:03   0:00 /usr/lib/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 28715 -prefMapSize 225995 -jsInitLen 247032 -parentBuildID 20230130132623 -appDir /usr/lib/firefox/browser {5bd896d7-8150-4cf5-9e7b-852a73ec1729} 260 tab
abc          527  0.8  0.2 2355744 83328 ?       Sl   07:03   0:00 /usr/lib/firefox/firefox -contentproc -childID 6 -isForBrowser -prefsLen 28715 -prefMapSize 225995 -jsInitLen 247032 -parentBuildID 20230130132623 -appDir /usr/lib/firefox/browser {dec14f10-3d76-4163-8b24-313f06c5788f} 260 tab
root         573  0.0  0.0   1608   768 pts/0    S+   07:03   0:00 grep firefox
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

thelamer commented 1 year ago

I cannot replicate this running with podman. (I would not reccomend using podman build just ingest and run)

podman run --rm -it --shm-size="1gb" -p 3000:3000 docker.io/linuxserver/firefox:latest  bash

Land on port 3000 and it works.

podman version 3.4.4 Ubuntu 22.10

Are you making any modifications to podman outside of a standard installation?

Same story with this baseimage:

podman run --rm -it --shm-size="1gb" -p 3000:3000 docker.io/lsiobase/kasmvnc:alpine317  bash

Just in general we do not support anything outside of Docker, this is not a playing favorites thing it is all we have time to test. But I do like podman and never had any issues running these old and new GUI images with it.

thelamer commented 1 year ago

See my response here, it looks like firefox in fedora 37 is kinda busted with kernel 6.2.9 please try the chromium container and confirm. Also don't use firefox on your workstation to test: https://github.com/linuxserver/docker-firefox/issues/21#issuecomment-1506069341 https://github.com/linuxserver/docker-chromium

Chromium is in the stock repos sudo dnf install -y chromium

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue is locked due to inactivity