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
36.13k stars 1.78k forks source link

"No Protocol Specified" after docker run on pop!_os 20.04 #4

Closed mythral closed 4 years ago

mythral commented 4 years ago

System Info

OS: pop!_os 20.04 Kernel: 5.4.0-7634-generic

Steps taken

  1. Installed package pre-reqs via sudo apt install qemu qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager
  2. Ran
    sudo systemctl enable libvirtd.service
    sudo systemctl enable virtlogd.service
    sudo modprobe kvm
  3. Ran egrep -c '(svm|vmx)' /proc/cpuinfo and got 8.
  4. Rebooted.
  5. Verified /dev/kvm had permissions 666.
  6. Ran docker pull sickcodes/docker-osx
  7. Ran docker run --privileged -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx

Log

No protocol specified                                                                                                                                                                                                
Unable to init server: Could not connect: Connection refused                                                                                                                                                         
QEMU 5.0.0 monitor - type 'help' for more information                                                                                                                                                                
(qemu) ALSA lib confmisc.c:767:(parse_card) cannot find card '0'                                                                                                                                                     
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory                                                                                                  
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings                                                                                                                                                   
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory                                                                                                       
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name                                                                                                                                                      
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory                                                                                                        
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory                                                                                                                                   
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default                                                                                                                                                      
alsa: Could not initialize DAC                                                                                                                                                                                       
alsa: Failed to open `default':                                                                                                                                                                                      
alsa: Reason: No such file or directory                                                                                                                                                                              
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'                                                                                                                                                            
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory                                                                                                  
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings                                                                                                                                                   
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory                                                                                                       
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name                                                                                                                                                      
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory                                                                                                        
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `dac'
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(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:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4693:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5181:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(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
code-doge commented 4 years ago

I had same issue on Ubuntu 20.04

sickcodes commented 4 years ago

Try this:

echo $DISPLAY

# ARCH
sudo pacman -S xorg-xhost

# UBUNTU DEBIAN
sudo apt install x11-xserver-utils

# CENTOS RHEL FEDORA
sudo yum install xorg-x11-server-utils

# then run
xhost +

docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx ./OpenCore-Boot.sh
mythral commented 4 years ago

Try this:

echo $DISPLAY

# ARCH
sudo pacman -S xorg-xhost

# UBUNTU DEBIAN
sudo apt install x11-xserver-utils

# CENTOS RHEL FEDORA
sudo yum install xorg-x11-server-utils

# then run
xhost +

docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx ./OpenCore-Boot.sh

This worked for me. Thanks :)