accetto / ubuntu-vnc-xfce-g3

Headless Ubuntu/Xfce containers with VNC/noVNC (G3v6).
MIT License
214 stars 62 forks source link

[way around] no screen/black screen after login - no logs (docker image on qnap NAS - container station) #56

Closed accetto closed 6 months ago

accetto commented 10 months ago

Discussed in https://github.com/accetto/ubuntu-vnc-xfce-g3/discussions/55

Originally posted by **thesearge** November 15, 2023 I pulled your docker image (firefox g3) from docker hub and created a container on my qnap. Container creation was made by ssh and docker commands as described in user guide. noVNC or VNC connection is no problem (tested port 36901 on container or 6901 directly). However after login with provided credentials „headless“ I only receive a dark screen. I tested different machines and browsers. I also recognized that there are no logs for this container in container-station (docker app for qnap). ![IMG_0331](https://github.com/accetto/ubuntu-vnc-xfce-g3/assets/148621007/8f925f58-992e-496d-9f06-6561a4fa9767) ![IMG_0332](https://github.com/accetto/ubuntu-vnc-xfce-g3/assets/148621007/35ba071d-3094-4dff-a321-a33e55fb7865) Need some help.
accetto commented 10 months ago

Unfortunately I have to confirm this problem with the G3 containers and the Container Station on QNAP NAS devices.

I don't want to speculate about the reason until I do more testing.

As a way around you can use my older G2 or G1 images. They do work also on QNAP NAS devices.

This is the simple Container Station application I've used for testing:

### app name: app-qnap-test
version: "3"
services:
  firefox-g3:
    image: accetto/ubuntu-vnc-xfce-firefox-g3:latest
    ports:
      - "35940:5901"
      - "35941:6901"
  firefox-g2:
    image: accetto/xubuntu-vnc-novnc-firefox:latest
    ports:
      - "35942:5901"
      - "35943:6901"
  firefox-g1:
    image: accetto/ubuntu-vnc-xfce-firefox-plus:latest
    ports:
      - "35944:5901"
      - "35945:6901"

You can connect to the containers using your web browser like this:

http://<your-nas-ip>:35941
http://<your-nas-ip>:35943
http://<your-nas-ip>:35945

The first container will show only a black-screen, but the other two should work.

accetto commented 10 months ago

FYI: Test 1 Increasing shared memory like this didn't help.

version: "3"
services:
  firefox-g3:
    image: accetto/ubuntu-vnc-xfce-firefox-g3:latest
    ports:
      - "35940:5901"
      - "35941:6901"
    shm_size: "256m"
accetto commented 10 months ago

FYI: Test 2 Making the container privileged did help, so it seems to be related to the permissions on QNAP.

The following G3 container should work:

version: "3"
services:
  firefox-g3:
    image: accetto/ubuntu-vnc-xfce-firefox-g3:latest
    ports:
      - "35940:5901"
      - "35941:6901"
    shm_size: "256m"
    privileged: true
accetto commented 10 months ago

FYI: Test 3 Pre-creating the network manually didn't help.

The following G3 container will not work:

version: "3"
networks:
  my_test:
    external: true
    name: my_test
services:
  firefox-g3:
    image: accetto/ubuntu-vnc-xfce-firefox-g3:latest
    ports:
      - "35940:5901"
      - "35941:6901"
    networks:
      - my_test
senza-lattosio commented 9 months ago

Sorry for mingling (I'm less than beginner) but I solved this by recreating the container and make it run in "privileged mode". This way no dark screen.

immagine

accetto commented 9 months ago

Not at all, you're welcome. :) Yes, the priveleged mode helps (see the 'Test 2' above). Also the G1 and G2 images work. I hope to spare some time to come to this problem.

KlausGlueckert commented 8 months ago

I can confirm the black screen on my normal ubuntu cloud server (not a qnap)

22.04 --> black screen 20.04 --> works

docker run -d \
    --restart=always \
    --name testvnc \
    --network=nginx-proxy \
    -e VNC_PW=!mypassword! \
     accetto/ubuntu-vnc-xfce-firefox-g3:22.04 --verbose
accetto commented 8 months ago

Hello @KlausGlueckert ,

thank you for your feedback. Which cloud service do you use?

I assume, that the startup script is not allowed to change the permissions of the system files /etc/passwd and /etc/passwd /etc/group on the first start. Cloud environments often restrict such activities.

However, it could be also some other reason. I'm thinking about re-designing the startup sequence sometimes in the future.

Have you checked also the older issues? Maybe you could find a hint.

Regards, accetto