使用Windows远程访问Kali Linux桌面

本文介绍了如何使用apt-get安装xrdp和xfce4,修改xrdp配置文件以启用xfce桌面环境,包括设置启动脚本、清理环境变量并确保服务开机自启动的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装xrdp、xfce4

apt-get install -y xrdp xfce4

修改 xrdp 配置文件启用 xfce 桌面

vim /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

unset DBUS_SESSION_DUS_ADDRESS
unset XDG_RUNTIME_DIR
.$HOME/.profile
echo "xfce4-session"

test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession

启动服务并开机自启

systemctl start xrdp
systemctl enable xrdp

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值