Please select To the mobile version | Continue to access the desktop computer version

Nujin

 Forget password?
 Register

WeChat login, one step

View: 1942|Reply: 50

How to install Xrdp server (remote desktop) on Ubuntu 20.04

[Copy this link] Choose your language

3356

Threads

3356

Posts

370

Credits

打工仔

Rank: 2

Credits
370
Post time 2021-1-14 14:41:57 | Show all posts |Reading mode

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

This article was first published at:https://www.itcoder.tech/posts/how-to-install-xrdp-on-ubuntu-20-04/

Xrdp is an open source implementation of Microsoft Remote Desktop Protocol (RDP), which allows you to control remote systems through a graphical interface. With RDP, you can log in to a remote machine and create a real desktop session, just like you log in to a local machine.

This guide explains how to install and configure Xrdp server on Ubuntu 20.04.

1. Install the desktop environment

Ubuntu servers are usually managed by the command line, and the desktop environment is not installed by default. If you are running Ubuntu desktop version, ignore this step.

There are many desktop environments for you to choose from in the Ubuntu source repository. One option is to install Gnome, which is the default desktop environment for Ubuntu 20.04. Another option is to install xfce. It is a fast, stable, and lightweight desktop environment, making it an ideal desktop for remote servers.

Run any of the following commands to install the desktop environment of your choice:

  • Install Gnome


  • sudo aptupdate


  • sudo aptinstallubuntu-desktop

  • Install Xfce


  • sudo aptupdate


  • sudo aptinstallxubuntu-desktop

Depending on your system, downloading and installing the GUI software package will take some time.

2. Install Xrdp

Xrdp is included in the default Ubuntu software source. To install it, run:

sudo aptinstallxrdp

Once the installation is complete, the Xrdp service will start automatically. You can enter the following command to verify it:

sudosystemctl status xrdp

The output will look like this:



  • xrdp.service-xrdpdaemon


  • Loaded:loaded(/lib/systemd/system/xrdp.service; enabled; vendorpreset: enabled)


  • Active:active(running)sinceFri2020-05-22
    17:36:16UTC;4min41sago


  • ...

By default, Xrdp uses /etc/ssl/private/ssl-cert-snakeoil.key, which is only readable by the user group "ssl-cert". Run the following command to add the xrdp user to this user group:

sudoadduser xrdp ssl-cert

Restart the Xrdp service to make changes Effective:

sudosystemctl restart xrdp

Xrdp has been installed on your Ubuntu server, and you can start using it.

3. Xrdp configuration

The Xrdp configuration file is located in the /etc/xrdp directory. For basic Xrdp links, you do not need to make any changes to the configuration file.

Xrdp uses the default X Window desktop environment (Gnome or XFCE).

The main configuration file is namedxrdp.ini. This file is divided into different sections, allowing you to set global configuration, such as security, listening address, creating different xrdp login sessions, etc.

Whenever you make changes to the configuration file, you need to restart the Xrdp service.

Xrdp Use the startwm.sh file to start an X session. If you want to use another X Window desktop, edit this file.

Fourth, configure the firewall

The Xrdp daemon listens on port 3389 on all network interfaces. If you are running a firewall on your Ubuntu server, you need to open the Xrdp port.

To allow access to Xrdp server from a specified IP address or IP range, for example 192.168.33.0/24, you need to run the following command:

sudoufwallowfrom192.168.33.0
/24to any port3389

If you To allow access from anywhere (for security reasons, this method is not encouraged), run:

sudoufwallow3389

To increase security, you can consider Xrdp to only monitor localhost and create an SSH tunnel to encrypt the traffic between port 3389 of the local machine and the same port of the remote server.

5. Connect to Xrdp server

Now that you have set up your Xrdp server, it is time to open your Xrdp client and connect to the server.

If you have a Windows computer, you can use the default RDP client. Enter "remote" in the Windows search bar, and click "Remote Desktop Connection". This will open an RDP client. Enter the remote server IP address in the "Computer" field, and click "Connect".

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

