Tightvnc viewer linux mint

Содержание
  1. Best VNC Viewer Clients For Linux
  2. Vinagre
  3. RealVNC or Xvnc4viewer
  4. TightVNC Viewer or xtightvncviewer
  5. SSVNC
  6. How To Install and Access TightVNC Remote Desktop In Linux?
  7. Install Ubuntu, Debian, Mint, Kali
  8. Install CentOS, Fedora, RHEL
  9. Start VNC Server
  10. xstartup Configuration File
  11. Set Desktop Environment For KDE
  12. Set Desktop Environment For GNOME
  13. Set Desktop Environment For XFCE
  14. Set Desktop Environment For LXDE
  15. Kill VNC Server or Session
  16. Start Server or Session
  17. Connect with VNC Client
  18. Remote GUI access to a Linux computer using Tightvnc with systemd
  19. TightVNC vs Real VNC
  20. Installing a start-up script using Systemd
  21. Choosing TightVNC
  22. Client server model
  23. Install the TightVNC server software
  24. Start server and configure a password
  25. Adding Tightvnc to systemd startup
  26. Installing Tightvnc viewer (VNC client) on a Linux computer
  27. Installing Tightvnc view on a Windows computer
  28. Securing TightVNC
  29. Starting your window manager
  30. Как подключиться к Linux из Windows
  31. Удалённый доступ к Linux с помощью VNC
  32. Шаг 1. Установка рабочей среды XFCE
  33. Шаг 2. Установка TightVNC
  34. Шаг 3. Настройка пароля
  35. Шаг 4. Настройка скрипта запуска
  36. Шаг 5. Запуск VNC сервера
  37. Шаг 6. Подключение из Windows
  38. Шаг 8. Настройка systemd
  39. Использование RDP для удалённого подключения
  40. Подключение к Linux из Windows по SSH
  41. Использование Putty для подключения к Linux
  42. Выводы

Best VNC Viewer Clients For Linux

Remote management of Linux servers or clients can be done in different ways. One way is using ssh . But ssh do not provide GUI directly or if we need the GUI application to stay open even we terminate the connection to the remote system. VNC is a defacto remote desktop protocol for Linux. In this tutorial, we will look at VNC Viewer or Clients for Linux operating system. For server-side VNC server installation look following tutorial.

Vinagre

Vinagre is a remote desktop viewer especially developed for GNOME Desktop. It can support different types of protocols with its plugin feature. Current plugins exit for VNC and SSH.

  • Supports VNC, SSH, RDP
  • Screen scaling
  • SSH Tunneling
  • Bookmarks for easy and fast access

Krdc is provided by KDE Desktop. It uses Qt library for GUI.

  • Supports VNC, RDP
  • Integration with Kwallet for password sharing
  • Screen scaling
  • Bookmarks to easy and fast access
  • History to list previous connections

RealVNC or Xvnc4viewer

RealVNC is very popular both Server and Client VNC. It has also cross-platform support where we can use it for Windows too. It is named as Xvnc4viewer in Linux distributions. It uses CLI for connection. After the connection is established the VNC console is started. RealVNC may have a license fee.

  • Less features than others
  • Screen scaling

TightVNC Viewer or xtightvncviewer

TightVNC is the most popular VNC Server and Client. It s opensource and free. It has a similar interface like RealVNC. We need to run xgithvncviewer from the command line.

  • Less features than others
  • Screen scaling

SSVNC

SSVNC describes itself as Enhanced TightVNC viewer. It is developed with Java and can run platforms like MacOS and Windows too. It has a builtin feature to use Stunnel.

  • Encrypted Connections
  • Stunnel Support
  • Ssh Tunnel Support

Источник

How To Install and Access TightVNC Remote Desktop In Linux?

TightVNC is a very handy remote desktop application which is based on VNC protocol. TightVNC is mostly used for Linux systems in order to manage a remote desktop environment with GUI. In this tutorial, we will look at how to install and configure properly to run desktop environments like KDE, GNOME, XFCE, etc. with TightVNC.

Install Ubuntu, Debian, Mint, Kali

We can use the following command to install deb based distributions.

Install CentOS, Fedora, RHEL

We can use the following command to install rpm based distributions.

Start VNC Server

Now we need to specify a desktop environment for our VNC session. Actually, we have not created a VNC session yet but we will create a new one to create default configuration files. We run the following command by providing a password for the VNC session.

