ubuntu 22 安装轻量级桌面Xfce并使用xrdp远程桌面连接

1.安装Xfce:

复制代码
sudo apt install xubuntu-desktop -y

2.安装xrdp:

复制代码
sudo apt install xrdp -y

3.配置xrdp,nano /etc/xrdp/xrdp.ini:

复制代码
[Globals]
...
port=3389   ; 远程连接端口,默认是3389,可以改成自己喜欢的端口

...
;
; Session types
;

; Some session types such as Xorg, X11rdp and Xvnc start a display server.
; Startup command-line parameters for the display server are configured
; in sesman.ini. See and configure also sesman.ini.
[Xorg]
name=Xorg
lib=libxup.so
username=ask        ; 登录用户名
password=ask        ; 登录密码
ip=127.0.0.1
port=-1
code=20

...

4.添加xrdp登录用户,要跟xrdp.ini里面设置的一样:

复制代码
adduser ask

5.修改startwm.sh,nano /etc/xrdp/startwm.sh:

复制代码
#!/bin/sh
# xrdp X session start script (c) 2015, 2017, 2021 mirabilos
# published under The MirOS Licence

# Rely on /etc/pam.d/xrdp-sesman using pam_env to load both
# /etc/environment and /etc/default/locale to initialise the
# locale and the user environment properly.

if test -r /etc/profile; then
        . /etc/profile
fi

# test -x /etc/X11/Xsession && exec /etc/X11/Xsession       # 注释掉
# exec /bin/sh /etc/X11/Xsession                            # 注释掉
startxfce4        # 添加这个

6.重启xrdp:

复制代码
systemctl restart xrdp

7.用windows的远程桌面测试能不能连接,不行重启一下服务器再试试看,有其它问题欢迎留言探讨。

相关推荐
JZC_xiaozhong2 分钟前
基于KPaaS平台实现的制造业端到端业务流程自动化
运维·自动化·bpm·数据集成与应用集成·流程设计可视化·流程监控·业务流程管理系统
报错小能手3 分钟前
项目——基于C/S架构的预约系统平台(3)
linux·开发语言·笔记·学习·架构·1024程序员节
星空的资源小屋19 分钟前
Tuesday JS,一款可视化小说编辑器
运维·网络·人工智能·编辑器·电脑·excel
心寒丶20 分钟前
Linux基础知识(三、Linux常见操作目录命令)
linux·运维·服务器·1024程序员节
ajassi200022 分钟前
开源 Linux 服务器与中间件(十二)FRP内网穿透应用
linux·服务器·开源·frp
追风少年ii1 小时前
脚本更新--CosMx、Xenium的邻域通讯分析(R版本)
linux·python·r语言·r·单细胞·培训
馨谙1 小时前
Bash Shell 脚本编程入门详解
linux·bash
海星船长丶1 小时前
Chrony服务器同步时间服务器实验
运维·服务器
用户31187945592181 小时前
申威 SW-64 架构安装 MySQL 8.0.18 (KY10系统 RPM包) 步骤指南
linux
skywalk81631 小时前
在Ubuntu Linux安装brew 使用brew安装llama.cpp 运行文心Ernie大模型
人工智能·ubuntu·llama·ernie·brew·1024程序员节