1. Installing XRDP
Accessing a remote Linux desktop using the RDP protocol
In general, if you need to login to a remote Linux system, we will use Ssh/telnet to complete, if we need to login to the remote Linux System desktop environment, we may use VNC.
VNC is the default RfB protocol-based Remote Desktop program for most Linux distributions, but for ordinary users, the user experience of VNC is not good, slower, and requires the installation of a client.
Windows Remote Desktop based on the RDP protocol, under Linux, we can also find open source Rdpserver, this is XRDP.
Below, let me introduce the installation method of installing CentOS under XRDP.
1. First install VNC
Yum Install Tigervnc-server
After the carriage return, there will be a confirmation of the installation, enter Y after the carriage return to install, after the installation is completed back to the command line input cursor, execute
# Vncserver
You are prompted for a verification password, at least 6 bits, which is used when the client connects.
TIP:
Yum VNC error/usr/bin/xvnc:symbol Lookup error resolution when booting
This is because of a version cause font problem, the need to install, update X11 package, or to see the prompt Pixman install this package.
The command is as follows: Yum install Pixman pixman-devel libxfont-y
Modify the configuration file, activate the graphical interface, and execute the command:
# Vi/root/.vnc/xstartup
Comment out this line
#twm &//comment on the line
Add a line at the end
Gnome-session &//Increase the line
Save exit
Execute command
#/etc/init.d/vncserver Start
Or
# service Vncserver Start
Prompt after startup:
Starting VNC SERVER:NO displays configured [FAILED]
Workaround:
Execute command
# vim/etc/sysconfig/vncservers
Modify the last two lines as follows:
Vncservers= "1:root"
vncserverargs[1]= "-geometry 1024x768"
Description
The first behavior service configuration, currently only configured with a VNC service, start with the user root, if you need to use another user login, you can modify the value of vncservers such as: "1:root 2:tiger" (Tiger for the system another presence of users). The second line can be commented, is to configure the window resolution, you need to remove the back of the-localhost
2. Install XRDP, here i download the latest version of the XRDP installation package,
Official website: http://jaist.dl.sourceforge.net/project/xrdp/xrdp/0.6.1/xrdp-v0.6.1.tar.gz
wget http://jaist.dl.sourceforge.net/project/xrdp/xrdp/0.6.1/xrdp-v0.6.1.tar.gz
Unzip and install
TARZXVF xrdp-v0.6.1.tar.gz
cdxrdp-v0.6.1
Installing the Missing library files
Yum install autoconf automake libtool OpenSSL openssl-devel pam-devel libx11-devel libxfixes-devel
./bootstrap
./configure
Make
Make install
3. Set permissions
chmod 755/etc/xrdp/xrdp.sh
4. Start the XRDP service
/etc/xrdp/xrdp.sh start
5. Check if the port is listening (3389)
Netstat–ntl
6. Join the Boot startup item
Vi/etc/rc.local
/etc/xrdp/xrdp.sh start
7. XRDP uses 3389 ports by default, setting firewall allows 3389 port exceptions
Vi/etc/sysconfig/iptables
-A input-m state--state new-m tcp-p tcp--dport 3389-j ACCEPT
Now, we can use XRDP to access the Linux desktop remotely.
Tip: Install Vncserver (because XRDP depends on it, just install it!) )