Difference between revisions of "VNC"
m |
|||
Line 1: | Line 1: | ||
VNC gives users a remote desktop Graphical User Interface. Our VNC server requires a [[VNC viewer]] application of your choice. | VNC gives users a remote desktop Graphical User Interface. Our VNC server requires a [[VNC viewer]] application of your choice. | ||
− | + | == Connection Mechanism == | |
+ | |||
+ | == Step 0: (First time only) == | ||
+ | Connect via SSH and ensure you have setup a VNC password: `vncpasswd`. This should create the hidden folder `~/.vnc` if it didn't already exist. Copy `/home/utils/vncstuff/xstartup` to `~/.vnc` to get a working configuration for a desktop environment(xfce). This step may already have been done for you by an admin, in which case your vnc password equals your user name. | ||
+ | |||
+ | == Step 1: Start a remote vncserver instance == | ||
+ | A user must first start a running vnserver process and connect to it: `vncserver` will start an instance with default settings. You can see your running instances with `vncserver -list`. | ||
+ | |||
+ | A more specific example: `vncserver -name <sessionname> :<N>` where <N> is an integer. E.g. `vncserver -name bobsvnc :23` will create a session at display number 23, which means they have to connect to port 5923. The port formula is 5900+N. Ports occupied by others are not available, so if 23 was taken in the previous example it would have tried 24, etc. | ||
+ | |||
+ | == Step 2: Establish an SSH tunnel == | ||
+ | SSH port forwarding is the canonical solution in case the firewalls prevent direct connection to the vncserver:port. See [[SSH/SFTP|shell access]] for details. The current firewalls '''do not allow direct access''' on the VNC ports, so this step is necessary. | ||
+ | |||
+ | == Step 3: Connect with your VNC viewer == | ||
+ | * Open the viewer and connect to localhost:<port>, where <port> depends on your tunnel configuration. E.g. You setup a vncserver on 5908, then with a tunnel mapping port 5900 to remote:5908, your VNC viewer would connect to localhost:5900. You'll be prompted for your vnc password to continue. | ||
{{Note| To minimize bandwidth and cpu usage, do not use too many sessions, kill redundant sessions with `vncserver -kill`, and don't use uncompressed high quality video settings|warn}} | {{Note| To minimize bandwidth and cpu usage, do not use too many sessions, kill redundant sessions with `vncserver -kill`, and don't use uncompressed high quality video settings|warn}} | ||
− | + | ||
− | + | {{Note| In case the remote desktop reports errors upon first (successful) login, this seems to be a bug related to xfce and/or anaconda. Try deactivating conda default environment or modifying your PATH variable.}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | {{Note| In case the remote desktop reports errors upon first (successful) login |
Revision as of 08:12, 1 June 2020
VNC gives users a remote desktop Graphical User Interface. Our VNC server requires a VNC viewer application of your choice.
Contents
Connection Mechanism
Step 0: (First time only)
Connect via SSH and ensure you have setup a VNC password: vncpasswd
. This should create the hidden folder ~/.vnc
if it didn't already exist. Copy /home/utils/vncstuff/xstartup
to ~/.vnc
to get a working configuration for a desktop environment(xfce). This step may already have been done for you by an admin, in which case your vnc password equals your user name.
Step 1: Start a remote vncserver instance
A user must first start a running vnserver process and connect to it: vncserver
will start an instance with default settings. You can see your running instances with vncserver -list
.
A more specific example: vncserver -name <sessionname> :<N>
where <N> is an integer. E.g. vncserver -name bobsvnc :23
will create a session at display number 23, which means they have to connect to port 5923. The port formula is 5900+N. Ports occupied by others are not available, so if 23 was taken in the previous example it would have tried 24, etc.
Step 2: Establish an SSH tunnel
SSH port forwarding is the canonical solution in case the firewalls prevent direct connection to the vncserver:port. See shell access for details. The current firewalls do not allow direct access on the VNC ports, so this step is necessary.
Step 3: Connect with your VNC viewer
- Open the viewer and connect to localhost:<port>, where <port> depends on your tunnel configuration. E.g. You setup a vncserver on 5908, then with a tunnel mapping port 5900 to remote:5908, your VNC viewer would connect to localhost:5900. You'll be prompted for your vnc password to continue.
vncserver -kill
, and don't use uncompressed high quality video settings