We can see that during VNC server start a password is specified which will be asked to the VNC clients want to connect this VNC server. Then the question wheter we want to create a view-only password. View-only password can be used to only view VNC sessions but can not control it. New VNC server session is create with the number 1 which means the server port is 5901 which is also called as ubuntu:1 .

xstartup Configuration File

All VNC Server related configuration is held in a file named xstartup which is located in the user’s home directory .vnc folder. Let’s print the default configuration. In this case, the VNC configuration file is located /home/ismail/.vnc/xstartup .

Set Desktop Environment For KDE

In order to enable KDE desktop environment with a new VNC session, we need to add the following line to the xstartup file.

Set Desktop Environment For GNOME

In order to enable GNOME desktop environment with a new VNC session, we need to add the following line to the xstartup file.

Set Desktop Environment For XFCE

In order to enable GNOME desktop environment with a new VNC session, we need to add the following line to the xstartup file.

Set Desktop Environment For LXDE

In order to enable GNOME desktop environment with a new VNC session, we need to add the following line to the xstartup file.

Kill VNC Server or Session

As we have started a VNC server or session to create default configuration files. We need to kill it we can kill the VNC server with the -k option and the session ID. In this example, we will kill the session ID 1 .

Читайте также:  Где найти логи windows

Start Server or Session

Now we can start a new server with the command vncserver where the default configured desktop will be fired-up.

Connect with VNC Client

VNC servers start with port number 5900 and count one by one with the session ID. For example, if we have given session ID 3 the port number will be configured as 5903 . We can connect with a VNC client which is explained in the following tutorial in detail.

Источник

Remote GUI access to a Linux computer using Tightvnc with systemd

This is a guide to installing TightVNC on the Raspberry Pi. The latest version of Raspbian now includes the RealVNC which is an alternative remote desktop tool. If you would prefer to use RealVNC then it is easily enabled through the raspi-config tool, this guide will be useful for those wanting to understand about creating other applications to run on start-up through systemd.

The command line is a great way to manage a remote Linux computer if you don’t mind typing in commands, but sometimes you need to be able to view a GUI. Short of a very long cable one of the best ways of doing this is using the VNC protocol (Virtual Network Computing).

TightVNC vs Real VNC

The TightVNC server creates a different virtual window which is replicated on a different machine using the TightVNC client. This differs from RealVNC which normally usually echos the default screen.

When most people think of a remote desktop tool then they usually think of the way that RealVNC operates. In this case when you move the mouse, or launch an application it displays the same output on a physically attached screen (normally HDMI) and on a remote client over the network.

TightVNC is useful if you want to run something different to what is on the main screen. For example you could use it so that you can have a status display on the main screen (via HDMI) with a different display used for the configuration which is displayed on a laptop.

Another advantage of TightVNC is that it is FREE open source software. As such it has no restrictions on use and you can view and modify the source code. Real VNC is a commercial version of VNC and needs to be licensed. Real VNC is free to use for personal use on the Raspberry Pi, but does have restrictions if you want to do other things with it which may require a commercial license. This includes running the Raspbian Desktop image on a PC as that does not included the commercial software.

Installing a start-up script using Systemd

The following are instructions on how to configure this on the Raspberry Pi (Debian based distribution). It should be similar for any other Debian based distribution (eg. Ubuntu) which uses Systemd start-up files. Some other distributions use different software install tools and possibly different init setup tools.

If this is used in combination with the guide to running the Raspberry Pi headless with Debian Linux then it can be used to setup a Raspberry Pi for remote access without ever needing to connect it to a monitor.

Choosing TightVNC

There are several software projects that support VNC. I have chosen to use TightVNC because it is free open source software (GPL2), provides compression to allow it to work over a slow network (Internet) and is readily available in the software repositories.

Client server model

VNC follows the traditional client sever model. The server software runs on the host to be accessed, and client software runs on the local machine that wishes to control the host. The server and client do not have to be the same (eg. the client can be RealVNC when the server is TightVNC), but some features may only work when the same client and server are used.

Install the TightVNC server software

First refresh the software repository information using
sudo apt update
This is particularly important if you have just installed the operating system as the repository information may be incomplete.

Install the server software from the repositories:
sudo apt install tightvncserver

Start server and configure a password

