来源  https://blog.csdn.net/yidichaxiang/article/details/100577570

 

最近在做windows RDP远程连接 linux桌面,期初使用CentOS 桌面版本,测试过程中发现CentOS的好多依赖包比较老,就转而测试Ubuntu了,在测试成功了,就想Deepin是不是也可以,原理都是一样的, 这里使用虚拟机进行测试版本版本是15.10,为了方便首先制作了一个镜像模版,后续测试都是通过镜像模版创建的虚拟机测试的。

首先开启ssh

  1. sudo apt-get install openssh-server
  2. #然后开启服务
  3. sudo systemctl start sshd

然后安装VNC Server,在之前https://blog.csdn.net/yidichaxiang/article/details/100533237,测试Ubuntu 18.04 开启 VNC Server 中,已经测试了不同形式,这里就简单直接的安装x11vnc

deepin@deepin-PC:~$ sudo apt install x11vnc

配置访问密码

  1. deepin@deepin-PC:~$ x11vnc -storepasswd
  2. Enter VNC password:
  3. Verify password:
  4. Write password to /home/deepin/.vnc/passwd? [y]/n y
  5. Password written to: /home/deepin/.vnc/passwd
  6. deepin@deepin-PC:~$ sudo cp /home/deepin/.vnc/passwd /etc/x11vnc.pass
  7. deepin@deepin-PC:~$

配置开机启动

deepin@deepin-PC:~$ sudo vi /lib/systemd/system/x11vnc.service

编辑以下内容

  1. [Unit]
  2. Description=Start x11vnc at startup.
  3. After=multi-user.target
  4. [Service]
  5. Type=simple
  6. ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
  7. [Install]
  8. WantedBy=multi-user.target

设置开机启动 

  1. deepin@deepin-PC:~$ sudo systemctl enable x11vnc.service
  2. Created symlink /etc/systemd/system/multi-user.target.wants/x11vnc.service /lib/systemd/system/x11vnc.service.
  3. deepin@deepin-PC:~$

重启电脑,测试开机启动 VNC Server

至此VNC Server 配置成功。

 

安装 xrdp

  1. deepin@deepin-PC:~$ sudo apt install xrdp
  2. deepin@deepin-PC:~$ sudo systemctl status xrdp
  3. xrdp.service - xrdp daemon
  4. Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
  5. Active: active (running) since Fri 2019-09-06 13:48:34 CST; 24s ago
  6. Docs: man:xrdp(8)
  7. deepin@deepin-PC:~$ sudo systemctl enable xrdp
  8. Synchronizing state of xrdp.service with SysV service script with /lib/systemd/systemd-sysv-install.
  9. Executing: /lib/systemd/systemd-sysv-install enable xrdp
  10. deepin@deepin-PC:~$

使用Windows 远程桌面远程deepin

这里需要特别注意的是 选择VNC-any协议,IP地址需要再输入一次,端口是vncServer的端口和密码,这里xrdp只是做了协议转发

至此 Windows 通过远程桌面访问 deepin已经配置完成了,现在可以通过rdp和vnc都能访问到deepin,多个连接时就是共享桌面,操作是可以相互影响和可见的。

 

============== End

 

版权声明:本文为lsgxeva原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/lsgxeva/p/13971534.html