Remote Connection to a Virtual Lab PC

This approach can help you in case you do not have a device capable of running the ARO workspace (Singularity). We have prepared a virtual machine you can connect to using remote desktop. And it can run the whole ARO codebase.

This is a preliminary guide and it is still under testing. If you want to try it out, contact .

Start the remote desktop server

First of all, connect to the faculty VPN.

Connect to the virtual computer using a jump host (flag -J) and your school <username> :
ssh -YC -J <username> <username>@

Next, you need to figure out a unique set of ports. The following algorithm is expected to find one based on your CTU ID. It also makes sure you use unique ports for ROS and Gazebo:

export vnc_port=$(echo -n 2; id -u | tail -c 5)
export vnc_port2=$(echo $vnc_port + 5900 | bc)
export ros_port=$(echo $vnc_port + 11311 | bc)
export gz_port=$(echo $vnc_port + 11345 | bc)
export ROS_MASTER_URI=http://localhost:${ros_port}
export GAZEBO_MASTER_URI=http://localhost:${gz_port}
export VGL_DISPLAY=/dev/dri/card1
echo "Connect to VNC server${vnc_port2} or${vnc_port}" 

Then, start the remote desktop server (you can choose the desktop resolution in the geometry parameter):

vglrun +v /opt/TurboVNC/bin/vncserver -log /dev/stdout -geometry 1920x1080 -fg -xstartup xfce4-session :${vnc_port}

When you launch it for the first time, it will want you to set a password. Call /opt/TurboVNC/bin/vncpasswd to do that.

It is suggested to launch the vncserver inside a screen or tmux session on the virtual server. Otherwise, if the connection drops, your virtual desktop would completely crash.
Do not forget to stop the remote desktop server when you are finished working. Just Ctrl+C the previous command.
The virtual machine running these desktops is regularly rebooted on Tuesday morning each week. All running processes will be stopped during the reboot.
The algorithm for choosing ports for ROS and Gazebo is not 100% bulletproof. It can happen that it will assign the same ports to two distinct students. If that happens (ROS nodes are dying, Gazebo does not launch, VNC server does not launch), just choose any random port above 1024 and stick to it (ideally just change the computation of variable vnc_port in the algorithm and keep the rest the same).

Remote Desktop

Once you have the server running, you can use any VNC remote desktop client (TurboVNC, Remmina, TightVNC, TigerVNC) to connect to it. Remmina is the one preinstalled in Ubuntu.

Set the destination IP address to and choose one of the two ports printed by the previous script. You also have to set up a jump host over with your SSH login details.

Once the remote desktop connects, open a graphical terminal by clicking on the terminal icon in the bottom part of the screen.

Robot Operating System (ROS)

Follow the ROS guide for lab computers to get your workspace up and running. The virtual machine shares the same home drive as the lab computers and turtlebots.

You can also launch PyCharm/VSCode from inside the Singularity image.

More Information

In case of technical difficulties with connecting you can drop an email to but describe in detail what are you trying to do and what is the result. Messages It doesn't work, help! will be ignored. Any constructive feedback is welcome.

courses/aro/tutorials/remote_access.txt · Last modified: 2024/05/06 16:45 by peckama2