arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CentOS 7/8 with XFCE & XRDP
#1
CentOS 7/8 with XFCE & XRDP


Welcome to my brief installation guide for XRDP and the XFCE desktop environment on a CentOS 7 or 8 Core system ("Core" equals a command line system without a GUI). This guide has been made using two Hyper-V VMs running CentOS 7 and 8 Core minimal as their OSs in a local network environment. Thus both VMs didn't have a dedicated WAN address. This does differ greatly from a server with a dedicated WAN address in terms of the necessary changes to the firewall and port unlocking. When possible I will provide necessary commands that apply to the firewall on a server to unlock the right port(s).

Depending on the virtualization technology you are using you might not have a different experience. I'm not responsible for bricked systems. I recommend to perform this installation on a clean and up to date system.

Let's get started.


  1. Connect to your system and login as root or a user with sudo access. I'm using SSH to access my systems.

    Please keep in mind: if you are logged in as a user with sudo access you will have to use sudo before any of the commands displayed below where necessary (e.g. when installing packages).

  2. Update your system to the latest version using the command below.

    Command
    yum update -y

    A personal recommendation: reboot your system after updating it to the latest versions to apply all changes and after that continue with the next step.

  3. Now we will perform the installation of XFCE. XFCE is not included in the CentOS software repos. Therefore we have to enable the included EPEL repos from Fedora to get XFCE and be able to install many other additional packages that aren't available in CentOS by default.

    Enable the EPEL repos using this commands:
    yum install -y epel-release
    yum update -y

    Now install XFCE with all necessary packages using this command:
    yum groupinstall -y "Xfce"

    The download and installation of all packages will a take a bit. Let it run and wait for it to finish.

  4. At this point we're going to install the XRDP remote access system to be able to access our system via RDP.

    Install XRDP using the commands below:
    yum install -y xrdp
    systemctl enable xrdp
    systemctl start xrdp

    On a server you need to open the RDP port using this commands:
    firewall-cmd --add-port=3389/tcp --permanent
    firewall-cmd --reload

    XRDP is now installed and running as a service.

  5. Now we need to create a configuration file for each user on your system that should be able to access the system via XRDP. This configuration file will tell the XRDP server what to do when the specific user connects to it. In this case it will launch the XFCE session.

    Run this commands as every user that should be able to connect via XRDP:
    echo "xfce4-session" > ~/.Xclients
    chmod a+x ~/.Xclients

    Once that is done you can attempt to connect to your server with a RDP client.

  6. Start your RDP client ("Remote Desktop Connection" on Windows), enter the IP address of your system and hit enter to connect to your system.

    When you get a security message regarding the server certificate simply tick the box to never ask about this again and confirm that you want to connect. I cannot provide a screenshot for this sadly as my OS is in Germany and not English.

  7. You will end up at the login screen of XRDP. There you have to login with the user information of a user on your system that is setup to login via XRDP.

    Just type in the username and password.

    Screenshot
    [Image: b9WcGVO.png]

  8. You will now see a XFCE environment. At the first connection you will see a popup that will ask you how you want to initialize XFCE on your system. Click on "Use default panel".

    Screenshot
    [Image: yVLpwNn.png]

    This will create a default XFCE configuration with a panel at the top and a quick launch bar at the bottom.

    Screenshot
    [Image: cipNt8d.png]

    I noticed that on CentOS 8 you will not be asked how to initialize XFCE on your system. It will by default initalize XFCE with the default configuration. There is not a big difference. A newer XFCE version with a few changes in the UI.

    Screenshot: https://i.imgur.com/XaGjbns.png


That's it folks. Now you have a CentOS 7 or 8 system with the XFCE desktop environment and you can connect to it using the RDP protocol and RDP clients that are usually all built into Windows by default already. A great RDP client for Linux is Remmina.
[Image: zHHqO5Q.png]
#2
Excellent tutorial @"Hidden Refuge". I'm sure it'll be a blessing for first time Linux Desktop users.

In future, I can also use this post for reference. Also, I just connected to the desktop and I must say, XFCE is so light and wonderful. Doesn't lag like GNOME. In fact, I could hardly use GNOME. It took forever to display the applications menu. I think it isn't meant for VPSes, probably servers running CentOS are more suited for it. The reason I have this feeling, is that 8GB RAM and 2 CPUs are good enough to run the desktop on the VPS, in consideration of the fact that GNOME was the first thing I installed on my VPS.

Once again, thanks for the tutorial, a positive reputation from me. Smile

Regards,
Sayan Bhattacharyya,

Heartiest thanks to Post4VPS and Virmach for my wonderful VPS 9!
#3
Thank you for the tutorial!

I first installed this on VPS 6, I couldn't connect and the connection was immediately closed!

Btw, how to install xRDP in a KDE environment?
Terminal
Solo Developer
#4
@chanalku91

KDE with XRDP would be pretty much the same installation process with two differences:
  • KDE environment needs to be installed instead of the XFCE environment
    yum groupinstall -y "KDE Plasma Workspaces"
  • KDE session needs to be started via the Xclients file instead of a XFCE session
    echo "startkde" > ~/.Xclients
[Image: zHHqO5Q.png]


Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
6,380
12-16-2019, 06:52 AM
Last Post: youssefbasha

person_pin_circle Users browsing this thread: 3 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting