Using VNC

From Livedoc - The Documentation Repository
Jump to: navigation, search

You will first want to install a VNC client on your computer (for example Vinagre). For example, to install Vinagre on Ubuntu, run the following command:

sudo apt install vinagre

You will then want to ssh into the machine running the virtual machine and run the following command as root:

virsh vncdisplay <vm>

You will get output similar to 127.0.0.1:1. You will want to add 5900 to the end of the last number to get the port. In this case, the port would be 5901.

You will then want to use the following command to forward this port to your local computer. If you are not on the CSL network, you will need to use Openvpn.

ssh -L 5901:localhost:5901 antipodes.csl.tjhsst.edu

In the command above, the virtual machine that was being accessed was running on antipodes. You will want to change this if your virtual machine is running on a different server.

Open up your VNC client and connect to 127.0.0.1:5901 (the port depends on the command above). That's it!

If you are using vinagre, you can use F10 to escape mouse and keyboard capture.

If you press Ctrl+Alt+Delete while you are connected to a tty via VNC, you will reboot the machine.