NOTEeNOTE: The X2Go Client is an easier alternative to VNC over SSH
...
- Run the command vncpasswd to create a VNC session password. It is separate than your login password, but can be set the same
- The vncpasswd command can also change/reset an existing password
- The vncpasswd command will create a ~/.vnc directory if it does not exist
- If needed, edit the file ~/.vnc/xstartup
Expand title xstartup example #!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
gnome-session &
Start vncserver
Expand title If vncserver uses systemd (example using tigervnc) - Add user to /etc/tigervnc/vncserver.users
- Start vncserver for user port: sudo systemctl start vncserver@:x
- (optional) Set the vncserver to start on system (re)boot: sudo systemctl enable vncserver@:x
- Add user to /etc/tigervnc/vncserver.users
Expand title If vncserver does not use systemd - Check if any VNC ports are in use using the command ‘vncserver -list’ . Any active VNC ports will be listed like :1 or :2. By default VNC runs on port in the range 590x
- Each VNC session runs on a unique port so to start on port 5902 use the command:
- vncserver :2 -localhost no
- NOTE: if VNC session is already running on port :2, try a higher port number like :7 or :8
- The VNC server can be stopped with the command:
- vncserver -kill :2
- The VNC session resolution can be set using the -geometry option. Stop vncserver before starting a new session.
- vncserver -kill :2
- vncserver :2 -localhost -geometry 1280x1024
- vncserver -kill :2
...