gtk initialization failed when using Zorin OS Mini #448

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

Originally created by @strider789 on GitHub (Dec 16, 2022).

Hey, please can somebody help with this error I'm getting?

Here's the code I'm trying to run

`sudo 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

docker build -t docker-osx --build-arg SHORTNAME=ventura .`

Here's some details of what was happening leading up to the error

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
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
`

Here is the output of the code that shows my OS details

`NAME="Zorin OS"
PRETTY_NAME="Zorin OS 16.2"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p2 234G 17G 206G 8% /

Command 'qemu-system-x86_64' not found, but can be installed with:

sudo apt install qemu-system-x86 # version 1:4.2-3ubuntu6.24, or
sudo apt install qemu-system-x86-xen # version 1:4.2-3ubuntu6.24

Command 'libvirtd' not found, but can be installed with:

sudo apt install libvirt-daemon

          total        used        free      shared  buff/cache   available

Mem: 7.7Gi 1.6Gi 531Mi 603Mi 5.6Gi 5.1Gi
Swap: 2.0Gi 2.0Mi 2.0Gi
8
16
crw-rw----+ 1 root kvm 10, 232 Dec 16 20:10 /dev/kvm
total 8.0K
drwxrwxrwt 2 root root 4.0K Dec 16 20:06 .
drwxrwxrwt 17 root root 4.0K Dec 16 20:38 ..
srwxrwxrwx 1 root root 0 Dec 16 20:06 X0
root 689 6.5 1.0 2016816 83568 ? Ssl 20:06 2:10 dockerd --group docker --exec-root=/run/snap.docker --data-root=/var/snap/docker/common/var-lib-docker --pidfile=/run/snap.docker/docker.pid --config-file=/var/snap/docker/2285/config/daemon.json
msilver+ 5630 0.0 0.0 18808 660 pts/1 S+ 20:39 0:00 grep --color=auto dockerd
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": dial unix /var/run/docker.sock: connect: permission denied
`

Originally created by @strider789 on GitHub (Dec 16, 2022). Hey, please can somebody help with this error I'm getting? Here's the code I'm trying to run `sudo 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 # docker build -t docker-osx --build-arg SHORTNAME=ventura .` Here's some details of what was happening leading up to the error `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 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 ` Here is the output of the code that shows my OS details `NAME="Zorin OS" PRETTY_NAME="Zorin OS 16.2" VERSION_CODENAME=focal UBUNTU_CODENAME=focal Filesystem Size Used Avail Use% Mounted on /dev/nvme0n1p2 234G 17G 206G 8% / Command 'qemu-system-x86_64' not found, but can be installed with: sudo apt install qemu-system-x86 # version 1:4.2-3ubuntu6.24, or sudo apt install qemu-system-x86-xen # version 1:4.2-3ubuntu6.24 Command 'libvirtd' not found, but can be installed with: sudo apt install libvirt-daemon total used free shared buff/cache available Mem: 7.7Gi 1.6Gi 531Mi 603Mi 5.6Gi 5.1Gi Swap: 2.0Gi 2.0Mi 2.0Gi 8 16 crw-rw----+ 1 root kvm 10, 232 Dec 16 20:10 /dev/kvm total 8.0K drwxrwxrwt 2 root root 4.0K Dec 16 20:06 . drwxrwxrwt 17 root root 4.0K Dec 16 20:38 .. srwxrwxrwx 1 root root 0 Dec 16 20:06 X0 root 689 6.5 1.0 2016816 83568 ? Ssl 20:06 2:10 dockerd --group docker --exec-root=/run/snap.docker --data-root=/var/snap/docker/common/var-lib-docker --pidfile=/run/snap.docker/docker.pid --config-file=/var/snap/docker/2285/config/daemon.json msilver+ 5630 0.0 0.0 18808 660 pts/1 S+ 20:39 0:00 grep --color=auto dockerd Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": dial unix /var/run/docker.sock: connect: permission denied `
Author
Owner

@sickcodes commented on GitHub (Dec 17, 2022):

Thanks for that, Ubuntu loves changing their package names, with zero backwards compatibility (libvirt-daemon).

I can't see what user you are, root?

Are you in the Docker group?

Two ways, xhost + so you can use the desktop user's display as root/docker.

And add yourself to docker group, restart docker after

@sickcodes commented on GitHub (Dec 17, 2022): Thanks for that, Ubuntu loves changing their package names, with zero backwards compatibility (libvirt-daemon). I can't see what user you are, root? Are you in the Docker group? Two ways, `xhost +` so you can use the desktop user's display as root/docker. And add yourself to docker group, restart docker after
Author
Owner

@strider789 commented on GitHub (Dec 18, 2022):

Thanks for the reply. I'm not logged in as root. I tried to add my username to the docker group but it said

usermod: group 'docker' does not exist

@strider789 commented on GitHub (Dec 18, 2022): Thanks for the reply. I'm not logged in as root. I tried to add my username to the docker group but it said usermod: group 'docker' does not exist
Author
Owner

@strider789 commented on GitHub (Dec 18, 2022):

I added --privileged to it (see below) and I think it gets further than before but it still stops with an error

`sudo docker run --privileged -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

(#) docker build -t docker-osx --build-arg SHORTNAME=ventura .`

Here's the error

`+ sudo chown -R 1000:1000 /dev/snd

  • exec qemu-system-x86_64 -m 4000 -cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check, -machine q35,accel=kvm:tcg -smp 4,cores=4 -usb -device usb-kbd -device usb-tablet -device 'isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc' -drive if=pflash,format=raw,readonly=on,file=/home/arch/OSX-KVM/OVMF_CODE.fd -drive if=pflash,format=raw,file=/home/arch/OSX-KVM/OVMF_VARS-1024x768.fd -smbios type=2 -audiodev alsa,id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda -device ich9-ahci,id=sata -drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2 -device ide-hd,bus=sata.2,drive=OpenCoreBoot -device ide-hd,bus=sata.3,drive=InstallMedia -drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 -drive id=MacHDD,if=none,file=/home/arch/OSX-KVM/mac_hdd_ng.img,format=qcow2 -device ide-hd,bus=sata.4,drive=MacHDD -netdev user,id=net0,hostfwd=tcp::10022-:22,hostfwd=tcp::5900-:5900, -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:09:49:17 -monitor stdio -boot menu=on -vga vmware
    QEMU 7.1.0 monitor - type 'help' for more information
    (qemu) gtk initialization failed
    `
@strider789 commented on GitHub (Dec 18, 2022): I added --privileged to it (see below) and I think it gets further than before but it still stops with an error `sudo docker run --privileged -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 (#) docker build -t docker-osx --build-arg SHORTNAME=ventura .` Here's the error `+ sudo chown -R 1000:1000 /dev/snd + exec qemu-system-x86_64 -m 4000 -cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check, -machine q35,accel=kvm:tcg -smp 4,cores=4 -usb -device usb-kbd -device usb-tablet -device 'isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc' -drive if=pflash,format=raw,readonly=on,file=/home/arch/OSX-KVM/OVMF_CODE.fd -drive if=pflash,format=raw,file=/home/arch/OSX-KVM/OVMF_VARS-1024x768.fd -smbios type=2 -audiodev alsa,id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda -device ich9-ahci,id=sata -drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2 -device ide-hd,bus=sata.2,drive=OpenCoreBoot -device ide-hd,bus=sata.3,drive=InstallMedia -drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 -drive id=MacHDD,if=none,file=/home/arch/OSX-KVM/mac_hdd_ng.img,format=qcow2 -device ide-hd,bus=sata.4,drive=MacHDD -netdev user,id=net0,hostfwd=tcp::10022-:22,hostfwd=tcp::5900-:5900, -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:09:49:17 -monitor stdio -boot menu=on -vga vmware QEMU 7.1.0 monitor - type 'help' for more information (qemu) gtk initialization failed `
Author
Owner

@strider789 commented on GitHub (Dec 18, 2022):

I've got it working. I was using the snap version of docker. I uninstalled it and used the apt docker.io version and then it worked, I'm now running mac OS.

The reason I had originally installed the snap version of docker is because it had a later version number. I figured that later meant better.

Many thanks for sharing this amazing project.

@strider789 commented on GitHub (Dec 18, 2022): I've got it working. I was using the snap version of docker. I uninstalled it and used the apt docker.io version and then it worked, I'm now running mac OS. The reason I had originally installed the snap version of docker is because it had a later version number. I figured that later meant better. Many thanks for sharing this amazing project.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#448