Headless Debian/Ubuntu XFCE4 <---> Windows RDP Working Setup
🖥️ Headless Debian/Ubuntu XFCE4 RDP Setup
Want to access your Linux desktop from Windows 11 via RDP without a monitor? Follow this guide! ✅
1️⃣ Install Packages
sudo apt update sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils xserver-xorg-video-dummy xrdp -y
2️⃣ Configure XFCE4 for xrdp
echo "xfce4-session" > ~/.xsession chmod +x ~/.xsession
3️⃣ Fix startwm.sh
Backup and edit the startup script:
sudo cp /etc/xrdp/startwm.sh /etc/xrdp/startwm.sh.bak sudo nano /etc/xrdp/startwm.sh
Replace content with:
#!/bin/sh unset DBUS_SESSION_BUS_ADDRESS unset XDG_RUNTIME_DIR export XDG_SESSION_TYPE=x11 export DESKTOP_SESSION=xfce export XDG_CURRENT_DESKTOP=XFCE startxfce4
sudo chmod +x /etc/xrdp/startwm.sh
4️⃣ Allow non-root X sessions
sudo nano /etc/X11/Xwrapper.config
Set:
allowed_users=anybody
5️⃣ Create Dummy Virtual Display
sudo nano /etc/X11/xorg.conf
Paste the following:
Section "Device" Identifier "Configured Video Device" Driver "dummy" VideoRam 256000 EndSection Section "Monitor" Identifier "Configured Monitor" HorizSync 5.0 - 1000.0 VertRefresh 5.0 - 200.0 Modeline "1600x900" 85.50 1600 1632 1760 1792 900 921 924 946 EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1600x900" EndSubSection EndSection
6️⃣ Restart xrdp
sudo systemctl restart xrdp
7️⃣ Connect from Windows
- Open Remote Desktop Connection (mstsc.exe)
- Enter your Linux server IP
- Select Xorg session
- Login with Linux credentials
💡 Tips & Troubleshooting
- Adjust resolution in
/etc/X11/xorg.conf
if needed - Check logs:
/var/log/xrdp.log
&/var/log/Xorg.*.log
- Make sure port 3389 is open in firewall
- Black screen? Ensure no other user is logged in; reboot if needed
Now you have a **fully functional headless XFCE4 RDP setup**! 🎉
Komentáře
Okomentovat