Enable audio on remote Windows computer through xfreerdp
Solution 1
My google-fu came back.
after digging some more, I found the answer, use /audio-mode:1 to leave audio on server. I just tested it, and my Windows VM sees the USB audio device I mapped through, a USB headset for VOIP.
xfreerdp /w:1904 /h:1120 /u:myusername /audio-mode:1 /v:192.168.1.2 +clipboard +fonts
https://github.com/FreeRDP/FreeRDP/wiki/CommandLineInterface
values are 0 - redirect locally, 1 - leave on server, 2 - none
I find this alias useful:
alias rdp_ad="xfreerdp /w:1904 /h:1120 '/u:mydomain\myusername' +clipboard +fonts "
Solution 2
With FreeRDP version 2[1] and Windows 10, what you need is the following
xfreerdp /v:MyWindows /sound /microphone
It detects PulseAudio and says:
...
[INFO][com.freerdp.channels.rdpsnd.client] - Loaded pulse backend for rdpsnd
[INFO][com.freerdp.channels.audin.client] - Loaded pulse backend for audin
...
It's super easy.
[1]: The exact versions I've tested is 2.0.0~git20190204.1.2693389a+dfsg1-2
on Debian Sid with PulseAudio 13.0-5
Solution 3
It works now !!!
An example to get it working from a Linux machine to a Windows Server 2016 requires that you install the following Services and Roles in your Windows Server 2016.
(That image shows a lot of features, but those are added if you just look for 'Remote Desktop Services' in 'Server Roles' and a bit further in the installation steps in 'Role Services' just select 'Remote Desktop Session Host'). After that it will require a reboot ...
Then make your xfreerdp connection be like this:
xfreerdp /microphone:sys:alsa /sound:sys:alsa /clipboard /u:MyUser /v:MyServerIPorHostname
Only change 'MyUser' and 'MyServerIPorHostname' for your respective data.
It will use ALSA (Advanced Linux Sound Architecture) and so redirect your default devices from your local Linux PC.
[That way you can have a full Skype experience over RDP with xfreerdp]
Related videos on Youtube
Bruce Adams
Updated on September 18, 2022Comments
-
Bruce Adams almost 2 years
I'm using xfreerdp to login to a windows machine (runnning windos 7 64bit) on my desk next to my linux machine (running RHEL7).
Normally I use:
xfreerdp -k uk -g 1280x950 --no-nla --plugin cliprdr
Which leaves the audio disabled. I can forward the sound output from the windows machine to my linux box using:
xfreerdp --plugin drdynvc --plugin rdpsnd
I cannot use the linux microphone device to supply audio to the windows box. I tried:
--plugin audin_pulse
and setting the registry entry:
HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
fDisableAudioCapture
to 0. I'm not sure how to fix this problem, despite looking at similar questions here.
However, the windows box is on my desk so I would be perfectly happy to have use the headphone and mic sockets there instead. That is I don't want to forward the audio at all just leave it enabled on the remote machine. Remote desktop seems to disable it (on the windows side I think) by default .
Under the old rdesktop program I was able to run
-r sound:remote
or-r sound:local
to do this. What is the equivalent on xfreerdp?[Background: I am aiming to use skype for business on the windows box. It doesn't matter where I plug the headset in as long as I can get it to work. I do have pidgin+sipe working on the linux box but I'm not certain all the features will work]
-
gerrit about 7 yearsDid you ever find a solution or workaround?
-
Bruce Adams about 7 yearsAlas no. I eventually gave up looking. If you find one please post an answer here.
-
Dan Ortega almost 5 yearsIt works now ...
-
Dan Ortega almost 5 years... Check unix.stackexchange.com/a/532384/357897
-
-
Bruce Adams almost 5 yearsThis answer is only good for some versions of windows (assuming it works). I'm currently on windows 10. What is the equivalent there?
-
Bruce Adams over 4 yearsShouldn't that be /sound:sys:pulseaudio or /sound:sys:alsa? Either way its not working for me with RHEL7 and 2.0.0-rc4. Probably time to try again with an upgrade.
-
Bruce Adams over 4 yearsTurns out 2.0.0-rc4 is the latest tagged release - github.com/FreeRDP/FreeRDP though the project is still quite active
-
Yasushi Shoji over 4 yearsAs you can see from help
/sound[:[sys:<sys>,][dev:<dev>,][format:<format>,][rate:<rate>,] [channel:<channel>,][latency:<latency>,][quality:<quality>]]
, everything except/sound
is optional. String between[
and]
are optional. -
Yasushi Shoji over 4 yearsgithub.com/FreeRDP/FreeRDP/blob/2.0.0-rc4/channels/tsmf/client/… Just to be complete, I think this is where it loads audio plugins. Note that when you don't specify anything, depending on the build time configuration, it loads, in the order of, pulse, oss, and alsa.
-
user3751385 about 4 yearsAdditional privacy settings in Windows Server can block access to the microphone. Go to Start > Settings > Privacy > Microphone > Allow apps to access your microphone > On
-
Tom Pohl over 3 yearsWorks for me with freerdp 2.2.0.