Share desktop with linux

How to share files between a Linux and Windows computer

The easiest and most reliable way to share files between a Linux and Windows computer on the same local area network is to use the Samba file sharing protocol. All modern versions of Windows come with Samba installed, and Samba is installed by default on most distributions of Linux.

Create a shared folder on Windows

First, create a shared folder on your Windows machine.

  1. Open the Control Panel.
  2. Go to Network and Sharing Options.
  3. Go to Change Advanced Sharing Settings.
  4. Select Turn on Network Discovery and Turn on File and Print Sharing.

Now, create a new folder to share or choose an existing folder that you’d like to share.

  1. Right-click the folder and select Properties.
  2. Go to the Sharing tab.
  3. Above the Share button is the network name of the share you are creating. It should look like \\YOURCOMPUTERNAME\Users\YourUserName\ShareFolderName. Make a note of this network name to use later on your Linux machine.
  4. Click Share.

Access a Windows shared folder from Linux, using Konqueror

Many Linux distributions use the KDE desktop environment and the Konqueror file manager/browser. If this is what you are using, you can follow these steps to access your Windows shared folder:

  1. Click the K menu icon.
  2. Select Internet ->Konqueror.
  3. In the Konqueror window that opens, click the Network Folders link, or type remote:/ in the address bar and press Enter .
  4. Click the Samba Shares icon.
  5. Click the icon of your Windows Home workgroup.
  6. Click the Workgroup icon.
  7. Click the icon for your computer.
  8. When prompted, enter the username and password for the Windows account that created the share.
  9. Click OK.

Access a Windows shared folder from Linux, using Nautilus

Many Linux distributions, especially those that use the GNOME desktop environment, use the Nautilus file manager. If this is what you’re using, you can follow these steps to access your Windows shared folder:

  1. Open Nautilus.
  2. From the File menu, select Connect to Server.
  3. In the Service type drop-down box, select Windows share.
  4. In the Server field, enter the name of your computer.
  5. Click Connect.

Alternatively, in the Nautilus address bar, you can type smb://ComputerName/ShareName and press Enter . For instance, when you created your Windows Share, if the share name was listed as:

Type smb://YOURCOMPUTERNAME/Users/YourUserName/ShareFolderName and press Enter . Note the smb: at the beginning; in Linux, use forward slashes instead of backslashes.

Access a Windows shared folder from Linux, using the command line

You can also access your Windows share from the Linux command line using the smbclient program.

  1. Open a terminal.
  2. Type smbclient at the command prompt.
  3. If you receive a «Usage:» message, this means smbclient is installed, and you can skip to the next step. If the command is not found, however, you need to install smbclient. Follow these steps to install it.

Источник

Ubuntu Documentation

You can let other people view and control your desktop from another computer with a desktop viewing application. Configure Screen Sharing to allow others to access your desktop and set the security preferences.

You must have the Vino package installed for Screen Sharing to be visible.

Open the Activities overview and start typing Settings .

Click on Settings .

Click on Sharing in the sidebar to open the panel.

If the Sharing switch at the top-right of the window is set to off, switch it to on.

If the text below Computer Name allows you to edit it, you can change the name your computer displays on the network.

Select Screen Sharing .

To let others view your desktop, switch the Screen Sharing switch to on. This means that other people will be able to attempt to connect to your computer and view what’s on your screen.

To let others interact with your desktop, ensure that Allow connections to control the screen is checked. This may allow the other person to move your mouse, run applications, and browse files on your computer, depending on the security settings which you are currently using.

Security

It is important that you consider the full extent of what each security option means before changing it.

If you want to be able to choose whether to allow someone to access your desktop, enable New connections must ask for access . If you disable this option, you will not be asked whether you want to allow someone to connect to your computer.

This option is enabled by default.

To require other people to use a password when connecting to your desktop, enable Require a Password . If you do not use this option, anyone can attempt to view your desktop.

This option is disabled by default, but you should enable it and set a secure password.

Источник

How To Enable Desktop Sharing In Ubuntu and Linux Mint

Desktop sharing refers to technologies that enable remote access and remote collaboration on a computer desktop via a graphical terminal emulator. Desktop sharing allows two or more Internet-enabled computer users to work on the same files from different locations.

In this article, we will show you how to enable desktop sharing in Ubuntu and Linux Mint, with a few vital security features.

Enabling Desktop Sharing in Ubuntu and Linux Mint

1. In the Ubuntu Dash or Linux Mint Menu, search for “desktop sharing” as shown in the following screenshot, once you get it, launch it.

Search for Desktop Sharing in Ubuntu

2. Once you launch Desktop sharing, there are three categories of desktop sharing settings: sharing, security and notification settings.

Under sharing, check the option “Allow others users to view your desktop” to enable desktop sharing. Optionally, you can also permit other users to remotely control your desktops by checking the option “Allow others users to control your desktop”.

Desktop Sharing Preferences

3. Next in security section, you can choose to manually confirm each remote connection by checking the option “You must confirm each access to this computer”.

Again, another useful security feature is creating a certain shared password using the option “Require user to enter this password”, that remote users must know and enter each time they want to access your desktop.

4. Concerning notifications, you can keep an eye on remote connections by choosing to show the notification area icon each time there is a remote connection to your desktops by selecting “Only when someone is connected”.

Configure Desktop Sharing Set

When you have set all the desktop sharing options, click Close. Now you have successfully permitted desktop sharing on your Ubuntu or Linux Mint desktop.

Testing Desktop Sharing in Ubuntu Remotely

You can test to ensure that it’s working using a remote connection application. In this example, I will show you how some of the options we set above work.

5. I will connect to my Ubuntu PC using VNC (Virtual Network Computing) protocol via remmina remote connection application.

Remmina Desktop Sharing Tool

6. After clicking on Ubuntu PC item, I get the interface below to configure my connection settings.

Remmina Desktop Sharing Preferences

7. After performing all the settings, I will click Connect. Then provide the SSH password for the username and click OK.

Enter SSH User Password

I have got this black screen after clicking OK because, on the remote machine, the connection has not been confirmed yet.

Black Screen Before Confirmation

8. Now on the remote machine, I have to accept the remote access request by clicking on “Allow” as shown in the next screenshot.

Allow Remote Desktop Sharing

9. After accepting the request, I have successfully connected, remotely to my Ubuntu desktop machine.

Remote Ubuntu Desktop

That’s it! In this article, we described how to enable desktop sharing in Ubuntu and Linux Mint. Use the comment section below to write back to us.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

Источник

Методы удаленного доступа к Linux GUI

В службу технической поддержки RUVDS регулярно обращаются по поводу GUI и удаленного доступа к нему на виртуальных серверах с Linux, несмотря на то что в интернете достаточно много материалов освещающих эту проблему. Поэтому, для наших пользователей мы решили собрать всё по этой теме в одну статью.

Введение

На всякий случай возможно стоит упомянуть, что SSH — основной способ предоставления доступа к линуксовым виртуалкам на RUVDS. Большая часть действий описываемых в этой статье будет осуществляться именно таким образом.

Для подключения необходимо найти SSH-клиент для вашей операционной системы.

  1. OpenSSH; если Вы пользуетесь Linux, например Ubuntu, скорее всего всё уже установлено, до нас, так что можно смело писать в терминале: ssh root@[IP].
  2. PuTTY есть и для Linux, в том числе в официальных репозиториях Debian и Ubuntu.

MAC OS:

Установка GUI

Итак, перейдем к установке GUI. Сначала нужно поставить графическую подсистему:
Для Debian/Ubuntu:

Далее следует установка Desktop Environment (DE). Их существует великое множество. Мы рекомендуем ставить на сервер более легковесные среды, а еще лучше, не ставить вовсе. Первые две DE достаточно компактные, функциональные и «привычные».

1. Xfce
Для Debian/Ubuntu:

Можно поставить дополнительно:

Добавление русской раскладки:

Сочетание клавиш можно менять на свое усмотрение, например:

Чтобы эта команда запускалась каждый раз при запуске LXDE, нужно добавить в конец файла с помощью вашего любимого vi строку: @setxkbmap -option grp:switch,grp:ctrl_shift_toggle,grp_led:scroll us,ru. Или вот так…

Следующие две DE являются чрезвычайно легкими. Если уж GUI нужен на сервере, вероятно, стоит использовать именно их.

