mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-11 21:10:25 +01:00
gtk initialization failed #642
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ademirtug on GitHub (Feb 13, 2025).
I'm encountering the error "GTK initialization failed" when running the following command from the Windows Terminal:
docker run -it --device /dev/kvm -p 50921:10022 -v /mnt/wslg/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" -e RAM=8 -e EXTRA='-smp 8,sockets=4,cores=2' -e GENERATE_UNIQUE=true -e CPU='Haswell-noTSX' -e CPUID_FLAGS='kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on' -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom-sonoma.plist' -e SHORTNAME=sonoma sickcodes/docker-osx:latestHowever, if I first launch WSL (wsl) and then run the same command inside the WSL environment, everything works fine.
Is this the intended behavior?
@ipaqmaster commented on GitHub (Feb 22, 2025):
Experienced the same for
SHORTNAME=venturaandSHORTNAME=sonoma.Ran
xhost +and it worked.Relevant log lines:
Authorization required, but no authorization protocol specifiedgtk initialization failed@mohamadsy1234 commented on GitHub (Apr 9, 2025):
لحل مشكلة "فشل تهيئة GTK" عند تشغيل الأمر في Windows Terminal، اتبع الخطوات التالية:
1. تثبيت خادم X11 على Windows:
2. تعديل متغير
DISPLAYفي الأمر:host.docker.internalللاتصال بخادم X على الـ host:3. إزالة مشاركة مجلد WSLg:
4. الأمر المعدل النهائي:
5. تأكد من:
ملاحظة: إذا استمرت المشكلة، جرب إضافة
--network hostإلى الأمر لتجنب مشاكل شبكة Docker.