The first time you run the server it will prompt you to set a password. This is the password that you use when connecting remotely.

There is no need to create a view only password, unless you have a specific need.

When the server starts it will tell you which virtual desktop has been setup. In this case:
New ‘X’ desktop is raspberrypi:1
says that it’s virtual desktop 1. You would connect to this using :1 at the end of the IP address in the client, this is the one we will setup to start automatically later.

You can run multiple instances. Each time you start tightvncserver it will use the next available desktop, but in most cases you will just need one.

Adding Tightvnc to systemd startup

To have Tightvnc startup automatically we need to create a new startup file, which needs to be stored in the /etc/systemd/system/ directory and end with the suffix «.service». I called this tightvncserver.service. This needs to be created as the root user so using sudo
sudo nano /etc/systemd/system/tightvncserver.service

You may need to change the user name on line 8. It is currently set to pi which is the default username on the Raspberry Pi Raspbian image. Set this to whatever username you want to login to TightVNC as. Do not put root as the user.

Читайте также:  Steam ��� ������ ������

Change the file so it is owned by root
sudo chown root:root /etc/systemd/system/tightvncserver.service

Make the file executable by running
sudo chmod 755 /etc/systemd/system/tightvncserver.service

It’s a good idea to test the script at this point rather than waiting until after a reboot. This is done using:
sudo systemctl start tightvncserver.service
Don’t worry if you get the following error message, which is because you’ve already started tightvnc
A VNC server is already running as :1

Enable startup at boot using
sudo systemctl enable tightvncserver.service

TightVNC will now start at startup. I’d recommend you reboot at this point to make sure it’s working but youc an just stop and start the service using the systemctl command instead.

Note that this is designed for running only one instance of TightVNC on the computer. If you want to be able to start and stop specific instances of TightVNC then you will need to tweak the startup script appropriately.

Installing Tightvnc viewer (VNC client) on a Linux computer

On a Linux computer you can install the viewer with
sudo apt install xtightvncviewer
or if that is not in the repositories try:
sudo apt-get install ssvnc
This will work with Debian / Ubuntu based distributions only, for other distributions use the normal package manager.

Note that ssvnc — which is the version I installed on my Kubuntu computer is based on tightvnc, but also has the ability to configure the ssh tunnelling (see later) through the GUI.

Login using
xtightvncviewer 192.168.1.6:1
(replace with your own IP address as appropriate)

Installing Tightvnc view on a Windows computer

To access from Windows or using the Java Client download from TightVNC.com

Securing TightVNC

TightVNC allows anyone that knows the password to login as the user that it’s running under. It also does this without encryption so anyone can snoop in on the session. Fortunately there is a secure solution, which is to tunnel the connection over an ssh (secure shell) login.

First step is to restrict Tightvnc to the local computer only. This is done by adding the option -localhost when starting the tightvncserver. To do this edit line 7 in the /etc/systemd/system/tightvncserver.service file to read:

Then restart the server.

To login using ssh — first login to the host computer using ssh
ssh pi@192.168.1.6 -L 5901:localhost:5901

The -L option creates the tunnel, from the current computer (default) port 5901 to the host computer (as localhost) port 5901. Port 5901 is the default port for display 1, 5902 for display 2 etc.

To connect using tightvnc now use the command
xtightvncviewer 127.0.0.1:1
Note that your previous terminal will now be logged into the Raspberry Pi so you will need to start a new terminal or tab to run the viewer.

If using Windows then the ssh tunnel can be created from within PuTTY

Then connect using the vnc client using 127.0.0.1:1.

You can now use the GUI to run applications on the Raspberry Pi without needing a monitor or keyboard. If you have port forwarding set on your router you can do this over the Internet.

Starting your window manager

The instructions above are sufficient for the Raspberry Pi running Raspbian (Debian). On other systems you may need to make a further configuration change to start your normal window manager / application launcher. If you get a blank screen when connecting edit the file

/.vnc/xstartup and replace the line /etc/X11/Xsession with one of the following as appropriate.

For instance with Ubuntu you would use the entry for gnome, for xubuntu you would use xfce and for kubuntu use kde. The Raspberry Pi uses lxde, but this is started automatically on the Raspberry Pi there is no need to add it to the xstartup file.

Источник

Как подключиться к Linux из Windows

