【Linux】安装x11vnc和xrdp,使用windows远程deepin

一、环境准备
1、已安装deepin(虚拟机或物理机,安装教程自行查询,很简单),此处用的开源版deepin20.1做测试(目前已更新到20.2)

2、启用root账号,终端执行:sudo passwd root,设置密码即可

3、开启ssh,终端执行:systemctl start ssh

4、系统默认禁止了root账号登录,使用创建系统设置的账号登录,再切换到root即可

二、安装x11vnc
1、切换到root账户,安装vnc

sudo su,输入密码

sudo apt install x11vnc

2、配置访问密码(指定输入路径/etc/,后面会用到,若不指定默认在/root/.vnc/passwd)

x11vnc -storepasswd /etc/x11vnc.pass

提示如下:

Enter VNC password:

Verify password:

Write password to /root/.vnc/passwd? [y]/n y

Password written to: /root/.vnc/passwd

3、配置开机启动

vim /lib/systemd/system/x11vnc.service

写入以下内容(确认x11vnc.pass文件路径是否正确):

[Unit]

Description=Start x11vnc at startup.

After=multi-user.target

[Service]

Type=simple

ExecStart=/usr/bin/x11vnc -forever -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared

[Install]

WantedBy=multi-user.target

4、设置开机启动

systemctl enable x11vnc

5、启动服务

systemctl start x11vnc

6、查看状态

systemctl status x11vnc

三、安装xrdp
1、安装

apt install xrdp

2、查看状态

systemctl status xrdp

3、设置开机启动

systemctl enable xrdp

4、使用windows 远程桌面远程deepin

5、连接成功

本文来自博客园,作者:木子欢儿,转载请注明原文链接:https://www.cnblogs.com/HGNET/p/15787286.html

原文地址:https://www.cnblogs.com/HGNET/p/15787286.html