0. I often access to my physical display of my PC and listen to the audio played there.
Here is how I achieve it with vnc and pulseaudio on Arch Linux.
1. Get tigervnc. It comes with libvnc.so which can be loaded via Xorg. There are other solutions like x11vnc and x0vncserver,
however they are very slow compared to libvnc.so. With libvnc.so you can even watch 4k youtube videos over 100mbps link.
2.Create conf file under /etc/X11/xorg.conf.d/
If you need authenticaton, just run “vncpasswd” and specify password file like below.
If you don’t need one, just set security tyep to None.
3. Get pulseaudio, pavucontrol and pasystray.
3. Edit /etc/pulse/default.pa
Uncomment the lines below on a server. I also enable module-native-protocol-tcp for unicasting, which seems to be faster than RTP option.
Uncomment the line below on a client.
Pulseaudo should start automatically, however, in my environment, as soon as I set above setting, pulseaudio fails to
start. So I created the script below and set it to be run in xfce4 startup setting.
5. That’s all. You should be able to access to the server via 5900 port.
Audio can be heard on the client by setting sink to RTP multicast on the server.
For unicast, change default server on pasystray. You should also start pasystray by
“PULSE_SERVER “remote server ip address” pasystray &”