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的远程桌面测试能不能连接,不行重启一下服务器再试试看,有其它问题欢迎留言探讨。

相关推荐
出海干货炒鱿鱼1 分钟前
IP大科普:住宅IP、机房IP、原生IP、双ISP
运维·服务器
somi72 分钟前
ARM-驱动-03 Linux 字符设备驱动开发
linux·arm开发·驱动开发·自用
CDN3605 分钟前
高防服务器带宽跑满、业务掉线?流量限制与清洗优化
运维·服务器
似水এ᭄往昔6 分钟前
【Linux】--程序地址空间
linux·运维·服务器
云飞云共享云桌面12 分钟前
8-10位研发3D(sw、ug、creo)画图如何共享一台工作站?
运维·服务器·网络·数据库·3d·电脑
Turboex邮件分享13 分钟前
邮件系统中的抗拒绝服务(DDoS)攻击防护
运维·网络·安全·ddos·软件需求
成为你的宁宁15 分钟前
【docker镜像加速器配置】
运维·docker·容器
DeeplyMind24 分钟前
Linux 内核补丁提交(Upstream)完整指南
linux·upstream
三道渊27 分钟前
Linux进程通信与信号处理全解析
linux·服务器·网络
AI_Claude_code29 分钟前
ZLibrary访问困境方案六:自建RSS/Calibre内容同步服务器的完整指南
运维·服务器·网络·爬虫·python·tcp/ip·http