infrastructure:vnc
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
infrastructure:vnc [2021/12/09 09:38] – created pmania | infrastructure:vnc [2025/09/10 10:51] (current) – [Method for Ubuntu 20.04] pmania | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Setting up VNC for Remote Desktop access====== | ||
+ | |||
This page describes methods that lets you connect remotely to the graphical interface of a machine. | This page describes methods that lets you connect remotely to the graphical interface of a machine. | ||
The main assumption here is, that we want to get the actual output of the graphics card, so basically everything that you would see on the screen of the PC. This has the benefit that you can also use the remote desktop for 3D applications like Unreal which are based on vulkan, but is a bit more intense on your network connection. | The main assumption here is, that we want to get the actual output of the graphics card, so basically everything that you would see on the screen of the PC. This has the benefit that you can also use the remote desktop for 3D applications like Unreal which are based on vulkan, but is a bit more intense on your network connection. | ||
Line 72: | Line 74: | ||
If a visual connection is temporarily not required, meaning if CLI suffices, use ssh to connect to the server and run //byobu// for a comfortable, | If a visual connection is temporarily not required, meaning if CLI suffices, use ssh to connect to the server and run //byobu// for a comfortable, | ||
- | =====Method for Ubuntu 20.04===== | + | =====Method for Ubuntu 20.04 and 24.04===== |
- | This method has just recently been discovered and tested. If you encounter any issues, feel free to edit this section if some steps require workarounds or similar. | + | |
Test platform: | Test platform: | ||
- | - Ubuntu 20.04 | + | - Ubuntu 20.04 and 24.04 |
- Default Window Manager | - Default Window Manager | ||
Line 95: | Line 96: | ||
The next steps will be done on your client machine. | The next steps will be done on your client machine. | ||
- | VNC itself comes per default without any encryption. This is why we'll create a SSH tunnel to the remote machine and pipe the whole VNC traffic through it. | + | VNC itself comes per default without any encryption. This would mean that your keypresses and the screen could be sniffed. This is why we'll create a SSH tunnel to the remote machine and pipe the whole VNC traffic through it. This is also easier to setup then the other auth methods. |
Please go to your client machine and execute the following command to create the SSH tunnel and start the VNC server on the remote machine. | Please go to your client machine and execute the following command to create the SSH tunnel and start the VNC server on the remote machine. | ||
+ | For 20.04: | ||
< | < | ||
# on your client machine | # on your client machine | ||
ssh USERNAME@REMOTE.SERVER.IP -t -t -L 5900: | ssh USERNAME@REMOTE.SERVER.IP -t -t -L 5900: | ||
+ | </ | ||
+ | |||
+ | For 24.04: | ||
+ | < | ||
+ | # on your client machine | ||
+ | ssh USERNAME@REMOTE.SERVER.IP -t -t -L 5902: | ||
</ | </ | ||
Please let this command and the terminal running it open while you want to work with VNC. | Please let this command and the terminal running it open while you want to work with VNC. | ||
Line 110: | Line 119: | ||
sudo apt-get update | sudo apt-get update | ||
sudo apt-get install tigervnc-viewer | sudo apt-get install tigervnc-viewer | ||
+ | vncviewer | ||
+ | </ | ||
+ | |||
+ | In the tigervnc-viewer, | ||
+ | Afterwards, you can enter ' | ||
+ | For 24.04, please enter ' | ||
+ | Please note: Please __do not__ enter the IP address of your remote machine here, but really ' | ||
+ | |||
+ | **Important: | ||
+ | |||
+ | ====Vncviewer after Reboot==== | ||
+ | |||
+ | Tested with GDM3 (20.04 default display manager). | ||
+ | |||
+ | After reboot the desired display :1 is not loaded until you logged in on display :0. We need to connect to display :0 once after rebooting. With x11vnc you can easily open :0. A newly set-up system needs one UI login to establish general display settings. | ||
+ | |||
+ | < | ||
+ | # on the remote machine | ||
+ | sudo apt-get update | ||
+ | sudo apt-get install x11vnc | ||
+ | </ | ||
+ | |||
+ | Get onto the remote machine and look for the Xauthority file in /run/user/ | ||
+ | |||
+ | < | ||
+ | # on the remote machine | ||
+ | sudo find /run/user/ -name Xauthority | ||
+ | </ | ||
+ | |||
+ | This will yield at least two paths, one with a 4-digit named directory, and another with 3 digits. We need the path with 3-digits. Now from the client you can launch x11vnc similar to the x0vncserver. Specify the path to Xauthority and replace ' | ||
+ | |||
+ | < | ||
+ | # on your client machine | ||
+ | ssh USERNAME@REMOTE.SERVER.IP -t -t -L 5900: | ||
+ | "sudo x11vnc -display :0 -auth / | ||
</ | </ | ||
- | In the tigervnc-viewer, first open the options and set the compression to ' | + | Connect to x11vnc with vncviewer, it will show the login display :0. After login, close the connection |
- | Afterwards, you can enter ' | + | |
infrastructure/vnc.1639042731.txt.gz · Last modified: 2021/12/09 09:38 by pmania