On the login screen, enter your username and password, and click "OK".

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

Once logged in, you will see the default Gnome or Xfce desktop, it should look like The following:

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

Now you can use your keyboard and The mouse interacts with the remote desktop.

If you are running macOS, you can install the Microsoft Remote Desktop app from the Mac App Store. Linux users can use an RDP client, such as Remmina or Vinagre.

6. Summary

Configure a remote desktop, allowing you to manage your Ubuntu 20.04 server through a simple and easy-to-use graphical interface from your local machine.

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)

如何在Ubuntu 20.04 上安装 Xrdp 服务器(远程桌面)
Reply

Use magic Report

3634

Threads

710k+

Posts

3647

Credits

白领

Rank: 4

Credits
3647
Post time 2021-1-14 14:42:01 | Show all posts
钻石恒久远,一颗就破产!
Reply Agree Disagree

Use magic Report

3561

Threads

710k+

Posts

3663

Credits

白领

Rank: 4

Credits
3663
Post time 2021-1-14 14:42:05 | Show all posts
很好!很强大!
Reply Agree Disagree

Use magic Report

3717

Threads

710k+

Posts

3651

Credits

白领

Rank: 4

Credits
3651
Post time 2021-1-14 14:42:09 | Show all posts
如果换我先开口,日子是否还一样细水长流
Reply Agree Disagree

Use magic Report

3894

Threads

710k+

Posts

3663

Credits

白领

Rank: 4

Credits
3663
Post time 2021-1-14 14:42:09 | Show all posts
告诉周围人,你和她已经分手,避免他们给你打报告,哪天又看见谁谁谁了。
Reply Agree Disagree

Use magic Report

3598

Threads

710k+

Posts

3651

Credits

白领

Rank: 4

Credits
3651
Post time 2021-1-14 14:42:09 | Show all posts
男人感叹女人:漂亮的不会下厨房,能下厨房的不温柔,温柔的沒主见,有主见的沒女人味,有女人味的乱花钱,不乱花钱的不时尚,时尚的不放心,放心的没法看!
Reply Agree Disagree

Use magic Report

3550

Threads

710k+

Posts

3614

Credits

白领

Rank: 4

Credits
3614
Post time 2021-1-14 14:42:09 | Show all posts
心里想了,两片痒了,握个棒棒,插入正中,风风火火,棒也短了,两片不痒了,心里也不想了……烟瘾又犯了吧
Reply Agree Disagree

Use magic Report

3498

Threads

710k+

Posts

3636

Credits

白领

Rank: 4

Credits
3636
Post time 2021-1-14 14:42:10 | Show all posts
不要等待机会,而要创造机会。
Reply Agree Disagree

Use magic Report

3750

Threads

710k+

Posts

3659

Credits

白领

Rank: 4

Credits
3659
Post time 2021-1-14 14:42:10 | Show all posts
路过。。打个酱油...........。。。。
Reply Agree Disagree

Use magic Report

3498

Threads

710k+

Posts

3636

Credits

白领

Rank: 4

Credits
3636
Post time 2021-1-14 14:42:10 | Show all posts
一个鸡蛋跑到青藏高原,结果它变成了氢弹;
Reply Agree Disagree

Use magic Report

 
Online Customer Service
点击这里给我发消息
Technical Advisory Hotline
Wechat:gwailee
QQ:395508196
EM:hi@niuresou.com

Scan WeChat, follow the public account to lead Nujinniu Stock Niu Ce

QQ|Baidu Statistics|Archives|Mobile|Black House|Search management|Game management|Nujin ( ICP证:沪B2-20210491 | ICP备案号:沪ICP备20013403号 ) Choose your language

GMT+8, 2021-6-23 10:44 , Processed in 2.439038 second(s), 3965 queries .

Powered by Nujin X3.4

© 2001-2017 Nujin Inc.

Quick reply To Top Back to list