# Install xrdp on Fedora 42

## How to Set Up XRDP on Fedora 42 XFCE

Follow these steps for a reliable and quick XRDP setup with XFCE on Fedora 42:

1. **Install XRDP and XFCE (if not already installed)**

```bash
sudo dnf install xrdp xorgxrdp

```

<div class="relative" id="bkmrk-"><div class="prose text-pretty dark:prose-invert inline leading-normal break-words min-w-0 [word-break:break-word]"><div class="w-full md:max-w-[90vw]"><div class="codeWrapper text-textMainDark selection:!text-superDark selection:bg-superDuper/10 bg-offset dark:bg-offsetDark my-md relative flex flex-col rounded font-mono text-sm font-thin"><div class="-mt-xl"><div></div></div></div></div></div></div>**2. Enable and Start XRDP Service**

```bash
sudo systemctl enable --now xrdp
```

<div class="relative" id="bkmrk--1"><div class="prose text-pretty dark:prose-invert inline leading-normal break-words min-w-0 [word-break:break-word]"><div class="w-full md:max-w-[90vw]"><div class="codeWrapper text-textMainDark selection:!text-superDark selection:bg-superDuper/10 bg-offset dark:bg-offsetDark my-md relative flex flex-col rounded font-mono text-sm font-thin"><div class="-mt-xl"><div></div></div></div></div></div></div>**3. Configure the Firewall**

**open Port 3389 for rdp**

<div class="relative" id="bkmrk--2"><div class="prose text-pretty dark:prose-invert inline leading-normal break-words min-w-0 [word-break:break-word]"><div class="w-full md:max-w-[90vw]"><div class="codeWrapper text-textMainDark selection:!text-superDark selection:bg-superDuper/10 bg-offset dark:bg-offsetDark my-md relative flex flex-col rounded font-mono text-sm font-thin"><div class="-mt-xl"><div></div></div></div></div></div></div>**4. Set Up the XFCE Session for XRDP**  
Create a file named `.Xclients` in your home directory with the following content:

 echo "xfce4-session" &gt; ~/.Xclients

```bash
 echo "xfce4-session" > ~/.Xclients
 chmod +x ~/.Xclients
```

<div class="relative" id="bkmrk--3"><div class="prose text-pretty dark:prose-invert inline leading-normal break-words min-w-0 [word-break:break-word]"><div class="w-full md:max-w-[90vw]"><div class="codeWrapper text-textMainDark selection:!text-superDark selection:bg-superDuper/10 bg-offset dark:bg-offsetDark my-md relative flex flex-col rounded font-mono text-sm font-thin"><div class="-mt-xl"><div></div></div></div></div></div></div><div class="relative" id="bkmrk--4"><div class="prose text-pretty dark:prose-invert inline leading-normal break-words min-w-0 [word-break:break-word]"><div class="w-full md:max-w-[90vw]"><div class="codeWrapper text-textMainDark selection:!text-superDark selection:bg-superDuper/10 bg-offset dark:bg-offsetDark my-md relative flex flex-col rounded font-mono text-sm font-thin"><div class="translate-y-xs -translate-x-xs bottom-xl mb-xl sticky top-0 flex h-0 items-start justify-end"><div class="flex items-center min-w-0 font-medium gap-1.5 justify-center"></div></div><div class="-mt-xl"><div></div></div></div></div></div></div><div class="relative" id="bkmrk--5"><div class="prose text-pretty dark:prose-invert inline leading-normal break-words min-w-0 [word-break:break-word]"><div class="w-full md:max-w-[90vw]"><div class="codeWrapper text-textMainDark selection:!text-superDark selection:bg-superDuper/10 bg-offset dark:bg-offsetDark my-md relative flex flex-col rounded font-mono text-sm font-thin"><div class="translate-y-xs -translate-x-xs bottom-xl mb-xl sticky top-0 flex h-0 items-start justify-end"><div class="flex items-center min-w-0 font-medium gap-1.5 justify-center"></div></div><div class="-mt-xl"><div></div></div></div></div></div></div>**6. Restart XRDP Services**

```bash
sudo systemctl restart xrdp
sudo systemctl restart xrdp-sesman
```

<div class="relative" id="bkmrk--6"><div class="prose text-pretty dark:prose-invert inline leading-normal break-words min-w-0 [word-break:break-word]"><div class="w-full md:max-w-[90vw]"><div class="codeWrapper text-textMainDark selection:!text-superDark selection:bg-superDuper/10 bg-offset dark:bg-offsetDark my-md relative flex flex-col rounded font-mono text-sm font-thin"><div class="-mt-xl"><div></div></div></div></div></div></div>**7. Connect via RDP**

<div class="relative" id="bkmrk-use-devolutions-rdm-"><div class="prose text-pretty dark:prose-invert inline leading-normal break-words min-w-0 [word-break:break-word]">- Use Devolutions RDM or any RDP client.
- Enter your Fedora machine's IP address and credentials.

</div></div>**Summary Table**

<div class="relative" id="bkmrk-step-command%2Faction-"><div class="prose text-pretty dark:prose-invert inline leading-normal break-words min-w-0 [word-break:break-word]"><div class="group relative"><div class="w-full overflow-x-auto md:max-w-[90vw] border-borderMain/50 ring-borderMain/50 divide-borderMain/50 dark:divide-borderMainDark/50  dark:ring-borderMainDark/50 dark:border-borderMainDark/50 bg-transparent"><table class="border-borderMain dark:border-borderMainDark my-[1em] w-full table-auto border"><thead class="bg-offset dark:bg-offsetDark"><tr><th class="px-sm py-sm break-normal align-top">Step</th><th class="px-sm py-sm break-normal align-top">Command/Action</th></tr></thead><tbody><tr><td class="border-borderMain px-sm dark:border-borderMainDark min-w-[48px] break-normal border">Install XRDP</td><td class="border-borderMain px-sm dark:border-borderMainDark min-w-[48px] break-normal border">`sudo dnf install xrdp xorgxrdp`</td></tr><tr><td class="border-borderMain px-sm dark:border-borderMainDark min-w-[48px] break-normal border">Enable &amp; start service</td><td class="border-borderMain px-sm dark:border-borderMainDark min-w-[48px] break-normal border">`sudo systemctl enable --now xrdp`</td></tr><tr><td class="border-borderMain px-sm dark:border-borderMainDark min-w-[48px] break-normal border">Firewall open port</td><td class="border-borderMain px-sm dark:border-borderMainDark min-w-[48px] break-normal border">`sudo firewall-cmd --permanent --add-port=3389/tcp; sudo firewall-cmd --reload`</td></tr><tr><td class="border-borderMain px-sm dark:border-borderMainDark min-w-[48px] break-normal border">Configure session</td><td class="border-borderMain px-sm dark:border-borderMainDark min-w-[48px] break-normal border">`echo "xfce4-session" > ~/.Xclients; chmod +x ~/.Xclients`</td></tr><tr><td class="border-borderMain px-sm dark:border-borderMainDark min-w-[48px] break-normal border">(Optional) SELinux fix</td><td class="border-borderMain px-sm dark:border-borderMainDark min-w-[48px] break-normal border">`sudo chcon --type=bin_t /usr/sbin/xrdp*`</td></tr><tr><td class="border-borderMain px-sm dark:border-borderMainDark min-w-[48px] break-normal border">Restart XRDP</td><td class="border-borderMain px-sm dark:border-borderMainDark min-w-[48px] break-normal border">`sudo systemctl restart xrdp xrdp-sesman`</td></tr></tbody></table>

</div></div></div></div>This setup gives you a fast, graphical remote desktop on Fedora XFCE with minimal hassle.