Skip to content

kogulan/ubuntu-xrdp-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

🖥️ Ubuntu Remote Desktop Setup Script (XFCE + XRDP + VS Code + LibreOffice)

This Bash script automates the setup of a lightweight Ubuntu desktop environment with XRDP remote access, browsers, productivity tools, and firewall rules on Ubuntu 22.04.

🚀 Features

  • Installs the XFCE desktop environment (lightweight and fast)
  • Sets up XRDP for Remote Desktop access
  • Installs:
    • Firefox and Chromium web browsers
    • LibreOffice suite
    • Visual Studio Code
  • Creates a new sudo user for RDP access
  • Configures firewall (UFW) for SSH and RDP
  • Cleans up unnecessary desktop packages

📋 Prerequisites

  • Ubuntu 22.04 (fresh installation recommended)
  • Internet connection
  • Run as a user with sudo privileges

🛠️ How to Use

1. Clone or Download

git clone https://github.com/kogulan/ubuntu-xrdp-setup.git
cd ubuntu-xrdp-setup

Or simply download and run the script:

wget https://yourdomain.com/setup-xrdp-xfce.sh
chmod +x setup-xrdp-xfce.sh

2. Run the Script

Run the script with sudo privileges:

sudo ./setup-xrdp-xfce.sh

The script will prompt you to:

  • Enter a username for the new RDP user (or press Enter to use the default kogulan).
  • Confirm that you want to proceed with the installation.
  • Set a password for the new user.

The script will then automate the entire setup process, including cleaning old packages, installing the desktop and applications, and configuring the firewall.


🖥️ Remote Desktop Login

Use any RDP client (like Remote Desktop Connection on Windows or Remmina on Linux/macOS):

  • Host/IP: (shown at the end of the script)
  • Port: 3389
  • Username: kogulan (or your custom value)
  • Password: StrongPass123 (or your custom value)

Example:

Username: kogulan
Password: StrongPass123
RDP Address: 203.0.113.15:3389

🔒 Security Warning

Do not use weak passwords for remote access. It’s strongly recommended to:

  • Use SSH key-based login instead of passwords (for SSH)
  • Change the password after logging in
  • Use fail2ban or other brute-force protection if exposed to the internet

🧹 Uninstallation (Optional)

To remove all installed components:

sudo apt purge -y xfce4 xfce4-goodies xrdp firefox chromium libreoffice code
sudo apt autoremove -y

📄 Example Output

[*] Cleaning up previously installed desktop environments...
[*] Updating system...
[*] Installing XFCE Desktop Environment...
[*] Installing XRDP...
[*] Creating user 'kogulan'...
[*] Installing Firefox and Chromium browsers...
[*] Installing LibreOffice office suite...
[*] Installing Visual Studio Code...
[*] Setting up UFW firewall rules...

✅ XRDP with XFCE, LibreOffice, and VS Code is ready on Ubuntu 22.04!
🌐 Browsers: Firefox, Chromium
📝 Office: LibreOffice
💻 Editor: Visual Studio Code
🔐 RDP Login: kogulan / StrongPass123
🌍 Connect: 203.0.113.15:3389

📦 Tested On

  • ✅ Ubuntu 22.04 LTS (64-bit)

📬 Issues & Contributions

Feel free to open an issue or submit a pull request to improve the script or add support for additional configurations!


🧑‍💻 Author

Kogulan
Feel free to customize and use in your own deployment workflows.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages