How to install Desktop Environment and XRDP service in Debian 9

How to install Desktop Environment and XRDP service in Debian 9

To install a desktop environment and XRDP service on Debian 9, you can follow these steps. In this example, I’ll use the Xfce desktop environment, but you can replace it with your preferred desktop environment.

Step 1: Update Package List

sudo apt update

Step 2: Install Xfce Desktop Environment

sudo apt install xfce4

Step 3: Install XRDP

sudo apt install xrdp

Step 4: Start XRDP Service

sudo systemctl start xrdp

Step 5: Enable XRDP Service to Start on Boot

sudo systemctl enable xrdp

Step 6: Allow Port 3389 Through the Firewall

If you’re using a firewall, make sure to allow traffic on port 3389:

sudo ufw allow 3389

Step 7: Verify XRDP Status

You can check if XRDP is running properly:

sudo systemctl status xrdp

Step 8: Connect to Debian from a Remote Desktop Client

Use a remote desktop client (such as Remote Desktop Connection on Windows or Remmina on Linux) to connect to your Debian server using the server’s IP address.

When prompted, enter your Debian username and password.

Additional Notes:

  • If you face any issues connecting to XRDP, you might need to add your user to the ssl-cert group:
    sudo adduser your_username ssl-cert
  • If you encounter a blank screen after connecting, you may need to create or edit the .xsession file in your home directory:
    echo "xfce4-session" > ~/.xsession
  • For security reasons, it’s advisable to use SSH tunneling or a VPN when accessing your remote desktop.

Please adapt these instructions based on your specific requirements and preferences.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.