Installation (VNC)

If the VNC forwarding mode provides a smoother experience of MindStudio Insight, you are advised to start MindStudio Insight in VNC forwarding mode.

MindStudio Insight cannot be started in VNC mode in EulerOS 2.12.

Installing Dependencies

  1. Run the following commands to install the library file on which the MindStudio Insight running depends.
    • For Ubuntu and other OSs that use APT as the package management software
      sudo apt install -y libwebkit2gtk-4.0-dev
    • For CentOS, EulerOS, openEuler, and other OSs that use Yum or DNF as the package management software
      1. Run the following command to query the webkit2gtk library file:
        sudo yum search webkit2gtk

        The command output is as follows:

        1
        2
        3
        4
        5
        6
        7
        8
        9
        = Name and Summary match: webkit2gtk =====================================================================================
        webkit2gtk3-devel.aarch64 : Development files for webkit2gtk3
        webkit2gtk3-help.noarch : Documentation files for webkit2gtk3
        webkit2gtk3-jsc.aarch64 : JavaScript engine from webkit2gtk3
        webkit2gtk3-jsc-devel.aarch64 : Development files for JavaScript engine from webkit2gtk3
        ========================================================================================== Name match: webkit2gtk ===========================================================================================
        webkit2gtk3.aarch64 : GTK+ Web content engine library
        ========================================================================================= Summary match: webkit2gtk =========================================================================================
        libproxy-webkitgtk4.aarch64 : plugin for webkit2gtk3
        
      2. Run the following command to install the webkit2gtk library file based on the command output:
        sudo yum install -y ${Dependency_name}

        Dependency_name indicates the dependency file name, which can be determined based on the command output. For example, if webkit2gtk3-devel is displayed in the command output, the dependency file name is webkit2gtk3-devel. If webkit2gtk3-devel is not displayed in the command output, webkit2gtk3 needs to be found, and the dependency file name is webkit2gtk3.

      EulerOS 2.12 is developed based on openEuler 22.03 LTS SP1. You need to configure the openEuler 22.03 LTS SP1 source and then run the installation command. For details about how to configure the openEuler source, see Configuring the openEuler Software Source.

  2. Run the following command as the root user to install the desktop dependencies forwarded by MindStudio Insight through VNC:
    • For Ubuntu and other OSs that use APT as the package management software
      apt-get install -y xfce4 xfce4-goodies
    • For CentOS, EulerOS, openEuler, and other OSs that use Yum or DNF as the package management software
      1. Run the following command to check whether xfce exists:
        yum search xfce

        If the command output contains xfce information, run the following command to install xfce:

        yum install -y xfce4*

        If "No matches found" is displayed, go to 2.b.

      2. Run the following command to check whether gnome exists:
        yum search gnome

        If the command output contains gnome information, run the following command to install gnome:

        yum install -y gnome*
  3. Run the following command to install the VNC server:
    • For Ubuntu and other OSs that use APT as the package management software
      apt-get install -y tightvncserver
    • For CentOS, EulerOS, openEuler, and other OSs that use Yum or DNF as the package management software
      yum install -y tigervnc-server

Setting the VNC Server

  1. Run the following command to set the password for the first VNC connection:
    vncserver
  2. If the following information is displayed, enter the password as prompted:
    1
    2
    3
    You will require a password to access your desktops.
    Password: Enter the password.
    Verify: Enter the password again.
    
  3. After the password is entered, the following information is displayed:
    Would you like to enter a view-only password (y/n)?

    Enter n as prompted. If the following information is displayed, the startup script and default configuration are created. The value of x in the first line indicates the display sequence number.

    1
    2
    3
    4
    5
    New 'localhost.localdomain:x' desktop is localhost.localdomain:x
    Creating default startup script /home/xxx/.vnc/xstartup
    Creating default config /home/xxx/.vnc/config
    Starting applications specified in /home/xxx/.vnc/xstartup
    Log file is /home/xxx/.vnc/localhost.localdomain:3.log
    
  4. Run the following command to stop the enabled VNC server:
    vncserver -kill :x

    The value of x here is the same as that in the first line of the command output in 3.

  5. Run the vi ~/.vnc/xstartup command to open the xstartup startup script and add a line of text to the end of the script. For details about the text to be added, see Table 1.
    Table 1 Text

    Dependencies Installed

    Text

    xfce

    startxfce4 &

    gnome

    gnome-session &

  6. Run the :wq! command to save the script and exit.

Starting the VNC Server

Run the following command to start the VNC server:
vncserver -localhost -geometry 1920x1080
  • localhost: starts the VNC service on the local host. This parameter must be used together with Port Forwarding. If the network environment is secure, you may not use localhost and do not need to use Port Forwarding. You can directly perform the steps in Connecting the VNC Server Locally (which is not recommended).
  • geometry 1920 × 1080: sets the VNC desktop resolution to 1920 × 1080 pixels. You can also set the resolution based on the resolution of the user's monitor.

Port Forwarding

Forward the Linux local host service to the Windows local port through the SSH channel.

  1. Start the remote login tool and choose Tools > MobaSSHTunnel (port forwarding). MobaXterm is used as an example.
  2. Click New SSH Tunnel to create SSH configuration.
    Figure 1 Creating SSH configuration
  3. Select Local port forwarding and set the parameters according to Table 2.
    Figure 2 Local port forwarding
    Table 2 Configuring the local port forwarding page

    Parameter

    Description

    Example

    Remote server

    Address of the Linux server.

    127.0.0.1

    Remote port

    Port of the Linux server. The value is 5900 plus the value of x (display sequence number) in the VNC server.

    5901

    SSH server

    IP address or URL used for SSH connection.

    192.168.25.38

    SSH login

    Username/password pair for SSH login.

    -

    SSH port

    Port used for SSH login, which is 22 in most cases.

    22

    Forwarded port

    Port forwarded to the local Windows. The value can be the same as that of the remote port.

    5901

  4. Click Save. The SSH configuration is complete.
  5. In the MobaSSHTunnel dialog box, select the configured SSH tunnel and click to enable port forwarding.

    If the SSH login parameter in the SSH configuration is set to a username, a dialog box is displayed when the SSH tunnel is started for the first time. Enter the password of the user to start the SSH tunnel.

Connecting the VNC Server Locally

  1. On the MobaXterm home page, click Session. The Session settings page is displayed.
  2. Click VNC and set Remote hostname or IP address and Port based on the actual situation.
    • If port forwarding is used, Remote hostname or IP address is 127.0.0.1 and Port is Forwarded port.
    • If port forwarding is not used, Remote hostname or IP address is the actual IP address of the remote Linux OS, and Port is 5900 plus the value of x (display sequence number) in the VNC server settings.
    Figure 3 Configuring VNC
  3. After the configuration is complete, click OK. In the dialog box that is displayed, enter the VNC password to forward the desktop to the local PC for subsequent operations.
    Figure 4 Desktop