VNC: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 25: | Line 25: | ||
<nowiki>systemctl start tigervncserver@:1.service | <nowiki>systemctl start tigervncserver@:1.service | ||
systemctl enable tigervncserver@:1.service</ | systemctl enable tigervncserver@:1.service</nowiki> | ||
* If necessary open the port in firewall (likely 5901) | * If necessary open the port in firewall on remote machine (likely 5901) | ||
== Configure tunnelling == | == Configure tunnelling == | ||
Line 36: | Line 36: | ||
* Enter the password | * Enter the password | ||
* Now connect to localhost:5901 using e.g. Remmina | * Now connect to localhost:5901 (or 127.0.0.1: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> | * 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> |
Latest 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
- If necessary open the port in firewall on remote machine (likely 5901)
Configure tunnelling
- On the machine using to access VNC running on server, do:
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 (or 127.0.0.1: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