A comprehensive desktop environment setup script that supports multiple operating systems, desktop environments, and connection methods. Perfect for setting up remote desktop environments in GitHub Codespaces, containers, or virtual machines.
- Ubuntu 22.04 LTS - Stable and user-friendly (~500MB)
- Kali Linux Rolling - Penetration testing focused (~1.5GB)
- Arch Linux - Bleeding edge and customizable (~800MB)
- Debian 12 Bookworm - Rock solid stability (~400MB)
- XFCE - Lightweight and fast (~200MB)
- GNOME - Modern and feature-rich (~800MB)
- KDE Plasma - Highly customizable (~1GB)
- Hyprland - Modern Wayland compositor (~300MB)
- i3 - Tiling window manager (~150MB)
- Cinnamon - Traditional desktop (~600MB)
- MATE - Classic GNOME 2 fork (~400MB)
- LXDE - Extremely lightweight (~150MB)
- Openbox - Minimalist window manager (~100MB)
- noVNC - Web-based VNC client (browser access)
- VNC - Traditional VNC protocol
- RDP - Remote Desktop Protocol
- SSH - Secure Shell terminal access
- X11VNC - X11 screen sharing
chmod +x ubuntu-gui-master.sh./ubuntu-gui-master.shThat's it! The script will guide you through a 5-step wizard to configure everything.
./ubuntu-gui-master.sh setupor simply:
./ubuntu-gui-master.shThe wizard will ask you to:
- Choose Operating System (Ubuntu, Kali, Arch, Debian)
- Select Desktop Environment (XFCE, GNOME, KDE, etc.)
- Configure User Account (username and password with root privileges)
- Choose Connection Methods (noVNC, VNC, RDP, SSH, X11VNC)
- Confirm Installation (review your choices before proceeding)
# Check service status
./ubuntu-gui-master.sh status
# Check D-Bus diagnostics
./ubuntu-gui-master.sh dbus
# Start all configured services
./ubuntu-gui-master.sh start
# Stop all services
./ubuntu-gui-master.sh stop
# Restart all services
./ubuntu-gui-master.sh restart
# Show help
./ubuntu-gui-master.sh helpChoose from:
- Ubuntu 22.04 LTS - Best for general use, stable and reliable
- Kali Linux - Perfect for penetration testing and security research
- Arch Linux - For advanced users who want cutting-edge packages
- Debian - Rock-solid stability for production environments
- XFCE - Recommended for beginners, fast and lightweight
- GNOME - Modern interface with lots of features
- KDE - Highly customizable with beautiful animations
- i3/Hyprland - For power users who prefer tiling window managers
- Enter a username (lowercase letters, numbers, hyphens, underscores)
- Set a secure password (minimum 6 characters)
- User will automatically get root privileges via sudo
- noVNC (Recommended) - Access through web browser, no additional software needed
- VNC - Use traditional VNC clients like RealVNC or TigerVNC
- RDP - Connect using Windows Remote Desktop or similar clients
- SSH - Terminal access for command-line work
- X11VNC - Share existing X11 sessions
After setup, access your desktop at:
https://[codespace-name]-6080.app.github.dev/vnc.html
Connect to:
Server: [codespace-name]-5901.app.github.dev:5901
Connect to:
Server: [codespace-name]-3389.app.github.dev:3389
Username: [your-username]
Password: [your-password]
ssh -p 2222 [username]@[codespace-name]-2222.app.github.dev# Choose Ubuntu + XFCE + noVNC for lightweight development
./ubuntu-gui-master.sh
# Select: Ubuntu β XFCE β your-username β noVNC# Choose Kali Linux + XFCE + All connection methods
./ubuntu-gui-master.sh
# Select: Kali β XFCE β your-username β All Methods# Choose Ubuntu + KDE + VNC for best graphics support
./ubuntu-gui-master.sh
# Select: Ubuntu β KDE β your-username β VNC + noVNC- OS: Debian or Ubuntu
- Desktop: XFCE or LXDE
- Connection: noVNC only
- Total RAM: ~1GB
- OS: Ubuntu
- Desktop: GNOME or KDE
- Connection: All methods
- Total RAM: ~2-3GB
- OS: Kali Linux
- Desktop: XFCE
- Connection: SSH + VNC
- Extra Tools: Yes
# Check current status
./ubuntu-gui-master.sh status
# Try restarting services
./ubuntu-gui-master.sh restart- Verify services are running:
./ubuntu-gui-master.sh status - Check if ports are open in your environment
- Try different connection methods
# Stop all services and reconfigure
./ubuntu-gui-master.sh stop
./ubuntu-gui-master.sh setupIf you experience issues with desktop components not working properly after connecting via noVNC:
# Check D-Bus status and diagnostics
./ubuntu-gui-master.sh dbus
# View D-Bus debug logs
cat /tmp/vnc-dbus-debug.log
cat /tmp/vnc-xfce-debug.logCommon D-Bus fixes:
- The script automatically handles D-Bus session setup
- Machine ID is created automatically if missing
- User systemd services are configured when available
- Debug logs are available to help identify specific issues
The script requires sudo privileges. Make sure you can run:
sudo apt update- VNC server (TigerVNC)
- noVNC web interface
- SSH server
- RDP server (XRDP)
- Basic development tools
- XFCE: File manager, terminal, text editor, Firefox
- GNOME: Full GNOME shell, applications, and utilities
- KDE: Plasma desktop, Dolphin, Konsole, Kate
- Kali: Security tools, penetration testing suite
- Nmap, Wireshark, Burp Suite
- Metasploit Framework
- SQLMap, Nikto, Dirb
- Aircrack-ng, John the Ripper
- And many more...
- User accounts are created with sudo privileges
- SSH password authentication is enabled
- VNC connections are password-protected
- RDP connections use user authentication
- All services run on non-standard ports for security
Feel free to submit issues, feature requests, or pull requests to improve this script!
This project is open source and available under the MIT License.
Happy Desktop Computing! π
For more help, run: ./ubuntu-gui-master.sh help