-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(SOLVED) [Ubuntu 20] [Headless] 'gtk initialization failed' with specific images (big-sure, monterey etc) but auto works. #517
Comments
Ok, I was able to get it running with the below docker run command and image. The logs should finish on the lines also shown below, then you can ssh into the image with user and alpine to confirm everything is working. docker run -it \
--name docker-osx \
--device /dev/kvm \
-p 50922:10022 \
-v "${PWD}/mac_hdd_ng_auto_monterey.img:/image" \
-e GENERATE_UNIQUE=true \
-e MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/custom/config-nopicker-custom.plist \
-e EXTRA="-display none" \
sickcodes/docker-osx@sha256:4da5a80bf3aca7306e441a4fad4b92aafcd0fb5f9d0c143dbdf857d162d6903c Your docker logs should end like this ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_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:5178:(_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:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize ADC
alsa: Failed to open `default':
alsa: Reason: No such file or directory |
Awesome work, apologies for not getting back earlier. I also like the perfectly syntaxed report 😁 |
Thanks (Can't help myself with the pretty markdown!). Fantastic job with docker-osx as well, glad to be finally getting away from Apple's hardware restrictions. Interesting question will be what will happen when they fully migrate to Arm. Hopefully this issue helps others, but looks like a PR may be required to resolve whatever changed in the image (Originally commented here #498 (comment)) |
I started with these commands and it worked fine. But the container startup is too slow. how can i solve this problem? |
I followed the initial setup after replicating the issue, I executed these $ sudo docker run -i --device /dev/kvm -p 50922:10022 -e GENERATE_UNIQUE=true -e DEVICE_MODEL="iMacPro1,1" -e WIDTH=1600 -e HEIGHT=900 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY:=0.0" sickcodes/docker-osx:big-sur Worked like a charm! |
i had the same issue but i managed to fix it by building my own image: git clone https://github.com/sickcodes/Docker-OSX.git
cd Docker-OSX
docker build -t docker-osx .
xhost +
docker run --device /dev/kvm --device /dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" docker-osx:latest it worked for me on Ubuntu 22.04.2 LTS. also i executed commands from "Recommended fixes from previous issues" section above (not sure if any of those was actually needed though). it is as simple as that. hope it helps somebody. |
Many thanks. It did not help me unfortunately.
My system is a J4202-itx, which supports VT-x |
If you can modify arguments passed to qemu, adding |
Description
Unable to successfully run any headless image other than 'auto' as they stop on
gtk initialization failed
error.System info
What works
The below command works successfully without issue.
What doesn't work
The below issue returns the
gtk initialization failed
error, with the below log.Last log lines
Comments & previously recommended fixes
Looks like there are a few issues currently mentioning this issue as of time of writing, both on Linux systems and WSL2 from people wanting both headless and displayed deployments:
Recommended fixes from previous issues
sudo apt install x11-xserver-utils -y sudo apt install qemu-system-gui # No permission to access the display xhost +
# Updating permissions sudo chmod 666 /dev/kvm
# Running docker as privleged --privileged
-e "DISPLAY=:10
xhost "+SI:localuser:#1000"
Conclusion
Sadly none of the provided fixes seemed to have worked for me. I guess the question would be what changes between running 'auto' headless compared to 'big-sur' (or any other image)?
The text was updated successfully, but these errors were encountered: