網頁

2014年4月13日 星期日

XRDP --- How to install XRDP 0.9.0 + XVNC 1.1.0 on CentOS 6.x x64 minimal version

XRDP(http://www.xrdp.org/)is an open source RDP server for X11 and it present a GUI screen to remote user by using remote desktop protocol.
If we want to connect it from Windows platform to XRDP, the XRDP have to add Xvnc or X11rdp package so that it can display a Windows desktop to Windows user by Microsoft remote desktop client.
How to build it? The following process will descript it roughly.

At first, we have to install some package as follows for compiling the XRDP package laterScreenHunter_02and also install X.Org X11 libXrandr development package (# 1)ScreenHunter_17
Install VNC Server packageIf we don’t have a vncserver package installed on this host, we have to install it by using the yum commandScreenHunter_03
Install GNOME X Window System
For adding the GNOME Desktop environment to the CentOS Minimal platform, we have to use the yum groupinstall “X Window System” “Desktop” “Fonts” command (# 2)ScreenHunter_06
Assign VNC Permission
In Linux environment, we will choose one normal account as davidwa and supper account as root for delegating the individual VNC permission.
For assigning VNC User privilege, we have to switch the current logon session to another user as davidwa account. Once the user has already existed (# 3), we will set the password used to access VNC server by using the vncpasswd command.ScreenHunter_25So does that the password file name will be to $HOME/.vnc/passwd by default.ScreenHunter_26
Configure & Start VNC ServerIf the single user will log on this VNC Server remotely, we will make the following change at the end of the /etc/sysconfig/vncservers file.ScreenHunter_27If the multi-user will log on it, the file will be changed as followsScreenHunter_30When the vnc user has a vnc password (# 4) and the /etc/sysconfig/vncservers file is configured correctly, we can start the VNC service by using the service vncservers start command.ScreenHunter_31
Install XRDP Server
To download and extract the newest xrdp-master.zip from https://github.com/FreeRDP/xrdp ScreenHunter_09or get the related file by using git clone git://github.com/FreeRDP/xrdp.git commandScreenHunter_11
If we download it by git method, we will go to the xrdp subfolder next to run the bootstrap command (# 5)ScreenHunter_13configure commandScreenHunter_14make commandScreenHunter_15make install commandScreenHunter_18So do that we have already finish installing the XRDP process.

Configure & Start XRDP Server
To create two groups as ts-users and ts-admins for assigning the normal permission to the specific account.ScreenHunter_21also need to map these groups to TerminalServerUsers & TerminalServerAdmins in the /etc/xrdp/sesman.ini fileScreenHunter_95
To confirm Xvnc listening port 5901 by using the netstat -tunlp | grep Xvnc commandScreenHunter_94correct port=5901 in the [xrdp2] content of the /etc/xrdp/xrdp.ini file (# 6)ScreenHunter_96Now we will start the Xrdp daemon by using /etc/xrdp/xrdp.sh start commandScreenHunter_70
Change firewall Rule
To edit the iptables rule for adding the port 3389 to the INPUT list by using the iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3389 -j ACCEPT commandScreenHunter_99Don’t forget to save the iptables rule and restart it for applying the new rule right now.ScreenHunter_100
Test Xrdp from Windows platform
Before using Remote Desktop Connection from Windows platform, please confirm whether the remote desktop has already been enabled in the CentOS platform.
If no, open a terminal next to type the following commandScreenHunter_91Once the above procedure complete, we can use RDP client to connect to XRDP server. When the XRDP login windows show up, we need to change the sesman-Xvnc module and enter the username as davidwa and password.ScreenHunter_85If the authentication pass, the desktop will show up in a few seconds.
ScreenHunter_98

Reference:
(# 1).   If no exit this package, it will fail to do make process for XRDP later.ScreenHunter_16(# 2).   If we want to switch boot mode from CLI to GUI, we have to change some value id:5:initdefault: in the /etc/inittab file as follow:  ScreenHunter_07(# 3).   If the Linux user does not exist, we can create it by using the useradd commandScreenHunter_23 and set the password by using the passwd commandScreenHunter_24 (# 4).   If the vnc user has no a vnc password, the VNC service will not be started.
ScreenHunter_29(# 5).   If there is no execution right in these files as bootstrap and configure , we have to assign it by using the chmod u+x bootstrap and chmod u+x configure commandScreenHunter_20(# 6).   If the port number is not correct, maybe we will get the following error messageScreenHunter_86

沒有留言:

張貼留言

Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.