Topics tend to come into Leostream Support in waves. The latest stream of questions center around managing multiple simultaneous connections to a Linux machine running a VNC server. This allows several users to share one Linux machine while giving each user an independent session, similar to Microsoft Remote Desktop Services. In this blog post, we show you how you can configure the Linux server and Leostream to support this scenario.

 

Configuration for CentOS/RHEL 7:

  1. Download and install the latest Leostream Agent

https://leostream.com/downloads/leostream-agent-for-linux-operating-systems

            sudo java -jar <Agent JAR file>

 

  1. Install VNC server package

sudo yum install tigervnc-server

 

  1. Set VNC password (replace <username> with the applicable username)

su – <username>

vncpasswd

 

  • Note: the user login password must match the credentials being used in Leostream
  • Note: you do not have to set a view-only password

 

  1. Enable the VNC port(s) through the firewall (each user requires their own port starting from 5901)

firewall-cmd –add-port=5901/tcp –permanent

 

  • Note: you can specify a port range for multiple users, such as:

firewall-cmd –add-port=5901-5904/tcp –permanent

 

  1. Restart the CentOS/RHEL machine

 

 

Configuring the Leostream Connection Broker for Multi-User VNC:

 

  1. Navigate to the Setup>Centers page and select Add Center

 

  1. Set the Center Type to “Remote Desktop Services/Multi-User” and input the correct information for the device. Make sure to set the maximum concurrent connections option to the intended value.

 

 

  1. Open the Configuration>Pools page and create a new pool that contains the VNC session offers.

 

 

  1. Create a Protocol Plan on the Configuration>Protocol Plans page that uses VNC by setting VNC to priority 1 and everything else to “Do not use”.

 

 

  1. Create a new Policy on the Configuration>Policies page and set it to offer desktops from the VNC pool that you created in step 3.

 

 

  1. Set the new Policy to use the VNC protocol configured in step 4 by setting it in the Plans section of the Policy form.

 

  1. On the Configuration>Assignments page set the Default Policy to the VNC policy, or assign the policy to specific users based on other parameters.

  1. Test the connection with Leostream Connect or the Web Client and enjoy multi-user VNC!

 

Helpful commands:

  • List current VNC sessions:

ps -ef | grep vnc

 

  • Kill a VNC session:

kill -9 <id-from-vnc-list>