Docker-OSX icon indicating copy to clipboard operation
Docker-OSX copied to clipboard

Running on WSL2 and the keyboard or mouse got stuck during boot

Open chengjiaozyl opened this issue 3 years ago • 8 comments

I have startup osx on win10 and wsl2(ubuntu subsystem), but after i run the docker command, like docker run .... sickcodes/docker-osx:latest, the x11 server got the gui output and showed in a window, after compiling, i could enter the boot menu, but usually, i got stuck and could not use mouse or keyboard anymore after i used the disk utility to erase a disk or i clicked the reinstall the mac os. Did it mean that any hardware on my pc could not handle this?

chengjiaozyl avatar Dec 03 '21 08:12 chengjiaozyl

I also have experienced this, it's due to low ram

-e RAM=5

sickcodes avatar Dec 03 '21 15:12 sickcodes

any luck with the mouse or keyboard functional? I ran into similar issue, during installation, unable to select Dist Utility or reinstall Big Sur @chengjiaozyl

tobatha avatar Dec 05 '21 06:12 tobatha

I haven't experience this situation. I've used WSLg and it work great but not perfect, here a problem with WSLg You can also use vnc to bypass this problem, just use -vnc :0 and connect via VNC Client

MikeCoder96 avatar Dec 05 '21 14:12 MikeCoder96

any luck with the mouse or keyboard functional? I ran into similar issue, during installation, unable to select Dist Utility or reinstall Big Sur @chengjiaozyl

just as sickcodes says, allocate more ram while start your container.

I also have experienced this, it's due to low ram

-e RAM=5 thanks, it works.

chengjiaozyl avatar Dec 06 '21 02:12 chengjiaozyl

any luck with the mouse or keyboard functional? I ran into similar issue, during installation, unable to select Dist Utility or reinstall Big Sur @chengjiaozyl

just as sickcodes says, allocate more ram when you start your container.

chengjiaozyl avatar Dec 06 '21 02:12 chengjiaozyl

thank you, is that mean i can use the following command and use vnc to connect it? @MikeCoder96

docker run -i \
    --device /dev/kvm \
    -p 50922:10022 \
    -p 5999:5999 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e EXTRA="-display none -vnc 0.0.0.0:99,password=on" \
    sickcodes/docker-osx:big-sur

chengjiaozyl avatar Dec 06 '21 02:12 chengjiaozyl

@chengjiaozyl yes, it will work with vnc client. I will put an .sh file to start docker-OSX with VNC Server and make pull request.

MikeCoder96 avatar Dec 06 '21 07:12 MikeCoder96

Type device_add usb-mouse currently is the solution

sickcodes avatar Dec 28 '21 17:12 sickcodes