В мире ИТ существует уже довольно широкий спектр операционных систем, начиная с серверных, заканчивая операционными системами для мобильных устройств. В обычных пользовательских компьютерах и в серверах довольно часто используются две ОС — Linux и Windows. Поэтому очень часто возникают ситуации, когда приходится подключаться по сети из одной операционной системы к другой для выполнения разнообразных операций.

В этой статье мы рассмотрим варианты подключения к Linux из Windows. Существуют бесплатные и условно бесплатные утилиты вроде AnyDesk или TeamViewer, но установка их довольно тривиальна и не нуждается в дополнительном пояснении. Утилиты подобного рода обладают рядом ограничений при бесплатном некоммерческом использовании, либо их функциональность не удовлетворяет тем или иным потребностям пользователя. Мы рассмотрим полностью бесплатные способы как подключится к Linux из Windows.

Удалённый доступ к Linux с помощью VNC

На сегодняшний день самое популярное удаленное подключение к Linux из Windows, с использованием привычный в Windows графического интерфейса, является VNC (Virtual Network Computing) — утилита, использующая протокол RFB (Remote FrameBuffer — удалённый кадровый буфер). Управление осуществляется путём передачи нажатий клавиш на клавиатуре и движений мыши с одного компьютера на другой и ретрансляции содержимого экрана через компьютерную сеть.

В качестве сервера VNC в данном примере будет использоваться TightVNC, установленный в Ubuntu 20.04. Для установки сервера VNC необходимо выполнить ряд действий:

Шаг 1. Установка рабочей среды XFCE

Xfce — одна из самых легковесных рабочих сред, используемых в Linux, она будет быстро работать даже при слабом и нестабильном сетевом подключении. Установите её с помощью команд:

sudo apt update

sudo apt install xfce4 xfce4-goodies

Читайте также:  Как создать файл значка для windows

Шаг 2. Установка TightVNC

Далее установите TightVNC:

sudo apt install tightvncserver

Шаг 3. Настройка пароля

Перед началом выполнения всех действий необходимо задать пароль пользователя VNC. Выполните команду:

Вам будет предложено создать новый пароль, а также пароль только для просмотра. Откажитесь от второй опции:

Завершите процесс vncserver:

vncserver -kill :1

Шаг 4. Настройка скрипта запуска

Отредактируйте скрипт, который выполняется после запуска VNC-сервера:

Он должен содержать такой текст:

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &

Сделайте файл исполняемым:

Шаг 5. Запуск VNC сервера

На этом этапе уже можно запустить VNC-сервер с помощью команды:

Шаг 6. Подключение из Windows

Для того, чтобы подключиться из Windows к вашему Linux-серверу, используйте TightVNC Viewer.

Укажите IP-адрес компьютера, к которому нужно подключиться, и номер порта в поле Remote Host. В данном примере — 192.168.56.102::5901:

После того, как будет введён пароль, вы должны увидеть рабочий стол Xfce:

Шаг 8. Настройка systemd

Для того, чтобы запуск вашего VNC-сервера добавить в автозагрузку надо использовать systemd. Создайте новый файл сервиса systemd:

sudo nano /etc/systemd/system/vncserver@.service

Его содержимое должно быть следующим:

[Unit]
Description=Systemd VNC server startup script for Ubuntu 20.04
After=syslog.target network.target
[Service]
Type=forking
User=ubuntu
ExecStartPre=-/usr/bin/vncserver -kill :%i &> /dev/null
ExecStart=/usr/bin/vncserver -depth 24 -geometry 800×600 :%i
PIDFile=/home/ubuntu/.vnc/%H:%i.pid
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target

Измените имя пользователя ubuntu и рабочего каталога ubuntu на нужные вам значения. Если у вас запущен VNC-сервер, остановите его:

vncserver -kill :1

Сообщите systemd о появлении нового сервиса:

sudo systemctl daemon-reload

Добавьте запуск вашего нового сервиса в список автозагрузки:

sudo systemctl enable vncserver@1.service

sudo systemctl start vncserver@1

Использование RDP для удалённого подключения

Помимо VNC, для управления Linux-сервером из Windows можно воспользоваться RDP (Remote Desktop Protocol). Для этого на компьютере с Ubuntu 20.04 установите утилиту xrdp:

sudo apt install xrdp

Для корректной работы сервиса необходимо добавить пользователя xrdp в группу ssl-cert:

sudo adduser xrdp ssl-cert

