背景
開發環境有一台服務器默認沒有屏幕(被我拿走用來拓展屏幕了),有時候需要使用到界面但嫌棄拆顯示器太麻煩,因此使用遠程桌面來解決這個需求。
做法
安裝xrdp
sudo apt install -y tightvncserver xrdp
sudo systemctl restart xrdp
登錄
Windows
入口:
菜單
--Windows 附件
--遠程桌面連接
(MSTSC
)
1、輸入IP,不需要用戶名。
2、選擇Xorg,輸入賬號密碼
Ubuntu
入口:
remmina
問題與解決
多次輸入密碼
https://blog.csdn.net/wu_weijie/article/details/108481456
1、xrdp 遠程登錄需要輸入很多次密碼
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