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

相关推荐
呆萌小新@渊洁3 小时前
linux升级系统,重启出现Minimal BASH-like line editingis supported
linux·服务器
東雪蓮☆3 小时前
从零开始掌握 Web 与 Nginx:入门详解
运维·服务器·前端·nginx
ajassi20003 小时前
开源 C++ QT Widget 开发(十四)多媒体--录音机
linux·c++·qt·开源
zwhSunday3 小时前
Linux驱动开发(2)进一步理解驱动
linux·驱动开发
Miraitowa_cheems4 小时前
LeetCode算法日记 - Day 38: 二叉树的锯齿形层序遍历、二叉树最大宽度
java·linux·运维·算法·leetcode·链表·职场和发展
青铜发条4 小时前
【python】python进阶——网络编程
运维·服务器·网络
勇闯逆流河4 小时前
【Linux】Linux常用指令合集
linux·运维·服务器
宇钶宇夕4 小时前
西门子 S7-200 SMART PLC: 3 台电机顺启逆停控制(下篇):逆序停止与安全保障实现
运维·自动化
的小姐姐4 小时前
RMS设备检修管理系统_HawkEye智能运维平台_璞华大数据
大数据·运维