Ubuntu 18.04安装xdrp以使用远程桌面


背景

开发环境有一台服务器默认没有屏幕(被我拿走用来拓展屏幕了),有时候需要使用到界面但嫌弃拆显示器太麻烦,因此使用远程桌面来解决这个需求。

做法

安装xrdp

sudo apt install -y tightvncserver  xrdp
sudo systemctl restart xrdp

登录

Windows

入口:菜单--Windows 附件--远程桌面连接MSTSC

1、输入IP,不需要用户名。

image

2、选择Xorg,输入账号密码

image

Ubuntu

入口:remmina

问题与解决

多次输入密码

https://blog.csdn.net/wu_weijie/article/details/108481456

1、xrdp 远程登录需要输入很多次密码

image

Authentication is required to creat a color profile

创建文件 /etc/polkit-1/localauthority/50-local.d/45-allow-colord.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

创建文件 /etc/polkit-1/localauthority/50-local.d/46-allow-packagekit.pkla 并写入内容:

[Allow Refresh Repository all Users]
Identity=unix-user:*
Action=org.freedesktop.packagekit.system-sources-refresh
ResultAny=no
ResultInactive=no
ResultActive=yes

thinclient_drives

https://blog.csdn.net/jhjyear/article/details/91040216

ubuntu上安装xrdp搭建远程桌面,后面远程桌面是可以了,但是用户目录下生出了一个thinclient_drives文件夹,无论是不是root都不能删除,

这个不删除有时候也很难受,比如你要打包整个用户目录,打包到它的时候会告诉你权限不允许,例如:

tar: thinclient_drives: Cannot stat: Permission denied
tar: Exiting with failure status due to previous errors

如果你有强迫症,你就感觉不舒服,一定要删除,下面介绍如何删除。

具体表现如下:

$ sudo  ll 
ls: cannot access 'thinclient_drives': Transport endpoint is not connected
total 72
drwx------  7 root root  4096 Jun  6 09:39 ./
drwxr-xr-x 23 root root  4096 Jun  6 10:16 ../
d?????????  ? ?    ?        ?            ? thinclient_drives/

由于是它的所有者、组用户、读写执行都是,chmod也不好使。

需要另辟蹊径,使用下列命令:

$ sudo umount ~/thinclient_drives && sudo rm thinclient_drives -rf


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM