当前位置: 首页 > 工具软件 > X2Go > 使用案例 >

linux下使用X2Go进行远程连接

凌远
2023-12-01

http://www.unixmen.com/x2go-an-open-source-remote-desktop-solution-for-linux/

About X2Go
X2Go is an Open Source remote desktop application for GNU/Linux that uses NX technology protocol.
The main difference between X2Go and other remote desktop applications is it provides secure standalone remote desktop sessions via SSH.
So, each session connected using X2Go is strongly encrypted and safe. X2Go allows you mainly to connect to Linux systems from Linux, Windows, or Mac OS systems.
Also, many clients can simultaneously connect and use single X2Go server. It comes with two components, namely X2Go server and X2Go client.
X2Go server is a system that is being accessed from a client system. And, the X2Go is a system which can be used to access the X2Go server.
This Client will be able to connect to X2Go server(s) and start, stop, resume and terminate (running) desktop sessions.
X2Go Client stores different server connections and may automatically request authentication data from LDAP directories.
Furthermore it can be used as fullscreen loginscreen (replacement for loginmanager like xdm).

X2Go server package can only be installed in Linux systems, whereas X2Go client package can be installed on many OS, including Linux, Windows, and Mac OS X.

Features
Graphical Remote Desktop that works well over both low bandwidth and high bandwidth connections;
The ability to disconnect and reconnect to a session, even from another client;
Support for sound;
Support for as many simultaneous users as the computer’s resources will support;
Traffic is securely tunneled over SSH;
File and printer Sharing from client to server;
Easily select from multiple desktop environments (e.g., MATE, GNOME, KDE);
Remote support possible via Desktop Sharing;
The ability to access single applications by specifying the name of the desired executable in the client configuration or selecting one of the pre-defined common applications;
Server-side list of available applications is displayed on the client, and you can run any number of them from within the same session like Citrix MetaFrame/Presentation Server/XenApp;
The ability to access a Windows computer that supports RDP via X2Go-proxied RDP;
X2Go client can also serve as a graphical front-end to a client-side rdesktop/xfreerdp installation;
A Thin Client Environment is available;
A Session Broker that supports centralized configuration and load balancing;
And many.
Install X2Go Server
X2Go server and client installation is much easier compared to other remote desktop applications.
X2Go development team has made separate repositories for different operating systems.

The following instructions describes how to install X2Go server on various distributions. As I mentioned before, the X2Go can only be installed in Linux based systems.

1)On Ubuntu 14.04:

Run the following commands to add X2Go repository and install it in Ubuntu 14.04 or higher versions.

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:x2go/stable
sudo apt-get update
sudo apt-get install x2goserver x2goserver-xsession

2)On Ubuntu 12.04:

For Ubuntu 12.04 and previous versions, you can add X2Go repository and install it as shown below.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:x2go/stable
sudo apt-get update
sudo apt-get install x2goserver x2goserver-xsession

3)On Debian 7:

First add X2Go repository. To do that, edit,

sudo vi /etc/apt/sources.list.d/x2go.list
Add the following lines:

X2Go Repository (release builds)

deb http://packages.x2go.org/debian wheezy main

X2Go Repository (sources of release builds)

deb-src http://packages.x2go.org/debian wheezy main

X2Go Repository (nightly builds)

deb http://packages.x2go.org/debian wheezy heuler

X2Go Repository (sources of nightly builds)

deb-src http://packages.x2go.org/debian wheezy heuler

Add X2Go GPG key:

sudo apt-key adv –recv-keys –keyserver keys.gnupg.net E1F958385BFE2B6E
Then, update software repository list and install X2Go server using the following commands:

sudo apt-get install x2goserver x2goserver-xsession

4)On Fedora 19 and later:

X2Go server and client packages are available in the default repositories of Fedora 19 and later versions. So, install X2Go server using command:

sudo yum install x2goserver

5)On RHEL 7/Scientific Linux 7/CentOS 7 systems:

Add EPEL repository first.

yum install epel-release
Then, install X2Go server package using command:

yum install fuse-sshfs
yum install x2goserver x2goserver-xsession

6)On RHEL 6/Scientific Linux 6/CentOS 6 systems:

Similarly, add EPEL repository in CentOS/RHEL/Scientific Linux 6.x systems:

yum install epel-release
Then, install X2Go server package using command:

yum install fuse-sshfs
yum install x2goserver x2goserver-xsession

7)On openSUSE systems:

Add X2Go repository as shown below. Replace the version number with your own.

zypper ar http://packages.x2go.org/opensuse//extras x2go-extras
zypper ar http://packages.x2go.org/opensuse//main x2go-release
Then, install X2Go server using command:

zypper in x2goserver x2goserver-xsession

8)On SUSE systems:

Add X2Go repository as shown below. Replace the version number with your own.

zypper ar http://packages.x2go.org/sle//extras x2go-extras
zypper ar http://packages.x2go.org/sle//main x2go-release
Then, install X2Go server using command:

zypper in x2goserver x2goserver-xsession
OpenSUSE 11 and SLES/SLED 11 do not support /etc/sudoers.d as a place for custom sudoers config files.

If you are using any of these distributions and are having issues regarding running Qt applications with elevated privileges (e.g., via kdesu or sudo), please use this workaround.

Copy the contents of the “x2goserver” file residing in the documentation directory /usr/share/doc/packages/x2goserver.

Get elevated privileges. Either via:

su
or

sudo -i
Then, launch:
visudo
Paste the previously copied content at the end of the sudoers file. Save and exit your editor.

9)On Gentoo:

Currently X2Go cannot connect to an openssh server compiled with the HPN patch. To make sure x2goserver works on your Gentoo server, you must recompile net-misc/openssh with HPN support disabled. Add the following line to /etc/portage/packages. use:

net-misc/openssh -hpn
Then recompile net-misc/openssh, update the configuration file, and restart the sshd server, as follows:

emerge -1 net-misc/openssh
dispatch-conf
/etc/init.d/sshd restart
Note: A local X.Org installation is not required on the X2Go Server

Install X2Go Client
X2Go Client is available for Windows, Mac OS X, and many Linux distributions.

Add X2Go repository as shown above in the X2Go server installation section depending upon the distribution you use.

Then, install X2Go client using command:

1) On Debian and Ubuntu like systems:

sudo apt-get install x2goclient

2) On RHEL and CentOS like systems:

yum install x2goclient

3) On SUSE and openSUSE like systems:

zypper in x2goclient

Usage
From your client systems, launch X2Go client either from Menu or Unity Dash.

Enter the Session name, remote system’s IP address, remote system’s user name, and desktop environments (Ex.LXDE, KDE etc.).

For example, here I select “Connect to local desktop” session.

Finally, click Ok to continue.

 类似资料: