如何在Raspberry Pi中安装和连接RDP(xrdp)?

远程桌面协议(RDP)是由Microsoft为其Windows操作系统创建的远程连接协议。但由于其低带宽连接、资源共享等优点,它得到了广泛的应用。Raspberry-Pi是一个开创性的SoC,它提供了一个廉价的完整系统。RDP协议可以与RaspberryPi一起使用,以便用GUI连接RaspberryPi桌面环境。

null

在RaspberryPi上安装RDP服务器

RDP有服务器和客户端架构,RDP服务器应该安装在RaspberryPi上。甚至我们称之为RaspberryPi,它是一个Linux发行版,如Raspbian、Ubuntu等,因此我们将遵循基于apt或apt get的软件包安装。首先,我们将更新repostory和包信息。

$ sudo  apt update

我们将更新ot升级到最新的软件包版本,如下所示。

$ sudo  apt dist-upgrade

现在一切都是最新的,我们可以安装RDP服务器包,它被命名为xrdp。顾名思义,它是用于X服务器的RDP协议实现,名为XRDP。Xrdp是RDP服务器协议的开源实现,与所有RDP客户端(如Windows RDP客户端)兼容。

$ sudo apt install xrdp

但是我们也可以使用下面的apt show命令来显示关于xrdp的详细包信息。

$ apt show xrdp

将显示以下输出,其中提供版本、安装大小、说明、主页等信息。

Package: xrdpVersion: 0.9.12-1.1Priority: optionalSection: universe/netOrigin: UbuntuMaintainer: Ubuntu Developers [email protected]Original-Maintainer: Debian Remote Maintainers [email protected]Bugs: https://bugs.launchpad.net/ubuntu/+filebugInstalled-Size: 3.026 kBPre-Depends: init-system-helpers (>= 1.54~)Depends: adduser, lsb-base (>= 3.0-6), ssl-cert, libc6 (>= 2.15), libfuse2 (>= 2.6), libjpeg8 (>= 8c), libopus0 (>= 1.1), libpam0g (>= 0.99.7.1), libssl1.1 (>= 1.1.0), libx11-6, libxfixes3, libxrandr2Recommends: fuse, xorgxrdpSuggests: guacamole, xrdp-pulseaudio-installerHomepage: http://www.xrdp.org/Download-Size: 435 kBAPT-Sources: http://tr.archive.ubuntu.com/ubuntu groovy/universe amd64 PackagesDescription: Remote Desktop Protocol (RDP) serverxrdp offers a graphical login to a remote client usingRDP (the Remote Desktop Protocol). xrdp can connect toa locally created X.org session with the xorgxrdp drivers,to a VNC X11 server, and forward to another RDP server..xrdp accepts connections from freerdp, rdesktop, and thebuilt-in terminal server / remote desktop clients ofMicrosoft Windows operating systems.In the xorgxrdp (which replaces X11RDP) and VNC modes,it provides a fully functional Linux terminal server,offering an X-Window desktop to the user. In the RDPor VNC forwarding mode, any sort of desktop can be used.

RDP连接是使用IP地址或域名建立的。但是IP地址是最流行的方式,因为不是每个系统都提供域名,可以由DNS服务器解析。RDP服务器IP地址将通过以下命令显示。

$ hostname -I
192.168.146.136

ip地址命令也可以用来打印树莓的ip地址

$ ip address
图片[1]-如何在Raspberry Pi中安装和连接RDP(xrdp)?-yiteyi-C++库
RaspberryPi IP地址

用RDP从Windows连接Raspberry Pi

作为一种内置协议,Windows操作系统(如windowsxp、windowsvista、windows7、windows8、windows10和所有Windows服务器版本)默认提供RDP客户端。因此,没有必要为Windows操作系统安装RDP客户机。

通过如下所示键入远程桌面连接,可以通过“开始”菜单打开Windows RDP客户端。

图片[2]-如何在Raspberry Pi中安装和连接RDP(xrdp)?-yiteyi-C++库
打开RDP(远程桌面连接)客户端

在下面的屏幕中,我们将提供Raspberry Pi的IP地址,但如果DNS服务器可以解析域名,也可以使用Raspberry Pi的域名。

图片[3]-如何在Raspberry Pi中安装和连接RDP(xrdp)?-yiteyi-C++库
连接RDP服务器

由于RDP是一种安全且加密的协议,它将尝试用一些证书来标识Raspberry Pi身份。只需点击“ 是的 “接受它。

图片[4]-如何在Raspberry Pi中安装和连接RDP(xrdp)?-yiteyi-C++库
接受RDP服务器标识

RDP连接建立后,xrdp欢迎屏幕将向我们致意。此屏幕提供一个登录屏幕,询问 会话 , 用户名, 密码 . 将会话保留为默认值,默认值为“ 克奥尔格 “然后输入用户名和密码。如果您使用的是默认的Raspberry Pi用户和密码,请使用“ 圆周率 “作为用户名和” 覆盆子 “作为密码。有关RaspberryPi操作系统的默认用户和密码的更多信息,请参阅以下教程。

图片[5]-如何在Raspberry Pi中安装和连接RDP(xrdp)?-yiteyi-C++库
XRDP登录

RDP替代方案

即使RDP是一个伟大的协议连接RaspberryPi系统远程图形用户界面有替代品,可用于不同的情况。

VNC公司 是Linux发行版的一种流行协议,它提供与GUI的远程连接。

团队查看器 是一个合适的协议和工具,可以安装到RaspberryPi中,其他TeamViewer用户可以轻松连接到它,即使不需要网络、防火墙或端口配置。

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享