CentOS5/CentOS6/CentOS7 install KDE, Xfce graphical interface

Note: It is enough to execute the first or second part (do not execute both), and the third part is to expand and supplement (may not execute)

  1. CentOS5/CentOS6/CentOS7 (general) install KDE graphical interface
    step 1
    yum -y groupinstall "X Window System" "KDE Desktop" "Fonts"
    yum install mariadb tigervnc-server firefox system-config-language wqy-unibit-fonts cjkuni-ukai-fonts
    Step 2: Install xrdp
    First install directly with yum install xrdp, if an error is reported, perform the following steps
    yum install xkeyboard-config xkbcomp pixman libepoxy libXfont2 libxshmfence libgbm libXdmcp libGL -y
    wget ftp://ftp.scientificlinux.org/linux/scientific/7.6/x86_64/os/Packages/xorg-x11-server-common-1.20.1-3.el7.x86_64.rpm``wget ftp://ftp.scientificlinux.org/linux/scientific/7.6/x86_64/os/Packages/xorg-x11-server-Xorg-1.20.1-3.el7.x86_64.rpm
    yum remove xorg-x11-server-common xorg-x11-server-Xorg -y
    rpm -ivh xorg-x11-server-common-1.20.1-3.el7.x86_64.rpm
    rpm -ivh xorg-x11-server-Xorg-1.20.1-3.el7.x86_64.rpm
    yum install xrdp -y
    Step 3
    Execute system-config-language --text to change the language to Chinese
    Or execute the following command
    echo 'export LC_ALL=zh_CN.utf8' >> ~/.bashrc
    source ~/.bashrc

Step 4
① chkconfig xrdp on
② vim /etc/xrdp/xrdp.ini
Remove "#" and modify #port 3389 to port 33899 (or another port between 1025 and 65535)
If there is no ssl_protocols=xxx, then add a line ssl_protocols=TLSv1, TLSv1.1, TLSv1.2 under crypt_level=high
If there is ssl_protocols=xxx, make sure that the right side of the equal sign is TLSv1, TLSv1.1, TLSv1.2
This is very important
③ service xrdp restart
Run netstat -tunlp to check that the remote port is in the listening state, and then you can use mstsc in windows to remote, which is exactly the same as the remote mode of windows server

  1. CentOS5/CentOS6/CentOS7 install Xfce graphical interface
    step 1
    yum groupinstall "Base" "X Window System" "Legacy X Window System Compatibility" "Xfce" "Fonts" "General Purpose Desktop" "Graphical Administration Tools" "Input Methods" "Compatibility Libraries" "Development tools" -y

yum install system-config-language net-tools tigervnc-server wqy-unibit-fonts cjkuni-ukai-fonts ibus ibus-gtk2 ibus-gtk3 ibus-libpinyin im-chooser gtk2-immodule-xim gtk3-immodule-xim firefox -y
Step 2: Install xrdp
Please note that because centos7 has been updated, it was originally xrdp-0.5.0 or xrdp-0.6.1, and now it is xrdp-0.9.8. There will be a series of problems. First download the lower version to install. Although the installation is very smooth, However, centos7 automatically disconnects when entering the desktop when it is remote (the reason is unknown). This method works on centos5 and 6, but not on centos7.
① Install xrdp-0.6.1 in rpm mode (not available on centos7)
wget https://archive.fedoraproject.org/pub/archive/fedora/linux/releases/22/Everything/x86_64/os/Packages/x/xrdp-0.6.1-8.fc22.x86_64.rpm``rpm -ivh xrdp-0.6.1-8.fc22.x86_64.rpm
Other low version links are also posted here, and the test results are the same--centos7 automatically disconnects when entering the desktop when remotely (the reason is unknown)
https://forensics.cert.org/centos/cert/7/x86_64/xrdp-0.5.0-0.13.el7.x86_64.rpm``http://li.nux.ro/download/nux/dextop/el7/x86_64/xrdp-0.6.1-2.el7.nux.x86_64.rpm``http://li.nux.ro/download/nux/dextop/el7/x86_64/xrdp-0.6.1-3.el7.nux.x86_64.rpm``https://archive.fedoraproject.org/pub/archive/fedora/linux/releases/20/Everything/x86_64/os/Packages/x/xrdp-0.6.0-0.8.fc20.x86_64.rpm``https://archive.fedoraproject.org/pub/archive/fedora/linux/releases/21/Everything/x86_64/os/Packages/x/xrdp-0.6.1-5.fc21.x86_64.rpm``https://archive.fedoraproject.org/pub/archive/fedora/linux/releases/22/Everything/x86_64/os/Packages/x/xrdp-0.6.1-8.fc22.x86_64.rpm

②Install xrdp-0.9.8 in yum mode (common for centos5/centos6/centos7)
First install directly with yum install xrdp -y, if an error is reported, perform the following steps
yum install xkeyboard-config xkbcomp pixman libepoxy libXfont2 libxshmfence libgbm libXdmcp libGL -y
wget ftp://ftp.scientificlinux.org/linux/scientific/7.6/x86_64/os/Packages/xorg-x11-server-common-1.20.1-3.el7.x86_64.rpm``wget ftp://ftp.scientificlinux.org/linux/scientific/7.6/x86_64/os/Packages/xorg-x11-server-Xorg-1.20.1-3.el7.x86_64.rpm
yum remove xorg-x11-server-common xorg-x11-server-Xorg -y
rpm -ivh xorg-x11-server-common-1.20.1-3.el7.x86_64.rpm
rpm -ivh xorg-x11-server-Xorg-1.20.1-3.el7.x86_64.rpm
yum install xrdp -y

The high version of xrdp installed by yum may report an error when using mstsc remotely, "An authentication error occurred and the flag provided to the function is invalid" (the original version of win7 image will report this error, but Tencent Cloud 2008 R2 SP1 image does not report this error)

At this point, check the log /var/log/xrdp.log first, and then go to the official website of xrdp to verify, and the corresponding, the root cause of the error has been found

Step 3
Execute system-config-language --text to change the language to Chinese
Or execute the following command
echo 'export LC_ALL=zh_CN.utf8' >> ~/.bashrc
source ~/.bashrc

Step 4

vim /root/.Xclients
#! /bin/bash
XFCE="(which xfce4-session 2>/dev/null)" exec "XFCE"


vim /etc/xrdp/xrdp.ini
Modify #port 3389 to port 33899
If there is no ssl_protocols=xxx, add a line ssl_protocols=TLSv1, TLSv1.1, TLSv1.2 under crypt_level=high
If there is ssl_protocols=xxx, make sure that the right side of the equal sign is TLSv1, TLSv1.1, TLSv1.2
This is very important
chmod +x /root/.Xclients && chkconfig xrdp on && service xrdp restart After performing this step, it can be done remotely, but it is best to restart it for safety reasons (please make sure you have saved the business data before restarting)
If you are sure to restart, you don’t need to execute the command in the previous step, just execute this sentence directly chmod +x /root/.Xclients && chkconfig xrdp on && reboot

  1. Install Chinese fonts in CentOS system (not necessary)
    yum install fontconfig
    mkdir -p /usr/share/fonts/chinese/
    Put the Chinese font files you need in C:\Windows\Fonts into the /usr/share/fonts/chinese/ directory
    You can use the rz command or filezilla client to upload to the server first through the sftp protocol
    Then execute the following 2 sentences
    chmod -R 755 /usr/share/fonts/chinese
    fc-cache -fv
    Then you can use the fc-list command to view the installed fonts

Recommended Posts

CentOS5/CentOS6/CentOS7 install KDE, Xfce graphical interface
Centos8 install xfce graphical interface
Ubuntu12/Ubuntu14/Ubuntu16/Ubuntu18 (general) install Xfce graphical interface
Install KDE on Ubuntu16.04.2