How to install VNC server in Ubuntu

Virtual Network Computing (VNC) is a system for providing remote access to the desktop of the computer. Through the network transmitted a picture of the screen are mouse clicks and keyboard keys. In Ubuntu the system is installed via the official repository, then the procedure is superficial and detailed settings.

Install VNC server in Ubuntu

Because in recent versions of Ubuntu default to the Gnome desktop environment, installing and configuring VNC we will, starting from this environment. The whole process, for convenience, divide into incremental steps, so you should have no difficulties with understanding the adjustment of interest tool.

Step 1: Install prerequisites

As mentioned earlier, we will use the official repository. There is the most recent and stable version of the VNC server. All actions are performed via a console because you should start with running it.

  • Go to menu and open the “Terminal”. There is a hot key Ctrl + Alt + Twhich allows to do it faster.
  • Install updates for all system libraries using sudo apt-get update.
  • Enter the password to grant root access.
  • At the end you should write the command sudo apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal vnc4server and press Enter.
  • Confirm adding new files to the system.
  • Wait for it to complete the installation and add the next line of input.
  • Now in Ubuntu contains all the necessary components, it remains only to check their work and do the setup before running remote desktop.

    Step 2: First start a VNC server

    During the first run of the tool is to configure a few basic settings and then starts the desktop. You should make sure that everything is functioning normally, and it can be done like this:

  • In the console type the command vncserverthat starts the server.
  • You will be prompted to set a password for their desktops. Here it is necessary to enter any combination of characters, but at least five. When set the characters will not be displayed.
  • Confirm the password by reentering it.
  • You will be notified that you created a startup script and a new virtual desktop started its work.
  • Step 3: configure the VNC server for full operation

    If in the previous step, we only made sure of the efficiency of the installed components, now we need to prepare them for the implementation of the remote desktop connection on another computer.

  • First complete running desktop with the command vncserver -kill :1.
  • Next is to run the configuration file via the built-in text editor. To do this, type nano ~/.vnc/xstartup.
  • Make sure the file has all lines listed below.

    #!/bin/sh
    # Uncomment the following two lines for normal desktop:
    # unset SESSION_MANAGER
    # exec /etc/X11/xinit/xinitrc

    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic &
    x-terminal-emulator-geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    x-window-manager &

    gnome-panel &
    gnome-settings-daemon &
    metacity &
    nautilus &

  • If you made any changes, save the settings by pressing Ctrl + O.
  • Exit the file by pressing Ctrl + X.
  • In addition, you should also forward the ports to provide remote access. Will help to carry out this task the command iptables -A INPUT -p tcp --dport 5901 -j ACCEPT.
  • After its introduction you can save the settings by typing iptables-save.
  • Step 4: check the operation of the VNC server

    The last step is to check installed and configured VNC server in action. To use this we will be one of the applications to manage remote desktops. Its installation and start we invite you to read on.

  • First you will need to run the server by typing vncserver.
  • Make sure that the process was correct.
  • Start adding the Remmina application from the user repository. This should print in the console sudo apt-add-repository ppa:remmina-ppa-team/remmina-next.
  • Click on Enter to add new packages to the system.
  • When the installation is complete you need to update system libraries sudo apt update.
  • Now it remains only to collect the latest version using the command sudo apt install remmina remmina-plugin-rdp remmina-plugin-secret.
  • Confirm installation of new files.
  • Start Remmina via the menu item by clicking on the appropriate icon.
  • Here it remains only to choose the technology VNC, to prescribe the necessary IP address and connect to the desktop.
  • Of course, for connections so a user needs to know the external IP address of the second computer. To determine this, there are special online services or additional utilities added to Ubuntu. Detailed information on this topic you will find in the official documentation from the developers of the OS.

    Now you are aware of all major actions you must perform to install and configure VNC server under Ubuntu on the Gnome shell.

    Source: lumpics.ru

    (Visited 45 times, 1 visits today)