Closed qyvlik closed 1 year ago
Hello @qyvlik,
the most probable reason for your problem is the binding to the TCP port 6901
on the host.
Generally I recommend to avoid binding to the default ports on the host, because they are often already in use.
Choose some higher port range of free ports, for example:
services:
unciv:
environment:
VNC_RESOLUTION: 1920x1080
image: accetto/ubuntu-vnc-xfce-opengl-g3
ports:
- "36901:6901"
Note also that you should enclose the port numbers in quotes.
Regards, accetto
@accetto
I am very certain that port 6901
is not being used. Screen is black mean the xfce desktop incomplete startup.
I'm not sure if it's a problem with noVNC or xfce.
If you start a Java game using OpenGL base accetto/ubuntu-vnc-xfce-opengl-g3:latest
, the screen can display the graphics of the Java game normally, but there is no mouse.
Have you tested it with the other port according my recommendation above?
@accetto Yes, I try the 36901
port, also black screen, the xfce desktop not startup.
version: '2.0'
services:
unciv:
environment:
VNC_RESOLUTION: 1920x1080
image: accetto/ubuntu-vnc-xfce-opengl-g3
ports:
- "36901:6901"
That's interesting. Unfortunately I'm not able to reproduce the behaviour. It's working on all my testing environments.
Do you get the same behaviour if you try it with the localhost
IP?
ports:
- "127.0.0.1:36901:6901"
and then http://127.0.0.1:36901
.
What do you get if you connect to the running container and execute the following tests?
# connect to the container
docker exec <your-container-name> bash
# and then
pstree
# and also (assuming you're in $HOME)
./tests/test-01.sh
Can you describe your environment?
Hello @accetto
My environment see below
services:
unciv:
image: accetto/ubuntu-vnc-xfce-opengl-g3
ports:
- "36901:6901"
version: '2'
pstree
run pstree
in container, output as below
tini-+-dbus-daemon
|-dbus-launch
|-startup.sh-+-bash---python3
| `-xinit-+-Xvnc
| `-xfce4-session---2*[{xfce4-session}]
`-xfconfd---2*[{xfconfd}]
./tests/test-01.sh
run ./tests/test-01.sh
in container, output as below
+ id
uid=1000(headless) gid=1000(headless) groups=1000(headless)
+ ls -l /etc/passwd /etc/group
-rw-r--r-- 1 root root 481 Apr 25 00:58 /etc/group
-rw-r--r-- 1 root root 1029 Mar 24 12:44 /etc/passwd
+ tail -n2 /etc/passwd
messagebus:x:101:101::/nonexistent:/usr/sbin/nologin
headless:x:1000:1000:Default:/home/headless:/bin/bash
+ tail -n2 /etc/group
messagebus:x:101:
headless:x:1000:
+ ls -ld /dockerstartup /home /home/headless
drwxr-xr-x 1 headless headless 4096 Apr 25 00:58 /dockerstartup
drwxr-xr-x 1 root root 4096 Mar 24 12:43 /home
drwxr-xr-x 1 headless headless 4096 Apr 25 01:10 /home/headless
+ ls -l /dockerstartup
total 60
-rw-r--r-- 1 headless headless 3090 Mar 18 2021 help.rc
-rw-r--r-- 1 headless headless 445 Apr 25 00:58 novnc.log
-rw-r--r-- 1 headless headless 6721 Mar 18 2021 parser.rc
-rwxr--r-- 1 headless headless 872 Mar 12 17:30 set_user_permissions.sh
-rwxr-xr-x 1 headless headless 4778 Mar 24 12:38 startup.sh
-rw-r--r-- 1 headless headless 4010 Mar 24 12:38 user_generator.rc
-rwxr--r-- 1 headless headless 6207 Mar 12 17:30 version_of.sh
-rwxr--r-- 1 headless headless 5872 Mar 12 17:30 version_sticker.sh
-rw-r--r-- 1 headless headless 910 Apr 25 00:58 vnc.log
-rw-r--r-- 1 headless headless 4958 Nov 6 18:05 vnc_startup.rc
+ mkdir -p /home/headless/new-dir
+ touch /home/headless/new-file
+ ls -l /home/headless
total 56
drwxr-xr-x 1 headless headless 4096 Mar 24 12:44 Desktop
drwxr-xr-x 2 headless headless 4096 Apr 25 00:58 Documents
drwxr-xr-x 2 headless headless 4096 Apr 25 00:58 Downloads
drwxr-xr-x 2 headless headless 4096 Apr 25 00:58 Music
drwxr-xr-x 2 headless headless 4096 Apr 25 00:58 Pictures
drwxr-xr-x 2 headless headless 4096 Apr 25 00:58 Public
drwxr-xr-x 2 headless headless 4096 Apr 25 00:58 Templates
drwxr-xr-x 2 headless headless 4096 Apr 25 00:58 Videos
drwxr-xr-x 2 headless headless 4096 Apr 25 00:58 new-dir
-rw-r--r-- 1 headless headless 0 Apr 25 01:17 new-file
-rw-r--r-- 1 headless headless 185 Mar 18 2021 readme.md
-rw-r--r-- 1 headless headless 1364 Apr 25 01:17 test-01.log
drwxr-xr-x 1 headless headless 4096 Mar 24 12:44 tests
My VM is Ubuntu Server 20.04 LTS, the accetto/ubuntu-vnc-xfce-opengl-g3:latest
is base Ubuntu 22.04 LTS(for now), so the container not work in my VM(I guess so, I will try Ubuntu Server 22.04 to run the docker image).
Which tag of accetto/ubuntu-vnc-xfce-opengl-g3
can work on my VM (Ubuntu Server 20.04)?
accetto/ubuntu-vnc-xfce-opengl-g3
only have latest, firefox, chromium, These images are all based on ubuntu 22.04. @accetto
I restart a new VM which system is Ubuntu Server 22.04, now the accetto/ubuntu-vnc-xfce-opengl-g3:latest
can work, the xfce desktop startup.
run pstree in container
tini-+-dbus-daemon
|-dbus-launch
|-dconf-service---2*[{dconf-service}]
|-gpg-agent
|-startup.sh-+-bash---python3
| `-xinit-+-Xvnc
| `-xfce4-session-+-Thunar---2*[{Thunar}]
| |-xfce4-panel-+-panel-14-action---2*[{panel-14-action}]
| | |-panel-6-systray---2*[{panel-6-systray}]
| | |-panel-8-pulseau---2*[{panel-8-pulseau}]
| | |-xfce4-appfinder---2*[{xfce4-appfinder}]
| | `-2*[{xfce4-panel}]
| |-xfdesktop---2*[{xfdesktop}]
| |-xfsettingsd---2*[{xfsettingsd}]
| |-xfwm4---2*[{xfwm4}]
| `-2*[{xfce4-session}]
`-xfconfd---2*[{xfconfd}]
accetto/ubuntu-vnc-xfce-opengl-g3:jammy
(ubuntu server 22.04)accetto/ubuntu-vnc-xfce-opengl-g3:focal
(ubuntu server 20.04)Hello @qyvlik ,
I appreciate your work and I'm really glad, that you've got it running. Your environment is pretty interesting and not trivial. :)
From the data we can see, that the Xfce4 was not completely initialized in the first case. I never tested such a scenario, so I'll not speculate about the reason.
Maybe you've already noticed, but I've published the previous images for you. Please go to the repository accetto/ubuntu-vnc-xfce-opengl-g3 and look for the 20.04
tags.
I've built the images from the archived branch archived-generation-g3v2. You can do it also yourself any time you wish.
I find your proposal interesting, but I'm not sure, if I'll get the previous images back to the project. Each image variation brings also some overhead (like Dockerfiles, more comples scripts and Readme files etc.) and I'm already having pretty hard time to maintain all the images I have. Maybe I could do it just for the opengl
image in this project. I have to think about it.
Regards, accetto
Hello @accetto, Thank you very much for your efforts and contributions !
Docker image qyvlik/yairm210-unciv:4.6.7-focal
now run on Ubuntu Server 20.04!
Maintaining multiple versions of docker images is a headache. Maybe you can try linuxserver/docker-mods.
Closing as solved.
After startup, the screen is black and the mouse cannot see it, Dockerfile see below @accetto
top
in container, output below, some program not startup ?