Remote Access with VNC: Difference between revisions

m Spell check
Line 70: Line 70:
Credentials to use for remote authentication. Leave empty for no authentication.
Credentials to use for remote authentication. Leave empty for no authentication.


'''Color depth, Quality'''<br>
'''Colour depth, Quality'''<br>
Select the best options according to you connection speed and quality.
Select the best options according to you connection speed and quality.


Line 83: Line 83:
</div>
</div>


Select the ''SSH'' tab for advanced SSH tunneling and authentication options.
Select the ''SSH'' tab for advanced SSH tunnelling and authentication options.


Confirm with ''Save''. Your new profile will be listed in the main window.
Confirm with ''Save''. Your new profile will be listed in the main window.
Line 100: Line 100:


===Remote Sessions Window===
===Remote Sessions Window===
Remote sessions are opened in tabs of a separate window. Each tab hosts one session. The toolbar on the left of the window helps you manage the windows/sessions, such as toggle fullscreen mode, resize the window to match the display size of the session, send specific keystrokes to the session, take screenshots of the session, or set the image quality.
Remote sessions are opened in tabs of a separate window. Each tab hosts one session. The toolbar on the left of the window helps you manage the windows/sessions, such as toggle full-screen mode, resize the window to match the display size of the session, send specific keystrokes to the session, take screenshots of the session, or set the image quality.


==Editing, Copying and Deleting Saved Sessions==
==Editing, Copying and Deleting Saved Sessions==
Line 109: Line 109:
To ''Delete'' a saved remote session, right-click its name in the Remmina's main window and select ''Delete''. Confirm with ''Yes'' in the next dialog.
To ''Delete'' a saved remote session, right-click its name in the Remmina's main window and select ''Delete''. Confirm with ''Yes'' in the next dialog.


==Running Remote Sessons from the Command Line==
==Running Remote Sessions from the Command Line==
If you need to open a remote session from the command line or from a batch file without first opening the main application window, use the following syntax:
If you need to open a remote session from the command line or from a batch file without first opening the main application window, use the following syntax:
   tux > remmina -c profie_name.remmina
   tux > remmina -c profie_name.remmina
Line 120: Line 120:


'''Procedure 1: Enabling One-time VNC Sessions'''
'''Procedure 1: Enabling One-time VNC Sessions'''
# Start ''Yast > Network Services > Remote Administration (VNC)''.
# Start ''YaST > Network Services > Remote Administration (VNC)''.
# Check ''Allow Remote Administration Without Session Management''.
# Check ''Allow Remote Administration Without Session Management''.
# Activate ''Enable access using a web browser'' if you plan to access the VNC session in a Web browser window.
# Activate ''Enable access using a web browser'' if you plan to access the VNC session in a Web browser window.
Line 136: Line 136:


==Available Configurations==
==Available Configurations==
The default configuration on openSUSE Leap serves sessions with a resolution of 1024x768 pixels at a color depth of 16-bit. The sessions are available on ports <code>5901</code> for "regular" VNC viewers (equivalent to VNC display <code>1</code>) and on port <code>5801</code> for Web browsers.
The default configuration on openSUSE Leap serves sessions with a resolution of 1024x768 pixels at a colour depth of 16-bit. The sessions are available on ports <code>5901</code> for "regular" VNC viewers (equivalent to VNC display <code>1</code>) and on port <code>5801</code> for Web browsers.


Other configurations can be made available on different ports, see Section 4.3.3, "Configuring One-time VNC Sessions".
Other configurations can be made available on different ports, see Section 4.3.3, "Configuring One-time VNC Sessions".
Line 154: Line 154:
To activate the VNC server socket at boot time, run the following command:
To activate the VNC server socket at boot time, run the following command:
   sudo systemctl enable xvnc.socket
   sudo systemctl enable xvnc.socket
To start the socket immediatley, run:
To start the socket immediately, run:
   sudo systemctl start xvnc.socket
   sudo systemctl start xvnc.socket
The '''<code>Xvnc</code>''' server can be configured via the <code>server_args</code> option. For a list of options, see '''<code>Xvnc --help</code>'''.
The '''<code>Xvnc</code>''' server can be configured via the <code>server_args</code> option. For a list of options, see '''<code>Xvnc --help</code>'''.
Line 171: Line 171:
</div>
</div>


=Persistant VNC Sessions=
=Persistent VNC Sessions=
A persistent session can be accessed from multiple clients simultaneously. This is ideal for demonstration purposes where one client has full access and all other clients have view-only access. Another use case are trainings where the trainer might need access to the trainee's desktop.
A persistent session can be accessed from multiple clients simultaneously. This is ideal for demonstration purposes where one client has full access and all other clients have view-only access. Another use case are trainings where the trainer might need access to the trainee's desktop.


<div style="padding-bottom:5px;padding-top:5px;">
<div style="padding-bottom:5px;padding-top:5px;">
<div style="background:#B6D5B2;border:1px solid #439239;padding-left:5px;padding-right:5px;">
<div style="background:#B6D5B2;border:1px solid #439239;padding-left:5px;padding-right:5px;">
'''Tip: Connecting to a Persistant VNC Session'''
'''Tip: Connecting to a Persistent VNC Session'''
To connect to a persistent VNC session, a VNC viewer must be installed. Refer to Section 4.1, "The '''<code>vncviewer</code>''' Client" for more details.
To connect to a persistent VNC session, a VNC viewer must be installed. Refer to Section 4.1, "The '''<code>vncviewer</code>''' Client" for more details.
</div>
</div>
</div>
</div>


