ubuntu 22.04 server 版本 安裝桌面、安裝XRDP
講真的,是被折騰慘了,才寫的這個,前面在網(wǎng)上搜的,基本上沒有對的,真尷尬
1、更新軟件列表
apt update -y
2、安裝服務(wù)
apt install ubuntu-desktop -y
apt install xrdp -y
systemctl enable --now xrdp
sudo ufw allow 3389/tcp
reboot
3、如果需要root登錄RDP
3.1、修改root 密碼
passwd root
3.2、修改環(huán)境變量文件
vim /root/.profile
##在mesg 前面加上 tty -s &&
tty -s && mesg n 2> /dev/null || true
root@administrator-KVM:~# cat /root/.profile
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
tty -s && mesg n 2> /dev/null || true
3.3、修改pam模塊允許root登錄
將/etc/pam.d/gdm-autologin 和 /etc/pam.d/gdm-password 文件中
關(guān)于root的限制登錄選項注釋掉
auth required pam_succeed_if.so user != root quiet_success
root@administrator-KVM:~# cat /etc/pam.d/gdm-autologin |grep root
#auth required pam_succeed_if.so user != root quiet_success
root@administrator-KVM:~# cat /etc/pam.d/gdm-password |grep root
#auth required pam_succeed_if.so user != root quiet_success
完成之后直接使用RDP登錄即可
登錄后的界面
完成文章來源:http://www.zghlxwxcb.cn/news/detail-738619.html
4、異常
最容易出現(xiàn)的問題是無法登錄,或者登錄閃退,檢查上述配置后確認(rèn)無誤重啟即可
另外注意,安裝軟件的順序不能錯,XRDP只能后裝,否則會出現(xiàn)一些依賴問題文章來源地址http://www.zghlxwxcb.cn/news/detail-738619.html
到了這里,關(guān)于ubuntu 22.04 server 版本 安裝桌面、安裝XRDP的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!