sudo apt-get install xfce4

Добавьте Xfce в сессии RDP в качестве рабочего стола по умолчанию:

Перезапустите сервис xrdp:

sudo systemctl restart xrdp.service

Процедура подключения из Windows к Linux-серверу по протоколу RDP почти ничем не отличается от подключения к удалённым Windows-серверам. Введите IP-адрес сервера, логин и пароль пользователя в Linux:

Если всё сделано правильно, вы увидите рабочий стол Xfce:

Подключение к Linux из Windows по SSH

Для подключения к компьютеру под управлением Linux по протоколу SSH из Windows можно воспользоваться PowerShell. Сначала становите OpenSSH Client, если ещё не установлен. Запустите на вашем компьютере PowerShell от имени администратора системы и выполните следующую команду:

Get-WindowsCapability -Online | ? Name -like ‘OpenSSH*’

Это необходимо для того, чтобы узнать текущую версию SSH-клиента. В данном примере доступна версия OpenSSH.Client-0.0.1.0. Установите OpenSSH.Client с помощью команды:

Add-WindowsCapability -Online -Name OpenSSH.Client

Для того, чтобы подключиться к устройству, на котором запущен SSH-сервер, необходимо ввести имя пользователя и IP-адрес. Команда для подключения по SSH используя PowerShell выглядит так:

Здесь ubuntu — имя пользователя на удалённом компьютере, а 192.168.56.1 — IP-адрес Linux-сервера, на котором запущен демон SSH.

При первом подключении необходимо подтвердить использование специального персонального ключа для шифрованного соединения по SSH-протоколу (введите слово Yes), затем введите пароль пользователя (в данном случае для пользователя ubuntu):

Как видите, соединение прошло успешно. Теперь можно выполнять все команды так же, как если бы вы их выполняли используя стандартный Linux SSH-клиент:

Для завершения терминальной сессии на удалённом компьютере введите команду exit. Теперь вы знаете как выполняется подключение к Linux из Windows по SSH.

Использование Putty для подключения к Linux

Пожалуй, одним из самых популярных способов подключения к Linux из Windows является кроссплатформенная утилита Putty — небольшая по размерам, но очень часто незаменима для подключения по таким протоколам как SSH, Telnet, rlogin и даже с помощью последовательных портов.

Для обычного подключения к Linux-серверу по протоколу SSH достаточно в поле Host Name (or IPaddress) указать его IP-адрес и нажать кнопку Open (в данном примере Linux-сервер имеет IP-адрес: 192.168.56.102):

При первом подключении Putty предупредит, что используется специальный ключ безопасности и его нужно добавить в доверенные хосты. Нажмите кнопку Да:

Далее нужно будет ввести логин и пароль. Если всё сделано правильно, запустится удалённая сессия терминала Linux:

Мало кто знает, что Putty позволяет запустить почти любое приложение, установленное на компьютере с Linux, по сети в Windows. Для этого на компьютере с Windows нужно установить собственный X-сервер. В данном примере воспользуемся Xming.

Скачайте Xming с официального сайта. Установка довольно тривиальная, поэтому не будем на ней останавливаться. Ничего не меняйте в процессе установки. Просто нажимайте кнопку Next до тех пор, пока программа не установится и не запустится:

Когда установка Xming завершится, откройте Putty и в настройках сессии для вашего подключения в разделе SSH -> X11 включите флажок напротив опции Enable X11 forwarding, а также, в строке Отображение дисплея X впишите значение localhost:0, после чего откройте сессию подключения с помощью кнопки Open:

В открывшемся терминале Putty введите консольное название программы, обладающей графическим интерфейсом. В данном примере введено название графического редактора drawing:

(Знак & позволит запустить программу в фоновом режиме, в этом случае в окне Putty можно будет выполнять и другие команды):

Как видите, Linux-приложение drawing успешно запустилось по сети на X-сервере, установленном в Windows. С ним можно работать так же, как и с локальным приложением.

Выводы

Сегодня не существует слишком уж больших проблем для подключения к Linux из Windows. Способов существует довольно много. Каждый из них обладает своими достоинствами и недостатками, например, скорость работы VNC, да и других тоже, существенно зависит от скорости сетевого соединения. Существуют также программные средства, позволяющие подключаться к Linux-серверам используя мессенджеры или браузеры.

Источник

Оцените статью