[Translated] tech/20150331 How to set up remote desktop on Linux VPS using x2go.md

This commit is contained in:
ictlyh 2015-06-25 23:02:55 +08:00
parent b0f326a416
commit df748618ca
2 changed files with 138 additions and 138 deletions

View File

@ -1,138 +0,0 @@
ictlyh translating
How to set up remote desktop on Linux VPS using x2go
================================================================================
As everything is moved to the cloud, virtualized remote desktop becomes increasingly popular in the industry as a way to enhance employee's productivity. Especially for those who need to roam constantly across multiple locations and devices, remote desktop allows them to stay connected seamlessly to their work environment. Remote desktop is attractive for employers as well, achieving increased agility and flexibility in work environments, lower IT cost due to hardware consolidation, desktop security hardening, and so on.
In the world of Linux, of course there is no shortage of choices for settings up remote desktop environment, with many protocols (e.g., RDP, RFB, NX) and server/client implementations (e.g., [TigerVNC][1], RealVNC, FreeNX, x2go, X11vnc, TeamViewer) available.
Standing out from the pack is [X2Go][2], an open-source (GPLv2) implementation of NX-based remote desktop server and client. In this tutorial, I am going to demonstrate **how to set up remote desktop environment for [Linux VPS][3] using X2Go**.
### What is X2Go? ###
The history of X2Go goes back to NoMachine's NX technology. The NX remote desktop protocol was designed to deal with low bandwidth and high latency network connections by leveraging aggressive compression and caching. Later, NX was turned into closed-source while NX libraries were made GPL-ed. This has led to open-source implementation of several NX-based remote desktop solutions, and one of them is X2Go.
What benefits does X2Go bring to the table, compared to other solutions such as VNC? X2Go inherits all the advanced features of NX technology, so naturally it works well over slow network connections. Besides, X2Go boasts of an excellent track record of ensuring security with its built-in SSH-based encryption. No longer need to set up an SSH tunnel [manually][4]. X2Go comes with audio support out of box, which means that music playback at the remote desktop is delivered (via PulseAudio) over network, and fed into local speakers. On usability front, an application that you run on remote desktop can be seamlessly rendered as a separate window on your local desktop, giving you an illusion that the application is actually running on the local desktop. As you can see, these are some of [its powerful features][5] lacking in VNC based solutions.
### X2GO's Desktop Environment Compatibility ###
As with other remote desktop servers, there are [known compatibility issues][6] for X2Go server. Desktop environments like KDE3/4, Xfce, MATE and LXDE are the most friendly to X2Go server. However, your mileage may vary with other desktop managers. For example, the later versions of GNOME 3, KDE5, Unity are known to be not compatible with X2Go. If the desktop manager of your remote host is compatible with X2Go, you can follow the rest of the tutorial.
### Install X2Go Server on Linux ###
X2Go consists of remote desktop server and client components. Let's start with X2Go server installation. I assume that you already have an X2Go-compatible desktop manager up and running on a remote host, where we will be installing X2Go server.
Note that X2Go server component does not have a separate service that needs to be started upon boot. You just need to make sure that SSH service is up and running.
#### Ubuntu or Linux Mint: ####
Configure X2Go PPA repository. X2Go PPA is available for Ubuntu 14.04 and higher.
$ sudo add-apt-repository ppa:x2go/stable
$ sudo apt-get update
$ sudo apt-get install x2goserver x2goserver-xsession
#### Debian (Wheezy): ####
$ sudo apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E
$ sudo sh -c "echo deb http://packages.x2go.org/debian wheezy main > /etc/apt/sources.list.d/x2go.list"
$ sudo sh -c "echo deb-src http://packages.x2go.org/debian wheezy main >> /etc/apt/sources.list.d/x2go.list"
$ sudo apt-get update
$ sudo apt-get install x2goserver x2goserver-xsession
#### Fedora: ####
$ sudo yum install x2goserver x2goserver-xsession
#### CentOS/RHEL: ####
Enable [EPEL respository][7] first, and then run:
$ sudo yum install x2goserver x2goserver-xsession
### Install X2Go Client on Linux ###
On a local host where you will be connecting to remote desktop, install X2GO client as follows.
#### Ubuntu or Linux Mint: ####
Configure X2Go PPA repository. X2Go PPA is available for Ubuntu 14.04 and higher.
$ sudo add-apt-repository ppa:x2go/stable
$ sudo apt-get update
$ sudo apt-get install x2goclient
Debian (Wheezy):
$ sudo apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E
$ sudo sh -c "echo deb http://packages.x2go.org/debian wheezy main > /etc/apt/sources.list.d/x2go.list"
$ sudo sh -c "echo deb-src http://packages.x2go.org/debian wheezy main >> /etc/apt/sources.list.d/x2go.list"
$ sudo apt-get update
$ sudo apt-get install x2goclient
#### Fedora: ####
$ sudo yum install x2goclient
CentOS/RHEL:
Enable EPEL respository first, and then run:
$ sudo yum install x2goclient
### Connect to Remote Desktop with X2Go Client ###
Now it's time to connect to your remote desktop. On the local host, simply run the following command or use desktop launcher to start X2Go client.
$ x2goclient
Enter the remote host's IP address and SSH user name. Also, specify session type (i.e., desktop manager of a remote host).
![](https://farm9.staticflickr.com/8730/16365755693_75f3d544e9_b.jpg)
If you want, you can customize other things (by pressing other tabs), like connection speed, compression, screen resolution, and so on.
![](https://farm9.staticflickr.com/8699/16984498482_665b975eca_b.jpg)
![](https://farm9.staticflickr.com/8694/16985838755_1b7df1eb78_b.jpg)
When you initiate a remote desktop connection, you will be asked to log in. Type your SSH login and password.
![](https://farm9.staticflickr.com/8754/16984498432_1c8068b817_b.jpg)
Upon successful login, you will see the remote desktop screen.
![](https://farm9.staticflickr.com/8752/16798126858_1ab083ba80_c.jpg)
If you want to test X2Go's seamless window feature, choose "Single application" as session type, and specify the path to an executable on the remote host. In this example, I choose Dolphin file manager on a remote KDE host.
![](https://farm8.staticflickr.com/7584/16798393920_128c3af9c5_b.jpg)
Once you are successfully connected, you will see a remote application window open on your local desktop, not the entire remote desktop screen.
![](https://farm9.staticflickr.com/8742/16365755713_7b90cf65f0_c.jpg)
### Conclusion ###
In this tutorial, I demonstrated how to set up X2Go remote desktop on [Linux VPS][8] instance. As you can see, the whole setup process is pretty much painless (if you are using a right desktop environment). While there are some desktop-specific quirkiness, X2Go is a solid remote desktop solution which is secure, feature-rich, fast, and free.
What feature is the most appealing to you in X2Go? Please share your thought.
--------------------------------------------------------------------------------
via: http://xmodulo.com/x2go-remote-desktop-linux.html
作者:[Dan Nanni][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/nanni
[1]:http://ask.xmodulo.com/centos-remote-desktop-vps.html
[2]:http://wiki.x2go.org/
[3]:http://xmodulo.com/go/digitalocean
[4]:http://xmodulo.com/how-to-set-up-vnc-over-ssh.html
[5]:http://wiki.x2go.org/doku.php/doc:newtox2go
[6]:http://wiki.x2go.org/doku.php/doc:de-compat
[7]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html
[8]:http://xmodulo.com/go/digitalocean

View File

@ -0,0 +1,138 @@
如何在 Linux VPS 上使用 x2go 设置远程桌面
================================================================================
由于一切都迁移到了云上,作为提高职员生产力的一种方式,虚拟远程桌面在工业中越来越流行。尤其对于那些需要跨多个地方和设备不停漫游的人,远程桌面可以让他们和工作环境保持无缝连接。远程桌面对于雇主同样有吸引力,可以在工作环境中提高敏捷性和灵活性,由于硬件整合、桌面安全加固等原因降低 IT 花费。
在 Linux 世界中,有许多可用的协议(例如 RDP、RFB、NX) 和 服务器/客户端实现(例如 [TigerVNC][1]、RealVNC、FreeNX、x2go、X11vnc、TeamViewer),当然不缺乏设置远程桌面的选择。
当中出色的一个是 [X2Go][2],它是一个基于 NX(译者注:通过计算机网络显示远程桌面环境的一种技术,可参考 [Wiki][9]) 的远程桌面服务器和客户端的开源(GPLv2)实现。在这个教程中,我会介绍 **如何为 Linux VPS 使用 X2Go 设置远程桌面环境**
### X2Go 是什么? ###
X2Go 的历史要追溯回 NoMachine 的 NX 技术。NX 远程桌面协议的设计目的是通过利用主动压缩和缓存解决低带宽和高延迟的网络连接问题。后来NX 转为闭源,但 NX 库还是采用 GPL 协议。这导致了多种基于 NX 的远程桌面解决方案开源实现X2Go 就是其中之一。
和其它解决方案,例如 VNC 相比X2Go 带来哪些好处呢? X2Go 继承了 NX 技术的所有高级功能,很自然能在慢速网络连接上良好工作。另外,由于它内置的基于 SSH 的加密技术X2Go 保持了确保安全的良好业绩记录。不再需要[手动设置 SSH 隧道][4] 。X2Go 开箱支持音频,意味着远程桌面的音乐播放通过网络传送,并进入本地扬声器。在易用性方面,远程桌面上运行的应用程序可以在你的本地桌面中用一个独立窗口无缝呈现,给你造成一种应用程序实际上在你本地桌面运行的错觉。正如你看到的,这些都是一些基于 VNC 的解决方案所缺少的[强大功能][5]。
### X2GO 的桌面环境兼容性 ###
和其它远程桌面服务器一样X2Go 服务器也有一些[已知的兼容性问题][6]。像 KDE3/4、Xfce、MATE 和 LXDE 是对 X2Go 服务器最友好的桌面环境。但是,用其它桌面管理器效果可能有所不同。例如,已知 GNOME 3 之后的版本、KDE 5、Unity 和 X2Go 并不兼容。如果你的远程主机的桌面管理器和 X2Go 兼容,你可以继续以下的教程。
### 在 Linux 上安装 X2Go 服务器 ###
X2Go 由远程桌面服务器和客户端组件组成。让我们首先安装 X2Go 服务器。我假设你已经有一个和 X2Go 兼容的桌面管理器并且在远程主机上运行,我们会安装 X2Go 服务器到该远程主机。
注意系统启动后 X2Go 服务器组件没有需要单独启动的服务。你只需要保证开启了 SSH 服务并在正常运行。
#### Ubuntu 或 Linux Mint ####
配置 X2Go PPA 库。对于 Ubuntu 14.04 以及更高版本,有可用的 X2Go PPA。
$ sudo add-apt-repository ppa:x2go/stable
$ sudo apt-get update
$ sudo apt-get install x2goserver x2goserver-xsession
#### Debian (Wheezy) ####
$ sudo apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E
$ sudo sh -c "echo deb http://packages.x2go.org/debian wheezy main > /etc/apt/sources.list.d/x2go.list"
$ sudo sh -c "echo deb-src http://packages.x2go.org/debian wheezy main >> /etc/apt/sources.list.d/x2go.list"
$ sudo apt-get update
$ sudo apt-get install x2goserver x2goserver-xsession
#### Fedora ####
$ sudo yum install x2goserver x2goserver-xsession
#### CentOS/RHEL ####
首先启用 [EPEL 库][7] 然后运行:
$ sudo yum install x2goserver x2goserver-xsession
### 在 Linux 上安装 X2Go 客户端 ###
在将会连接到远程桌面的本地主机上,安装以下命令安装 X2Go 客户端。
#### Ubuntu 或 Linux Mint ####
配置 X2Go PPA 库。对于 Ubuntu 14.04 以及更高版本,有可用的 X2Go PPA。
$ sudo add-apt-repository ppa:x2go/stable
$ sudo apt-get update
$ sudo apt-get install x2goclient
Debian (Wheezy)
$ sudo apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E
$ sudo sh -c "echo deb http://packages.x2go.org/debian wheezy main > /etc/apt/sources.list.d/x2go.list"
$ sudo sh -c "echo deb-src http://packages.x2go.org/debian wheezy main >> /etc/apt/sources.list.d/x2go.list"
$ sudo apt-get update
$ sudo apt-get install x2goclient
#### Fedora ####
$ sudo yum install x2goclient
CentOS/RHEL
首先启用 EPEL 库,然后运行:
$ sudo yum install x2goclient
### 用 X2Go 客户端连接到远程桌面 ###
终于可以连接到远程桌面了。在本地主机上,只需运行以下命令或者使用桌面启动器启动 X2Go 客户端。
$ x2goclient
输入远程主机的 IP 地址和 SSH 用户名称。同时,指定会话类型(例如,远程主机的桌面管理器)。
![](https://farm9.staticflickr.com/8730/16365755693_75f3d544e9_b.jpg)
如果需要的话,你可以自定义其它东西(通过点击其它标签),例如连接速度、压缩、屏幕分辨率等等。
![](https://farm9.staticflickr.com/8699/16984498482_665b975eca_b.jpg)
![](https://farm9.staticflickr.com/8694/16985838755_1b7df1eb78_b.jpg)
当你初始化一个远程桌面连接的时候,会要求你登录。输入你的 SSH 登录名和密码。
![](https://farm9.staticflickr.com/8754/16984498432_1c8068b817_b.jpg)
成功登陆后,你会看到远程桌面屏幕。
![](https://farm9.staticflickr.com/8752/16798126858_1ab083ba80_c.jpg)
如果你想测试 X2Go 的无缝窗口功能,选择 "Single application" 会话类型,然后指定远处主机上可执行文件的路径。在该例子中,我选择远程 KDE 主机上的 Dolphin 文件管理器。
![](https://farm8.staticflickr.com/7584/16798393920_128c3af9c5_b.jpg)
你成功连接后,你会在本地桌面上看到一个远程应用窗口,而不是完整的远程桌面屏幕。
![](https://farm9.staticflickr.com/8742/16365755713_7b90cf65f0_c.jpg)
### 总结 ###
在这篇教程中,我介绍了如何在 [Linux VPS][8] 实例上设置 X2Go 远程桌面。正如你所看到的,整个设置过程都非常简单(如果你使用一个合适的桌面环境的话)。尽管对于特定桌面仍有问题X2Go 是一个安全、功能丰富、快速并且免费的远程桌面解决方案。
X2Go 的什么功能最吸引你?欢迎分享你的观点。
--------------------------------------------------------------------------------
via: http://xmodulo.com/x2go-remote-desktop-linux.html
作者:[Dan Nanni][a]
译者:[ictlyh](https://github.com/ictlyh)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://xmodulo.com/author/nanni
[1]:http://ask.xmodulo.com/centos-remote-desktop-vps.html
[2]:http://wiki.x2go.org/
[3]:http://xmodulo.com/go/digitalocean
[4]:http://xmodulo.com/how-to-set-up-vnc-over-ssh.html
[5]:http://wiki.x2go.org/doku.php/doc:newtox2go
[6]:http://wiki.x2go.org/doku.php/doc:de-compat
[7]:https://linux.cn/article-2324-1.html
[8]:http://xmodulo.com/go/digitalocean
[9]:https://en.wikipedia.org/wiki/NX_technology