【转】Xrdp 安裝在 Ubuntu 10.04 LTS

Xrdp 安裝在 Ubuntu 10.04 LTS

Ubuntu 裝好後,除了遠端登入用 ssh外,也想裝一下 vnc,找了一下谷哥,剛好發現另一種GUI login方式「xrdp


xrdp 是一個beased on rdesktop開發的Open Source 遠端桌面server,可提供使用者連入時提供一個X Window的桌面環境

1) 利用 APT線上安裝: (含有vnc4server xbase-clients xrdp 套件)
sudo apt-get install xrdp
   2) 連線設定: (Setting for Windows RDP client)
   使用下列程式做確認,, # vino-preferences &


 





3) Windows Client 端的 RDP 連線測試:
   開啟「遠端桌面連線」輸入要連線的IP
   Module sesman-Xvnc
   username:輸入「Linux User ID
   password:   輸入「Linux User Password


 

一切順利的話就可以看到 Ubuntu 桌面的畫面了~

4) xrdp 設定檔案:

 /etc/xrdp/xrdp.ini  ,

[globals]

bitmap_cache=yes

bitmap_compression=yes

port=3389

crypt_level=low

channel_code=1

.....

 

[xrdp1]

name=sesman-Xvnc

lib=libvnc.so

username=ask

password=ask

ip=192.168.1.5

port=-1

 

 幾乎不用做更動,我的是只有改IP 

 改完設定記得重新啟動 xrdp 服務,

sudo service xrdp restart

 

5) About Firewall: (注意Port 3350 & 3389有開啟即可)

# iptables -A INPUT -p tcp --dport 3389 -j ACCEPT

 

6) 已知問題:

a. Windows 7 RDP 7.0無法連線?

Ubuntu 10.04內建的xrdp版本是 0.4,需升版至 0.5才可以,

請參考 xrdp 0.5安裝(JYLin's Blog)

 


————————————————

 

 

xrdp

靠! almost got killed by xrdp installation and setup...

簡單來說, xrdp 0.4.1對windows 7、windows 2008 R2內建的遠端連線程式是有問題的, 會顯示協定錯誤. 但是我改成0.5版試了一下(不好找啊), 遠端連線會一直卡住不動.

後來才發現, 因為我在安裝0.4.1時是用make install, 很多東西沒清乾淨 orz
總之流程變成這樣:

1. 先確定原來安裝的0.4版移除乾淨, 用make clean之類的
2. 用 ps 看一下有沒有在執行的xrdp相關程式, 有的話就kill掉
3. 去找0.5版的rpm, 安裝. (在google 打 "xrdp 0.5" 就有很多連結可以抓了, 注意版本啊)
4. 修改 /etc/xrdp/sesman.ini, 把[global]裡面的127.0.0.1改成0.0.0.0
5. 執行 service xrdp start
6. 用遠端連線連進去, 用 vnc server 設定好的帳號密碼就可以登入

VNC的設定可以參考這篇 http://pulipuli.blogspot.com/2008/07/vncserver.html
但是因為我們使用XRDP, 所以防火牆不需要開啟5801, 開3389就可以了.
sesman會開啟port 3350, xrdp會開啟 3389
不要把sesman.ini裡頭[global]的port也改成3389啊!


現在可以用windows server r2 連進去 centos, 可喜可賀~

p.s. 如果說缺libcrypto.so(4)什麼的, 記得安裝openssl097a

 

 

——————————————

 

 

Windows的遠端桌面連到Linux的桌面XRDP

Windows的遠端桌面連到Linux的桌面XRDP

XRDP 是一個開放原始碼的程式模擬微軟 rdp 的服務,提供使用者
在 Linux 下遠端連線的一種選擇,但是他還是架構於 vnc server 之上,
 xrdp 是用來當作中介的伺服器用途.

office site: http://xrdp.sourceforge.net/

(1)server 安裝 xrdp
目前 ubuntu 10.04 對於安裝 xrdp 顯的非常的友善,只要使用 apt-get install xrdp
就可以安裝完成.相依套件的安裝會一併自動安裝到好.

 apt-get install xrdp

(2)設定 vnc  的遠端桌面 ( vino-preferences套件), 你可以從 Gnome 的
system -> Preferences -> Redesktop 找到並啟動. 如果找不到可以
直接在 console 下指令

 vino-preferences

然後就會出現下面設定的視窗了,請一下列圖示設定即可:


遠端桌面 ( vino-preferences套件) 設定畫面
(3) RDP client
接下來就是 RDP client 端的工作了,請開啟你的 RDP client , Windows 稱之為遠端桌面連線
通常藏在附屬應用程式裡面, 然後輸入該 xrdp server ip 就可以連線了..登入畫面如下:




因為 xrdp 是呼叫 vnc 用 127.0.0.1 登入,所以
登入用系統 /etc/passwd 的帳號及密碼就可以登入...故 root 也可以登入 (^^!!!這不是好事)

除了windows 有 rdp 在 linux 上面也有 rdesktop 可以提供遠端連線的服務
http://www.rdesktop.org/

針對 MAC OS M$也有出了 for mac 版本的 rdp client
http://www.microsoft.com/mac/products/remote-desktop/default.mspx

另外 xrdp 在使用時會出現另外一種隱憂,他沒有很方便的連線ip權限控管機制
雖然跑得是 RDP 3189 port 但是只能用 Linux 內建的 netfilter (iptables) 來作限制
相對的很不方便,如果可以支援tcp-wrapper 用hosts.allow and hosts.deny 來限制就會方便許多
 

 

 

___________________________________

 

Connect To Ubuntu 10.04 Lucid Lynx via Remote Desktop Protocol From Windows Machines

This quick tutorial will show you how to easily connect to Ubuntu Lucid or Maverick via Windows Remote Desktop Connection. Since Remote Desktop is already installed on Windows, there’s no need to install additional tools to connect to Ubuntu. Using XRDP Server in Ubuntu, you can no connect to Ubuntu from Windows using Remote Desktop.

 

Getting started:

 

To get started, go to Applications –> Ubuntu Software Center.

 

ubuntu_xrdp_mav_thumb1

 

Then search for and install xrdp.

xrdp

ubuntu_xrdp_mav_1_thumb1

 

After installing, go to Windows and launch Remote Desktop Connection. Type the computer name or IP address and click ‘Connect’

 

ubuntu_xrdp_mav_2_thumb1

 

Enjoy!

 

ubuntu_xrdp_mav_4_thumb1

 

Thanks for reading and please come back soon.

 

 

 

 

 参考:

1、

http://hpclab.cs.pu.edu.tw/wiki/index.php/Xrdp
2、
http://pulipuli.blogspot.com/2008/07/vncserver.html

 

posted @ 2011-08-15 23:25  EricYang  阅读(3602)  评论(0编辑  收藏  举报