CentOS7中安装远程桌面
以前一直使用VNC连接Linux服务器的远程桌面。突然想找找有没有更方便的办法,发现了xrdp这个工具,可以直接使用windows的远程进行连接。下面是安装步骤,及遇到问题的解决办法。转载的话,请注明来自:Oopsdump.com,谢谢。
首先,CentOS中需要安装epel库,如已安装过,可跳过该步:
yum install epel-release
然后,安装xrdp及需要的vnc服务端:
yum install xrdp tigervnc-server
最后,启动服务,并设置为开机启动:
systemctl start xrdp
systemctl enable xrdp
如开启了防火墙,还需要开放相应端口:
firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload
下面是可能遇到的问题:
如果远程遇到颜色错误,配置xrdp.ini文件:将/etc/xrdp/xrdp.ini中的max_bpp=32,改为max_bpp=24。
如果在远程登录后,遇到提示“Authentication is required to create a color profile”,需要输入管理员密码。可以增加下面文件: /etc/polkit-1/rules.d/02-allow-colord-oopsdump-com.conf,内容如下:(注意:将下面的{group}替换为你需要允许的用户组)
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.color-manager.create-device" ||
action.id == "org.freedesktop.color-manager.create-profile" ||
action.id == "org.freedesktop.color-manager.delete-device" ||
action.id == "org.freedesktop.color-manager.delete-profile" ||
action.id == "org.freedesktop.color-manager.modify-device" ||
action.id == "org.freedesktop.color-manager.modify-profile") &&
subject.isInGroup("{group}")) {
return polkit.Result.YES;
}
});
如果还有问题,可以在/etc/polkit-1/localauthority/50-local.d/下增加文件45-allow-colord-oopsdump-com.pkla:
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes
上述更改完成后,需要重启polkit服务,或重启系统。如:systemctl restart polkit。
如果xrdp无法启动,可以尝试:
chcon -t bin_t /usr/sbin/xrdp
chcon -t bin_t /usr/sbin/xrdp-sesman
如果需要禁用功能,可以将/etc/xrdp/xrdp.ini中相应的channel用#注释后,重启服务:
rdpdr=true 设备重定向开启。
rdpsnd=true 声音功能开启。
drdynvc=true 初始化附加的动态Channel开启。
cliprdr=true 剪切板重定向开启。
rail=true 远程应用集成到本地(RAIL)开启。
xrdpvr=true XRDP视频流功能开启。
tcutils=true 远程推出USB及关闭电源等功能开启。
2 评论
Coin Casino | New Online Casino With Cash Out Now | CasinoRewards
回复删除With our new casino worrione with cash out, you 온카지노 will be able to enjoy 인카지노 the fun of playing and winning. And it will ensure you have the
The construction-tech company also has two one-bedroom models, one with a bigger lounge and bedroom. The Los Angeles-based development company makes use of recycled plastic materials to 3D print its homes. Just be sure to|make certain to|remember to} take note of|pay attention to|be aware of} the frequent issues 3D printer hobbyists experience highlighted above and know the ipad pens for drawing way to|tips on how to} fix them that you just can|so as to|to find a way to} remedy them effectively in case they happen to you.
回复删除