sickcodes / Docker-OSX

Run macOS VM in a Docker! Run near native OSX-KVM in Docker! X11 Forwarding! CI/CD for OS X Security Research! Docker mac Containers.
https://hub.docker.com/r/sickcodes/docker-osx
GNU General Public License v3.0
48.5k stars 2.7k forks source link

gtk initialization failed #377

Closed ThatGuy123-cmd closed 3 years ago

ThatGuy123-cmd commented 3 years ago

So have tried previously suggested solutions (sudo pacman -S xorg-host && xhost +) but nethier have worked, all dependencies are downloaded and just having a really hard time with this

LOG:

╰─λ sudo docker run -it \ --device /dev/kvm \ -p 50922:10022 \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e "DISPLAY={DISPLAY:-:0.0}" \ sickcodes/docker-osx:big-sur ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 nohup: appending output to 'nohup.out' ++ id -u ++ id -g

ThatGuy123-cmd commented 3 years ago

So ended up fixing this by changing the Display ENV var from "DISPLAY={DISPLAY:-:0.0}" to "DISPLAY=:0" after reading this article from the ubuntu forums (https://askubuntu.com/questions/1192102/xhost-produce-access-control-disabled-message-but-do-not-works)

@sickcodes Really looked around and couldn't find anything on this

Hope someone who's had the same problem as me across this and finds it useful, but for now, problem solved :)

sickcodes commented 3 years ago

Regarding the DISPLAY variable, I have it at the very, very bottom of the README.md sorry.

https://github.com/sickcodes/Docker-OSX#what-is-display-00

And then the GTK error is here.

https://github.com/sickcodes/Docker-OSX#libgtk-errors-connection-refused

I should add the DISPLAY instructions inside the gtk confused section!

sickcodes commented 3 years ago

So ended up fixing this by changing the Display ENV var from "DISPLAY={DISPLAY:-:0.0}" to "DISPLAY=:0" after reading this article from the ubuntu forums (https://askubuntu.com/questions/1192102/xhost-produce-access-control-disabled-message-but-do-not-works)

@sickcodes Really looked around and couldn't find anything on this

Hope someone who's had the same problem as me across this and finds it useful, but for now, problem solved :)

What host operating system were you using? I would like to fix the README :)

ThatGuy123-cmd commented 3 years ago

I was using Garuda KDE Dr460nized, Arch Linux, Kernel Version 5.14.15.

Haha, glad this may help someone in the future :)

sickcodes commented 2 years ago

Thanks, feel free to add a Garuda KDE note in the README 😇