dockur / windows

Windows inside a Docker container.
MIT License
30k stars 2.04k forks source link

[Question]: how can I have sound? #855

Open Handsomeskull opened 2 weeks ago

Handsomeskull commented 2 weeks ago

Is your question not already answered in the FAQ?

Is this a general question and not a technical issue?

Question

I tried win10 and there is no sound like in win7 and winxp, it's probably something to do with docker containers, I tried several solutions (virtual audio cables, V-CABLE for ex) but it still doesn't work, what can I do?

LeonDante-ctrl commented 2 weeks ago
  1. PulseAudio:
    • Install PulseAudio: Install PulseAudio within your Docker container. This will provide a robust audio server.
    • Configure PulseAudio: Configure PulseAudio to use the host system's audio device. This involves setting up appropriate modules and configurations.
    • Set the PULSE_SERVER Environment Variable: Set the PULSE_SERVER environment variable in your Docker container to point to the PulseAudio server.
  2. WSL 2 and WSLg:
    • Enable WSL 2: Ensure WSL 2 is enabled on your system.
    • Install a Linux Distribution: Install a Linux distribution like Ubuntu or Debian.
    • Install Docker: Install Docker within your Linux distribution.
    • Run Docker Containers: Run your Docker containers within the WSL 2 environment. WSLg will handle the audio routing between the container and your Windows system.
  3. Windows Subsystem for Linux (WSL):
    • Install a Linux Distribution: Install a Linux distribution like Ubuntu or Debian.
    • Install Docker: Install Docker within your Linux distribution.
    • Run Docker Containers: Run your Docker containers within the WSL environment. While WSL doesn't have direct audio passthrough, it might be possible to use PulseAudio or other workarounds. Additional Tips:
    • Check Docker Settings: Ensure that Docker is configured to use the correct audio device.
    • Update Drivers: Keep your audio drivers up-to-date.
    • Experiment with Different Configurations: Try different configurations for PulseAudio and Docker settings.
    • Consult Community Forums: Seek help from the Docker and Linux communities. Remember: The specific steps and configuration details may vary depending on your Docker setup, Linux distribution, and desired audio configuration. Would you like to provide more details about your specific Docker setup, the type of container you're running, and the audio application you're trying to use? This will help me provide more tailored advice. By following these guidelines and experimenting with different approaches, you should be able to resolve the sound issue in your Windows 10 Docker containers.
elleparker commented 2 weeks ago

how can sound have you?

dengniqiu commented 2 weeks ago

NOVNC doesn't support sound, you can use the remote control software that comes with Windows to have sound