There are two types of persistant VNC sessions:
There are two types of persistent VNC sessions:
* VNC Session Initiated using <code>vncserver</code>
* VNC Session Initiated using <code>vncserver</code>
* VNC Session Initiated using <code>vncmanager</code>
* VNC Session Initiated using <code>vncmanager</code>
Line 191: Line 191:
A session can have multiple client connections of both kinds at once.
A session can have multiple client connections of both kinds at once.


'''Procedure 2: Stating a Persistant VNC Session using <code>vncserver</code>'''
'''Procedure 2: Stating a Persistent VNC Session using <code>vncserver</code>'''
# Open a shell and make sure you are logged in as the user that should own the VNC session.
# Open a shell and make sure you are logged in as the user that should own the VNC session.
# If the network interface serving the VNC sessions is protected by a firewall, you need to manually open the port used by your session in the firewall. If starting multiple sessions you may alternatively open a range of ports. See Book ''"Security Guide", Chapter 15 "Masquerading and Firewalls"'' for details on how to configure the firewall.<br><br>'''<code>vncserver</code>''' uses the ports <code>5901</code> for display <code>:1</code>, <code>5902</code> for display <code>:2</code>, and so on. For persistent sessions, the VNC display and the X display usually have the same number.
# If the network interface serving the VNC sessions is protected by a firewall, you need to manually open the port used by your session in the firewall. If starting multiple sessions you may alternatively open a range of ports. See Book ''"Security Guide", Chapter 15 "Masquerading and Firewalls"'' for details on how to configure the firewall.<br><br>'''<code>vncserver</code>''' uses the ports <code>5901</code> for display <code>:1</code>, <code>5902</code> for display <code>:2</code>, and so on. For persistent sessions, the VNC display and the X display usually have the same number.
# To start a session with a resolution of 1024x768 pixel and with a colour depth of 16-bit, enter the following command:
# To start a session with a resolution of 1024x768 pixel and with a colour depth of 16-bit, enter the following command:
   vncserver -gemometry 1024x768 -depth 16
   vncserver -geometry 1024x768 -depth 16
The '''<code>vncserver</code>''' command picks an unused display number when none is given and prints its choice. See '''<code>man 1 vncserver</code>''' for more options.
The '''<code>vncserver</code>''' command picks an unused display number when none is given and prints its choice. See '''<code>man 1 vncserver</code>''' for more options.


Line 227: Line 227:
</div>
</div>


==VNC Session Initated using '''<code>vncmanager</code>'''==
==VNC Session Initiated Using '''<code>vncmanager</code>'''==


'''Procedure 3: Enabling Persistant VNC Sessions'''
'''Procedure 3: Enabling Persistent VNC Sessions'''
# Start ''YaST > Network Services > Remote Administration (VNC)''.
# Start ''YaST > Network Services > Remote Administration (VNC)''.
# Activate ''Allow Remote Administration With Session Management''.
# Activate ''Allow Remote Administration With Session Management''.
Line 245: Line 245:
</div>
</div>


===Configuring Persistant VNC Sessions===
===Configuring Persistent VNC Sessions===
After you enable the VNC session management as described in Procedure 4.3, "Enabling Persistent VNC Sessions", you can normally connect to the remote session with your favorite VNC viewer, such as '''<code>vncviewer</code>''' or Remmina. You will be presented with login screen. After you log in, the 'VNC' icon will appear in the system tray of your desktop environment. Click the icon to open the ''VNC Session'' window. If it does not appear or if your desktop environment does not support icons in the system tray, run '''<code>vncmanager-controller</code>''' manually.
After you enable the VNC session management as described in Procedure 4.3, "Enabling Persistent VNC Sessions", you can normally connect to the remote session with your favourite VNC viewer, such as '''<code>vncviewer</code>''' or Remmina. You will be presented with login screen. After you log in, the 'VNC' icon will appear in the system tray of your desktop environment. Click the icon to open the ''VNC Session'' window. If it does not appear or if your desktop environment does not support icons in the system tray, run '''<code>vncmanager-controller</code>''' manually.


There are several settings which influence the VNC session behaviour:
There are several settings which influence the VNC session behaviour:
Line 273: Line 273:
Confirm with ''OK''.
Confirm with ''OK''.


===Joining Persistant VNC Sessions===
===Joining Persistent VNC Sessions===
After you set up a persistent VNC session as described in Section 4.4.2.1, "Configuring Persistent VNC Sessions", you can join it with your VNC viewer. After the your VNC client connects to the server, you will be prompted to choose whether you want to create a new session, or join the existing one:
After you set up a persistent VNC session as described in Section 4.4.2.1, "Configuring Persistent VNC Sessions", you can join it with your VNC viewer. After the your VNC client connects to the server, you will be prompted to choose whether you want to create a new session, or join the existing one:


Line 279: Line 279:


=Encrypted VNC Communication=
=Encrypted VNC Communication=
If the VNC server is set up properly, all communication between the VNC server and the client is encrypted. The authentication happens at the beginning of the session, the actual data transfer only begins afterward.
If the VNC server is set up properly, all communication between the VNC server and the client is encrypted. The authentication happens at the beginning of the session, the actual data transfer only begins afterwards.


Whether for a one-time or a persistent VNC session, security options are configured via the <code>-securitytypes</code> parameter of the '''<code>/usr/bin/Xvnc</code>''' command located on the <code>server_args</code> line. The <code>-securitytypes</code> parameter selects both authentication method and encryption. It has the following options:
Whether for a one-time or a persistent VNC session, security options are configured via the <code>-securitytypes</code> parameter of the '''<code>/usr/bin/Xvnc</code>''' command located on the <code>server_args</code> line. The <code>-securitytypes</code> parameter selects both authentication method and encryption. It has the following options: