0% found this document useful (0 votes)
31 views16 pages

How To Access Debian Via Remote Desktop From Windows (XRDP)

This document provides a step-by-step guide on how to access a Debian 12 system via Remote Desktop from a Windows machine using xRDP. It covers prerequisites, installation of the XFCE desktop environment, configuration of xrdp, and setting up the Remote Desktop Connection on Windows. The guide concludes with instructions for connecting to the Debian system and troubleshooting tips for network connections.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views16 pages

How To Access Debian Via Remote Desktop From Windows (XRDP)

This document provides a step-by-step guide on how to access a Debian 12 system via Remote Desktop from a Windows machine using xRDP. It covers prerequisites, installation of the XFCE desktop environment, configuration of xrdp, and setting up the Remote Desktop Connection on Windows. The guide concludes with instructions for connecting to the Debian system and troubleshooting tips for network connections.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)

PHOENIXNAP HOME PRODUCTS  CONTACT SUPPORT NETWORK 


LEARN  Search

How to Access Debian via Remote Desktop from


Windows

October 19, 2023


DEBIAN REMOTE DESKTOP WINDOWS

KB » SysAdmin » How to Access Debian via Remote Desktop from Windows

Introduction
Microsoft developed the Remote Desktop Protocol to streamline and secure connections between remote
Windows machines. However, the technology is not limited to Windows.

The Remote Desktop Connection app allows system administrators to connect to other operating systems,
including Debian, and manage remote workstations and servers.

Learn how to use RDP to connect to a Debian 12 system from Windows.

Accessibility

This site uses cookies. Some of them are


essential, while others help us improve
your experience.

Essential
1 Script | 8 Cookies

Advertising
39 Scripts

Analytics
22 Scripts | 3 Cookies

Entertainment
2 Scripts

Reject All Accept All

Prerequisites
Preferences

https://phoenixnap.com/kb/debian-remote-desktop 1/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)
A client Windows machine with network connectivity.
A host machine with Debian 12 installed.
Sudo or root privileges on the host machine.

How to Connect to Debian 12 via Remote


Desktop (xRDP)
The Debian system needs to be configured to accept incoming RDP connections.

Step 1: Install GUI on Debian 12 (Optional)


Remote servers are typically installed without a graphical interface to streamline deployment and conserve
resources. When connecting from Windows, the RDP client expects the host machine to provide access to a
graphical desktop environment, especially when using RDP servers such as xrdp.

The following steps explain how to install the lightweight XFCE desktop environment on Debian 12:

 Note: This guide focuses on XFCE, but Debian 12 also supports other GUIs and desktop
environments, including GNOME, LXDE, KDE Plasma, and MATE.

1. Access the Debian command line and enter update the package database and upgrade existing packages:

sudo apt update && sudo apt upgrade

2. Use the following command to install XFCE and the xfce4-goodies utility package:

sudo apt install xfce4 xfce4-goodies -y

https://phoenixnap.com/kb/debian-remote-desktop 2/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)

3. Once the installation is complete, reboot the system:

sudo reboot

4. When prompted, enter the Debian user credentials.

You have successfully installed the XFCE desktop environment on Debian 12.

https://phoenixnap.com/kb/debian-remote-desktop 3/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)

Step 2: Install xrdp on Debian


xrdp is an RDP-compatible server for Linux. It listens for incoming RDP connections from clients. The tool is
usually not pre-installed on Debian systems.

To install xrdp on Debian 12:

1. Open the terminal in XFCE and use the following command to install xrdp:

sudo apt install xrdp -y

https://phoenixnap.com/kb/debian-remote-desktop 4/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)
2. Check the status of the xrdp server:

sudo systemctl status xrdp

The output confirms the xrdp server is active.

Step 3: Configure xrdp to use XFCE


Users need to modify the /etc/xrdp/startwm.sh configuration file to allow xrdp to initiate XFCE for incoming
RDP connections.

To configure xrdp to use XFCE:

1. Use a text editor like nano to open the /etc/xrdp/startwm.sh file:

sudo nano /etc/xrdp/startwm.sh

2. Locate the following lines and add a # (hashtag) at the beginning of each line:

test -x /etc/X11/Xsession && exec /etc/X11/Xsession

exec /bin/sh /etc/X11/Xsession

https://phoenixnap.com/kb/debian-remote-desktop 5/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)

This ensures that xrdp starts an XFCE session instead of other potential desktop environments.

 Note: If you have installed alternative desktop environments such as gnome-session or


startlxde, comment out these lines as well.

3. Append the following line to the end of the file. It instructs xrdp to start an XFCE session when an RDP
connection is initiated:

startxfce4

https://phoenixnap.com/kb/debian-remote-desktop 6/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)

4. Press Ctrl+X, followed by y, and then Enter to save the changes and exit the file.

5. Restart the xrdp service:

sudo systemctl restart xrdp

xrdp is now configured to run the XFCE desktop environment by default.

Step 4: Configure xrdp Port (Optional)


The xrdp server monitors incoming RDP connections on port number 3389. Using a different port for RDP
connections is a form of protection through obscurity. It is not a foolproof security measure, but it can protect a
system from brute-force attacks.

To instruct xrdp to listen on a non-standard port:

1. Use nano to edit the xrdp configuration file, xrdp.ini:

sudo nano /etc/xrdp/xrdp.ini

2. Locate the port parameter in the [Globals] section and set the desired value. In this example, the RDP port is
49974:

port=49974

https://phoenixnap.com/kb/debian-remote-desktop 7/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)

3. Press Ctrl+X, followed by y, and then Enter to save the changes and exit the file.

4. Restart the xrdp service to apply the changes:

sudo systemctl restart xrdp

There is no confirmation message or output after the xrdp service is restarted.

Step 5: Open a Port for Incoming Traffic in Firewalld


Debian 12 uses nftables as the default framework for managing network packet filtering rules. Users who want
to configure and manage underlying nftables rules in a user-friendly environment can install firewall
management tools like ufw or firewalld.

To open a specific port for RDP connections in Debian 12:

1. Use the following command to install firewalld:

sudo apt install firewalld -y

https://phoenixnap.com/kb/debian-remote-desktop 8/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)

2. Start and then enable firewalld:

sudo systemctl start firewalld

sudo systemctl enable firewalld

3. Open port 49974 for RDP connections:

sudo firewall-cmd --add-port=49974/tcp --permanent

 Note: Modify the command to open a port of your choice. Ensure that it matches the port
number defined in the xrdp configuration file.

The system displays a success message to confirm the port is open.

 Note: Several tools that can help you check open ports in Linux.

4. Reload firewalld to apply the changes:

sudo firewall-cmd --reload

https://phoenixnap.com/kb/debian-remote-desktop 9/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)
The output confirms the firewall rules have been updated.

 Note: If trying to access the Debian machine from outside its local network, you might need to
configure port forwarding on the router or adjust external firewalls.

Step 6: Set Up Remote Desktop Connection in Windows


To initiate an RDP connection from Windows to a remote Debian system:

1. Type rdp in the Windows search box.

2. Open the Remote Desktop Connection app.

3. Click Show Options to display additional RDP options.

https://phoenixnap.com/kb/debian-remote-desktop 10/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)
4. (Optional) The different tabs in the Remote Desktop Connection app allow users to customize and fine-tune
the RDP session settings for optimal performance. This includes adjusting the screen size and color, devices to
use, etc.

5. Enter the IP address or name of the remote Debian system in the Computer field. If you changed the default
port number for RDP connections on Debian, enter the port number after the IP address in the following format:

IP_address:port_number

For example:

234.432.55.109:49974

 Note: Consult the following article if you need help locating IP addresses in Linux.

6. Type the username of the Debian user for the RDP connection.

https://phoenixnap.com/kb/debian-remote-desktop 11/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)

7. (Optional) Save the connection details for future use.

8. Click Connect.

https://phoenixnap.com/kb/debian-remote-desktop 12/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)

Step 7: Connect to Debian System


Enter the password for the Debian RDP user and click OK.

You can now interact with the Debian machine via the established RDP session.

https://phoenixnap.com/kb/debian-remote-desktop 13/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)

Conclusion
By following the steps in this guide, you have established an RDP session from your Windows system to a
remote Debian machine.

Check out our comprehensive Linux network commands cheat sheet if you need help managing or
troubleshooting network connections on Debian.

Was this article helpful? Yes No

Vladimir Kaplarevic
Vladimir is a resident Tech Writer at phoenixNAP. He has more than 7 years of experience in implementing e-
commerce and online payment solutions with various global IT services providers. His articles aim to instill a
passion for innovative technologies in others by providing practical advice and using an engaging writing style.

Next you should read

SysAdmin, Web
Servers
16 Best Syslog
Servers for Linux
and Windows
March 31, 2022

https://phoenixnap.com/kb/debian-remote-desktop 14/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)

A syslog server
gathers and organizes
log messages from
various devices on the
network. This article
explains what a syslog
server is, its purpose,
and lists examples for
the best free and paid
syslog servers.
READ MORE

Networking
How to Run a
Traceroute on
Linux, Windows &
macOS
August 16, 2021

One of the most


important tools when
troubleshooting
network problems is
Traceroute. The
command traces the
path a packet takes
between the source
and destination,
allowing you to figure
out where the network
issues are.
READ MORE

Networking, SysAdmin
What is ACL in
Networking &
How to Implement
It?
April 21, 2022

The article focuses on


the role of ACLs in
networking. It also
explains ACL
components and
common ACL types
and provides advice on
how best to implement
the ACL on a network.

https://phoenixnap.com/kb/debian-remote-desktop 15/16
24/12/2024, 11:39 How to Access Debian via Remote Desktop from Windows (xRDP)
READ MORE

Networking
Public vs. Private
IP Address:
What's the
Difference
June 14, 2022

This article presents


the differences
between a public and
private IP address.
Compare the two
address types and see
answers to some FAQ
related to the topic.
READ MORE

 Live Chat  Get a Quote  Support | 1-855-330-1509  Sales | 1-877-588-5918

Privacy Center Do not sell or share my personal information


Contact Us
Legal
Privacy Policy
Terms of Use
DMCA
GDPR
Sitemap
©2024 Copyright phoenixNAP | Global IT Services. All Rights Reserved.

https://phoenixnap.com/kb/debian-remote-desktop 16/16

You might also like