实现无公网IP的公网环境下Windows远程桌面Ubuntu 18.04连接,高效远程办公!(上)

简介: 实现无公网IP的公网环境下Windows远程桌面Ubuntu 18.04连接,高效远程办公!(上)

本篇文章主要介绍在Ubuntu上安装XRDP远程桌面,实现同个局域网内远程桌面Ubuntu,同时解决远程桌面登录蓝屏的问题。

并做内网穿透,使用cpolar内网穿透映射3389端口,生成公网TCP端口地址,实现在公网环境下,远程桌面Ubuntu系统

【cpolar内网穿透支持http/https/tcp协议,支持永久免费使用,不限制流量,无需公网IP,也不用进入路由器设置,操作简单。】

一、 同个局域网内远程桌面Ubuntu

1. 更新软件仓库

sudo apt update
sudo apt upgrade

2. 安装支持包

安装支持包 : Xorg, Xrdp, Xserver, Xfce4 and Mate Packages

sudo apt-get install xorg
sudo apt-get install xserver-xorg-core
sudo apt-get install xorgxrdp

3. 安装XFCE4桌面环境

sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils
• 1

4. 安装XRDP

sudo apt install xrdp
sudo systemctl status xrdp
sudo systemctl restart xrdp

5. 环境设置

5.1 XFCE桌面配置
sudo sed -i.bak '/fi/a #xrdp multiple users configuration \n xfce-session \n' /etc/xrdp/startwm.sh
5.2 在配置文件中,加入XFCE会话
echo xfce4-session > ~/.xsession

6 重启服务

sudo systemctl restart xrdp

7. 查看IP地址

sudo apt install net-tools
ifconfig

如图:

本例中,获取Ubuntu主机IP为192.168.9.144

8. 使用Windows远程桌面连接

在局域网,找到另一台Windows主机,打开远程桌面连接,输入Ubuntu主机的IP地址,以及用户名密码。

第一次登录时,会显示

点击Use default config按钮,继续。

现在,已经远程桌面连接成功了。

二、公网环境系统远程桌面Ubuntu

在没有公网IP的环境下,要实现远程桌面连接,可以通过cpolar内网穿透来实现,映射3389端口。

1. 注册cpolar账号并安装

1.1. 安装cpolar(通过一键自动安装脚本方式)
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash

或 cpolar短链接安装方式:(国外使用)

curl -sL https://git.io/cpolar | sudo bash
1.2 向系统添加服务
sudo systemctl enable cpolar
1.3 启动cpolar服务
sudo systemctl start cpolar

2. 登录cpolar web UI管理界面

在浏览器访问 ,使用cpolar账号密码登录


目录
相关文章
|
8月前
|
Ubuntu Windows
双系统必备:Ubuntu自动挂载Windows分区
在双系统环境下,手动挂载Windows硬盘十分繁琐。本文介绍如何配置Ubuntu开机自动挂载Windows硬盘,包括硬盘识别、挂载点创建、fstab配置及验证步骤,帮助您节省时间,实现高效操作。
724 1
|
8月前
|
Ubuntu Linux Windows
如何在Ubuntu系统中安装Wine,借此来运行Windows程序
熟悉的登录画面出现,在Ubuntu系统中扫描登录微信程序。
|
12月前
|
Ubuntu Linux
Ubuntu下载工具:ip addr、ifconfig、ping、make的使用
的选项和参数,这里只是简单地介绍了它们的基本用法。如果你想要深入学习这些工具,我建议你查阅它们的man页面,或者找一本好的Linux教程进行学习。
508 22
|
监控 Ubuntu Linux
视频监控笔记(五):Ubuntu和windows时区同步问题-your clock is behind
这篇文章介绍了如何在Ubuntu和Windows系统中通过设置相同的时区并使用ntp服务来解决时间同步问题。
445 4
视频监控笔记(五):Ubuntu和windows时区同步问题-your clock is behind
|
资源调度
Ubuntu22.04静态ip配置+yarn build后显示内存超限,变异失败
Ubuntu22.04静态ip配置+yarn build后显示内存超限,变异失败
215 2
Ubuntu22.04静态ip配置+yarn build后显示内存超限,变异失败
|
Ubuntu 安全 Linux
Windows——安装Ubuntu 18.04 LTS
Windows——安装Ubuntu 18.04 LTS
587 1
Windows——安装Ubuntu 18.04 LTS
|
Ubuntu Linux Python
如何利用wsl-Ubuntu里conda用来给Windows的PyCharm开发
如何在WSL(Windows Subsystem for Linux)的Ubuntu环境中使用conda虚拟环境来为Windows上的PyCharm开发设置Python解释器。
2514 1
|
安全 文件存储 iOS开发
告别痕迹:远程桌面连接历史和凭据的清零指南
【8月更文挑战第18天】使用远程桌面后,为保障安全隐私,需清除连接历史及凭据。在Windows中,可通过注册表编辑器删除HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default下的MRU键值来清除历史记录;macOS下则需移步至“~/Library/Application Support/Apple/Remote Desktop”删除“Clients.plist”。清除凭据方面,Windows用户应访问“控制面板”中的“凭据管理器”删除相应条目;macOS用户需利用“钥匙串访问”应用找出并移除相关条目。
5009 3
|
弹性计算 安全 Windows
通过远程桌面连接Windows服务器提示“由于协议错误,会话将被中断,请重新连接到远程计算机”错误怎么办?
通过远程桌面连接Windows服务器提示“由于协议错误,会话将被中断,请重新连接到远程计算机”错误怎么办?
|
Windows
Windows——windows10下如何和子系统Ubuntu18.04互传文件
Windows——windows10下如何和子系统Ubuntu18.04互传文件
285 1