使用xrdp實現windows 遠端桌面連線linux__linux

來源:互聯網
上載者:User

之前一直用mstsc串連windows主機,今天想用此來串連linux主機時,發現 串連不了~。。~
與度娘親熱好久之後,分享一篇部落格給大家:傳送門



一般情況下我們用ssh用戶端遠程登陸Linux系統,至於圖形介面下的linux遠程登陸工具,我們一般都會想到vnc,但它的安全性不夠,
在這裡,我將介紹XRDP的安裝配置方法。我們可以很方便的通過windows遠端桌面 linux。 xrdp安裝配置方法

開啟終端:依次安裝

sudo apt-get install xrdpsudo apt-get install vnc4server tightvncserver
設定xrdp
echo "gnome-session --session=gnome-classic" > ~/.xsession

該命令的作用是由於安裝了 gnome案頭,ubuntu12.04中同時存在unity、GNOME多個案頭管理器,需要啟動的時候指定一個,不然
即使遠程登入驗證成功以後,也只是背景。
xrdp的配置文檔在/etc/xrdp目錄下的xrdp.ini和sesman.in,一般選擇預設。 重啟 xrdp

sudo /etc/init.d/xrdp restart
運行Windows的mstsc



即windows 遠端桌面,開啟輸入遠端Ip,串連,輸入使用者密碼 即可遠程linux. 遇到的錯誤

1,xrdp 訪問 ubuntu 只看到背景,看不到功能表列的解決辦法
方法:安裝gnome-panel

sudo apt-get install gnome-panel

2,Failed to load session “gnome”
案頭用 ubuntu-2d 試下
鍵入命令:echo "gnome-session –session=ubuntu-2d" > ~/.xsession ,然後重啟xrdp。

3,出現錯誤:

connecting to sesman ip 127.0.0.1 port 3350sesman connect oksending login info to sesman login successful for display 14started connectingconnecting to 127.0.0.1 5914error - problem connectingxrdp-sesman.log下錯誤為:[INFO ] starting Xvnc session...[ERROR] X server for display 10 startup timeout[INFO ] starting xrdp-sessvc - xpid=2924 - wmpid=2923[ERROR] X server for display 10 startup timeout[ERROR] another Xserver is already active on display 10[DEBUG] aborting connection... 如果你的log也有類似 X server for display 10 startup timeout和another Xserver is already active on display 10

問題根源在於tightvnc,出現問題的版本跟X字型有衝突,導致串連Xserver出錯。

解決方案:

apt-get purge tightvnc xrdpapt-get install tightvncserver xrdp

最後:
啟動xrdp服務,sudo /etc/init.d/xrdp restart,此時會啟用相應連接埠,配置方面預設即可。
通過命令:netstat -tnl
查看 3350 3389 5910 這三個連接埠處於LISTEN,一般就沒問題了。
dpkg -L +軟體包的名字,可以知道這個軟體包包含了哪些檔案.

4,ubuntu 13.10 及以後版本 無背景:
感謝評論中的童鞋提出的方案:
xrdp支援不了13.10的gnome了,解決辦法是裝個xfce介面,
sudo apt-get install xubuntu-desktop
然後:
echo xfce4-session >~/.xsession

再設定設定檔
sudo gedit /etc/xrdp/startwm.sh
在. /etc/X11/Xsession 前一行插入
xfce4-session
重啟xrdp
sudo service xrdp restart

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.