A coworker has found a way to share audio over network for No Machine in multinode environments, specifically to applications that are executed in remote servers (not the node) through exporting X (like an ssh -X).

Imagine you have the next scenario:

NX Terminal Server –> NX Node –> Your virtual Environment (desktop) –>  Remote App «Call an application from a remote server» (which requires audio enabled) with ssh -X or export the X server variable.

The main documents of No Machine for audio settings are:

https://www.nomachine.com/AR10Q01048

https://www.nomachine.com/AR11P01006

https://www.nomachine.com/AR11P01006

But, those documents do not explain how pulse works, or how you should set it up in order to work with NX.

Setting up Audio with NX

Objectives:

  • Enable each user to run an instance of Pulse in the node
  • Enable the network support for audio in Pulse Server (NX)
  • Export the Pulse variable to the remote X execution so it uses the enabled pulse server instance.

 

Running pulse in the nodes

My coworker designed an script for this purpose:

This will be called from /usr/NX/etc/node.cfg (in each node must be enabled)

When a user is authenticated it will run an instance of pulse audio in the node.

Enable pulse audio support over network

Inside the product, when you are using a multinode environment you’ll have a sort of embbed pulse server configuration in:

In here you can enable several modules like the xkbbell module. But, to enable audio over network you must enable the module-native-protocol-tcp  functionality of pulse server:

Export the Pulse variable to the remote X

We call an application using ssh, for example (we have keys not using a password):

(Assuming you know which node you’ve landed, i.e: MY_PULSE_SERVERTESTNOMACHINENODE1:7001)

With the DISPLAY variable we export the display of the current user in the node.

as you can see, we are not using ssh -X  (you could) but we are only exporting the DISPLAY variable and the PULSE_SERVER variables.

Pulse audio isn’t required to be installed in the destination server.