第一步:首先linux必须要有可视化界面,纯命令行的是不行的。
详情可参考:
【centos搭建可视化】:
(1)执行以下命令,安装图形化界面组件。
yum groupinstall "GNOME Desktop" "Graphical Administration Tools" -y
(2)执行以下命令,设置默认启动图形化界面。
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
(3)重启生效。
reboot
后续想换回命令行界面的话:
(1)关闭图形化界面
systemctl set-default multi-user.target
又想用可视化界面了:
(1)开启图形化界面
systemctl set-default graphical.target
【Ubuntu搭建可视化】参考:https://cloud.tencent.com/document/product/213/46001
第二步:安装desktop
rdesktop官方提供的下载地址为:https://github.com/rdesktop/rdesktop/releases/latest
通过wget命令行下载:
wget https://github.com/rdesktop/rdesktop/releases/download/v1.8.3/rdesktop-1.8.3.tar.gz
下载完成后解压
tar -xvzf rdesktop-1.8.3.tar.gz
按照解压的路径,此时进入 rdesktop 目录中,配置,编译,安装。
cd rdesktop-1.8.3
./configure
报错一:
ERROR: Could not find X Window System headers/libraries.
Probably you need to install the libX11-devel package.
To specify paths manually, use the options --x-includes and --x-libraries.
方案:
yum install libX11-devel
报错二:
rdesktop requires libXcursor, install the dependency
方案:
yum install libXcursor
报错三:
CredSSP support requires libgssglue, install the dependency
or disable the feature using --disable-credssp.
方案:
./configure --disable-credssp
报错四:
SmartCard support requires PCSC, install the dependency
or disable the feature using --disable-smartcard.
方案:
./configure --disable-credssp --disable-smartcard
结果:
恭喜!!!
现在可以开始编译、安装了:
make && make install
rdektop确认下:
现在可以放个《好运来》了,不过分!!!
第三步:检查目标windows系统中的远程设置,使用命令rdesktop 公网ip:端口号即可
回到linux系统,打开终端:
输入连接命令:
ojbk打在评论区,点赞收藏加关注,不迷糊,感谢。