3. FluxBox
Для Debian/Ubuntu:

4. Openbox
Для Debian/Ubuntu:

Далее следуют наиболее популярные на десктопах графические оболочки.

5. Gnome
Для Ubuntu/Debian:

Замечание: с настройкой VNC-сервера под Gnome что-то пошло не так… Сервера из репозиториев tightvncserver и vnc4server так и не согласились сотрудничать, поэтому пришлось собрать пару deb-пакетов руками. Если у Вас не получится настроить сервер, то мы можем порекомендовать скачать собранный нами архив с tigervnc-server’ом и поставить его. Для этого:

7. Cinnamon
Для Debian/Ubuntu:

Если Вы хотите получать доступ к GUI через «Аварийный режим», то необходимо сделать следующее:

Мало того, необходимо обеспечить запуск графической оболочки при старте системы. Для этого можно установить какой-нибудь экранный менеджер (Display Manager, DM), например:

Или в случае с CentOS:

Если необходимости в доступе из личного кабинета нет, то следует выполнить:

Заметка: Ubuntu предлагает своим пользователям несколько метапакетов для более удобной установки нужной DE:

Далее, есть много способов получить удаленный доступ к GUI.

Удаленный доступ

На виртуальном сервере, в зависимости от OS нужно произвести следующие действия.

Далее, если вы используете Windows, подключаемся через встроенный RDP-клиент, Remote Desktop Connection (Подключение к удаленному рабочему столу).

Стандартный порт 3389. Для Linux есть масса клиентов которые можно установить из репозиториев: freerdp и remmina, gnome-rdp, vinagre и т.п.

Также можно пробросить RDP-шный трафик через SSH-туннель. Для этого нужно поправить конфигурационный файл xrdp:

В секцию [globals] нужно добавить строку: address=127.0.0.1

Проверить, что всё правильно, можно так:

Затем если вы используете cygwin или mingw, linux или mac os:

Запустите PuTTY. В древовидном меню слева Connection → SSH → Tunnels. Далее добавляем новый Forwarded Port (Source port: 3389, Destination: localhost:3389). Нажимаем Add.

Далее следуете в секцию Session. Вводите IP вашего сервера в поле Host Name (or IP address). Нажимаете кнопку Open, вводите пароль для подключения по SSH.

Далее для Windows:

  1. Можно использовать вышеупомянутый клиент: remmina
  2. Если в браузере хотите: novnc — HTML5 VNC client
  3. И ещё куча всяких разных: directvnc, gnome-rdp, krdc, xtightvncviewer, vinagre, xvnc4viewer

Для MAC OS:

OS X предоставляет для этого встроенное приложение Screen Sharing. Можно также использовать Safari

Сервер: На Вашей виртуальной машине установите VNC сервер:

Если на Вашей системе работает файрвол необходимо открыть соответствующие порты. Пример для CentOS

При возникновении проблем с отображением иконок и шрифтов при использовании xfce4 по Ubuntu/Debian:

Если вы хотите, чтобы VNC-сервер стартовал автоматически, создайте файл:

Со следующим содержимым:

Теперь можно подключиться, например, через UltraVNC. Для этого нужно запустить UltraVNC Viewer, в поле VNC Server записать [IP]::5901 (по-умолчанию: 5901, 5902 и т.п. для первого дисплея, второго и т.д. соответственно) и нажать на кнопку подключиться.

Также можно пустить vnc-шный трафик через ssh-туннель. Для этого отредактируйте:

Затем если вы используете cygwin или mingw, linux или mac os:

Если PuTTY:
Запустите PuTTY. В древовидном меню слева Connection → SSH → Tunnels. Далее добавляем новый Forwarded Port (Source port: 5901, Destination: localhost:5901). Нажимаем Add.

Далее следуете в секцию Session. Вводите IP вашего сервера в поле Host Name (or IP address). Нажимаете кнопку Open, вводите пароль для подключения по SSH.

Затем открываете UltraVNC Viewer и в поле VNC Server вводите: localhost::5901 после чего подключаетесь.

Также можете попробовать другие VNC-сервера:

x11vnc — фактически VNC-сервер (как vnc4server или tightvnc), но позволяет получать доступ к уже существующей X-сессии. Т.е. если Вы настроили графическую оболочку таким образом, что она запускается при старте системы, то можно использовать следующий вариант:

После подключения по VNC (на порт 5900) Вы должны увидеть тоже что и в «Аварийном режиме».

Для старта x11vnc при запуске OS необходимо проделать следующее:

Теперь немного поинтереснее. Одна замечательная компания NoMachine разработала отличный протокол NX на замену VNC. Клиенты для подключения по этому протоколу бесплатны, а официальное серверное ПО от NoMachine стоит много денег. В свое время, эта же компания поддерживала проект FreeNX работы на котором со временем затихли; текущая версия 0.7.2 от 2008-08-22. Но, к счастью, нашлись люди создавшие форк и назвавшие его x2go. К сожалению, x2go не совместим ни с NX от NoMachine, ни с freeNX. Так что клиент берем тут.

Установка сервера на Debian (источник):

Для примера поставим эту DE:

Далее следуем инструкциям с оффициального сайта:

Вывод следующей команды должен показать, что x2go готов к работе:

А теперь важный момент, подключиться без этого фикса не получится! Нужно найти в файле .profile строку «mesg n» и заменить её на «tty -s && mesg n».

Следующая команда выведет путь до исполняемого файла startfluxbox, понадобится при настройке клиента:

Установка сервера на Ubuntu:

А теперь важный момент, подключиться без этого фикса не получится! Нужно найти в файле .profile строку «mesg n || true» и заменить её на «tty -s && mesg n».

Установка сервера на CentOS:

Клиент для линукс ставится из вышеприведенных репозиториев следующей командой:

Для Windows — скачиваем, ставим, запускаем. По той же ссылке, приведенной выше, есть клиент для OS X.

В настройках сессии указываем: в поле Host — IP вашего сервера, в поле Login — root, порт оставляем как есть, session type — тот GUI который ставили.

Как вы можете видеть, есть возможность аутентификации по ключу. В общем много всякого. Посмотрите сами. И звук можно через PulseAudio выводить.

После нажатия Ok вы увидите вот такие вот очаровательные штучки, на которые нужно нажать для получения запроса на ввод пароля и подключения к выбранной сессии:

Замечание: обратите внимание, что в списке нет Вашего любимого FluxBox’а поэтому путь к нему приходится прописывать руками.

Важной возможностью x2go является возможность запуска любого графического приложения вообще без установки DE. Для этого в настройках сессии нужно в секции session type нужно выбрать пункт single application и выбрать выполняемое приложение или ввести путь к программе которую следует запустить.

В этом случае установка ПО на сервер будет выглядеть следующим образом. В случае с Ubuntu:

А теперь важный момент, подключиться без этого фикса не получится! Нужно найти в файле .profile строку «mesg n || true» и заменить её на «tty -s && mesg n».

И настроив сессию как показано ниже, можно будет запустить браузер на удаленном сервере, а на вашей машине откроется окно его отображающее:

Или так; тогда просто откроется окно терминала:

Ниже вы можете видеть скриншот окна статуса текущей сессии. Оранжевыми цифрами отмечены кнопки:

  1. «Suspend session» — после нажатия на эту кнопку соединение будет разорвано, но сессия останется и будет ожидать повторного подключения. Все запущенные вами на сервере приложения продолжат свою работу;
  2. «Terminate session» — после нажатия подключение к серверу будет разорвано, а запущенные вами на сервере приложения будут завершены.

TeamViewer

Последний способ удаленного доступа к рабочему столу.

Установка на Ubuntu:

Установка на Debian:

Установка на CentOS:

Также необходимо принять лицензионное соглашение TeamViewer’а, это можно сделать с помощью «Аварийного режима», либо добавить следующие строки в конец файла /opt/teamviewer/config/global.conf:

Следующая команда покажет состояние демона TeamViewer’а и необходимый для подключения девятизначный TeamViewer ID:

После запуска клиента скачанного тут, нужно ввести TeamViewer ID в поле Partner UD и нажать на кнопку «Connect to partner». Далее TeamViewer запросит пароль: [PASSWD].

Источник

Читайте также:  Активация windows 10 хоум
Оцените статью