VNC: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
* Install VNC server on the system that you want to access <code>yum -y install tigervnc-server tigervnc</code> | * Install VNC server on the system that you want to access <code>yum -y install tigervnc-server tigervnc</code> | ||
* | * If the server doesn't have a GUI install one e.g. <code>tasksel</code> | ||
* Get list of available desktop sessions: <code>ls /usr/share/xessions</code> | |||
* As the user you'll be logging in as (not root), edit the config: | |||
* | |||
* | |||
== | <nowiki>vim ~/.vnc/config | ||
session=gnome-xorg # obtained from the list of available sessions | |||
geometry=1920x1080 | |||
localhost | |||
alwaysshared</nowiki> | |||
* As the user (not root), start vnc and configure a password and optional read-only password <code>vncserver</code> | |||
* Then kill the running vncserver process <code>vncserver -kill session:1</code> | |||
* As root: <code>vim /etc/tigervnc/vncserver.users</code> and add the user e.g. <code>:1=david</code> | |||
* Start and enable tigvervnc service | |||
<nowiki>systemctl start tigervncserver@:1.service | |||
systemctl enable tigervncserver@:1.service</code> | |||
* If necessary open the port in firewall (likely 5901) | |||
== Configure tunnelling == | |||
* On the machine using to access VNC running on server, do: | |||
<nowiki>ssh -L 5901:127.0.0.1:5901 -N -f -l <username> <IP or FQDN of remote VNC server></nowiki> | |||
* Enter the password | |||
* Now connect to localhost:5901 using e.g. Remmina | |||
* Note: does not work if you're already logged in on the remote machine as that user. If you need to log in interactively, ssh to the remote server and stop the tigervnc service <code>systemctl stop tigervncserver@:1.service</code> | |||
Revision as of 01:08, 29 April 2024
VNC remote desktop viewer
Instructions for RHEL etc
- .
Instructions for Ubuntu/Debian
- Install VNC server on the system that you want to access
yum -y install tigervnc-server tigervnc
- If the server doesn't have a GUI install one e.g.
tasksel
- Get list of available desktop sessions:
ls /usr/share/xessions
- As the user you'll be logging in as (not root), edit the config:
vim ~/.vnc/config session=gnome-xorg # obtained from the list of available sessions geometry=1920x1080 localhost alwaysshared
- As the user (not root), start vnc and configure a password and optional read-only password
vncserver
- Then kill the running vncserver process
vncserver -kill session:1
- As root:
vim /etc/tigervnc/vncserver.users
and add the user e.g.:1=david
- Start and enable tigvervnc service
systemctl start tigervncserver@:1.service systemctl enable tigervncserver@:1.service</code> * If necessary open the port in firewall (likely 5901) == Configure tunnelling == * On the machine using to access VNC running on server, do: <nowiki>ssh -L 5901:127.0.0.1:5901 -N -f -l <username> <IP or FQDN of remote VNC server>
- Enter the password
- Now connect to localhost:5901 using e.g. Remmina
- Note: does not work if you're already logged in on the remote machine as that user. If you need to log in interactively, ssh to the remote server and stop the tigervnc service
systemctl stop tigervncserver@:1.service