gtk initialization failed #573

Open
opened 2025-12-29 01:22:16 +01:00 by adam · 6 comments
Owner

Originally created by @SimonBard on GitHub (Mar 6, 2024).

I started the container with:


docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e GENERATE_UNIQUE=true \
    -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \
    sickcodes/docker-osx:ventura

Got this error. I was using sickcodes before and the container started, but I was not able to connect via VNC again. I could not set the VNC password as I did not manage to start the qemu console.

alsa: Reason: No such file or directory
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `adc'
gtk initialization failed

Full logs attached

silly_shannon.logs.txt

Originally created by @SimonBard on GitHub (Mar 6, 2024). I started the container with: ``` docker run -it \ --device /dev/kvm \ -p 50922:10022 \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e "DISPLAY=${DISPLAY:-:0.0}" \ -e GENERATE_UNIQUE=true \ -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \ sickcodes/docker-osx:ventura ``` Got this error. I was using sickcodes before and the container started, but I was not able to connect via VNC again. I could not set the VNC password as I did not manage to start the qemu console. ``` alsa: Reason: No such file or directory ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize ADC alsa: Failed to open `default': alsa: Reason: No such file or directory audio: Failed to create voice `adc' gtk initialization failed ``` **Full logs attached** [silly_shannon.logs.txt](https://github.com/sickcodes/Docker-OSX/files/14508837/silly_shannon.logs.txt)
Author
Owner

@fillipesouzaaraujo commented on GitHub (Mar 6, 2024):

Hi, execute container:

docker run -i --device /dev/kvm -p 50922:10022 -p 5999:5999 -p 5900:5900 -p 99:99 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" -e EXTRA="-display none -vnc 0.0.0.0:99,password=on" sickcodes/docker-osx:ventura

After that press Enter in terminal:

image

QEMU console will be appear.

Type in (qemu)

change vnc password <YOUR_PASSWORD>

In your macos vnc connection:

Host: vnc://<YOUR_IP>:5999
Example: vnc://127.0.0.1:5999

I hope it helps!

@fillipesouzaaraujo commented on GitHub (Mar 6, 2024): Hi, execute container: ```bash docker run -i --device /dev/kvm -p 50922:10022 -p 5999:5999 -p 5900:5900 -p 99:99 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" -e EXTRA="-display none -vnc 0.0.0.0:99,password=on" sickcodes/docker-osx:ventura ``` After that press Enter in terminal: ![image](https://github.com/sickcodes/Docker-OSX/assets/6743274/9098d3d8-a171-493a-87b8-bc1d7ab9b1e3) QEMU console will be appear. Type in (qemu) ```bash change vnc password <YOUR_PASSWORD> ``` ----- In your macos vnc connection: Host: vnc://<YOUR_IP>:5999 Example: vnc://127.0.0.1:5999 I hope it helps!
Author
Owner

@SimonBard commented on GitHub (Mar 6, 2024):

I hope it helps!

Many thanks! That worked. But when I restart the container, how can I get the qemu console again to set a VNC password?
The container somehow stopped during installation, I restarted it with "docker restart zealous_wescoff", but when I do "docker exec -it zealous_wescoff bash", I of course get the bash and I do not know how to set the VNC password then.

I tried to start it with this and got an error:

[arch@12b11851358b OSX-KVM]$ qemu-system-x86_64
gtk initialization failed
@SimonBard commented on GitHub (Mar 6, 2024): > I hope it helps! Many thanks! That worked. But when I restart the container, how can I get the qemu console again to set a VNC password? The container somehow stopped during installation, I restarted it with "docker restart zealous_wescoff", but when I do "docker exec -it zealous_wescoff bash", I of course get the bash and I do not know how to set the VNC password then. I tried to start it with this and got an error: ``` [arch@12b11851358b OSX-KVM]$ qemu-system-x86_64 gtk initialization failed ```
Author
Owner

@fillipesouzaaraujo commented on GitHub (Mar 7, 2024):

Mr. Bard, try access container via bash and run:

qemu-system-x86_64 [...OPTIONS...] -vnc :0,password=on -monitor stdio

-vnc :<NUMBER_PORT>

NUMBER_PORT is:

0 -> 5900
1 -> 5901
2 -> 5902

Reference: https://www.qemu.org/docs/master/system/vnc-security.html

This command will open the terminal (qemu)

@fillipesouzaaraujo commented on GitHub (Mar 7, 2024): Mr. Bard, try access container via bash and run: ```bash qemu-system-x86_64 [...OPTIONS...] -vnc :0,password=on -monitor stdio ``` -vnc :<NUMBER_PORT> NUMBER_PORT is: 0 -> 5900 1 -> 5901 2 -> 5902 Reference: [https://www.qemu.org/docs/master/system/vnc-security.html](https://www.qemu.org/docs/master/system/vnc-security.html) This command will open the terminal (qemu)
Author
Owner

@fillipesouzaaraujo commented on GitHub (Mar 7, 2024):

Or you can restar container with:

 docker start -ai <CONTAINER_ID>
@fillipesouzaaraujo commented on GitHub (Mar 7, 2024): Or you can restar container with: ```bash docker start -ai <CONTAINER_ID> ```
Author
Owner

@SimonBard commented on GitHub (Mar 8, 2024):

qemu-system-x86_64 [...OPTIONS...] -vnc :0,password=on -monitor stdio

This command will open the terminal (qemu)

Many thanks. But does not work for me:

user@users-iMac-Pro ~ % qemu-system-x86_64  -vnc :0,password=on -monitor stdio
zsh: command not found: qemu-system-x86_64
@SimonBard commented on GitHub (Mar 8, 2024): > > ```shell > qemu-system-x86_64 [...OPTIONS...] -vnc :0,password=on -monitor stdio > ``` > This command will open the terminal (qemu) Many thanks. But does not work for me: ``` user@users-iMac-Pro ~ % qemu-system-x86_64 -vnc :0,password=on -monitor stdio zsh: command not found: qemu-system-x86_64 ```
Author
Owner

@SimonBard commented on GitHub (Mar 9, 2024):

I tried today again and it did work partially. Unfortunately, it did only open a port on ipv6, not ipv4:

qemu-system-x86_64  -vnc :0,password=on -monitor stdio
QEMU 7.1.0 monitor - type 'help' for more information
(qemu) vnc info
unknown command: 'vnc'
(qemu) info vnc
default:
  Server: :::5900 (ipv6)
    Auth: vnc (Sub: none)
(qemu) change vnc password
Password: *******
@SimonBard commented on GitHub (Mar 9, 2024): I tried today again and it did work partially. Unfortunately, it did only open a port on ipv6, not ipv4: ``` qemu-system-x86_64 -vnc :0,password=on -monitor stdio QEMU 7.1.0 monitor - type 'help' for more information (qemu) vnc info unknown command: 'vnc' (qemu) info vnc default: Server: :::5900 (ipv6) Auth: vnc (Sub: none) (qemu) change vnc password Password: ******* ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#573