Skip to main content

⚡ Linux Desktop Manager (linux-desktop-manager)

All-In-One Linux Desktop Environment & Remote Access Orchestrator
Interactive Arrow-Key TUI Menu, Full CLI Automation, 14 Desktops, 6 Remote Protocols, and Built-In TunnelMate Cloudflare Ingress.

Author: Shashan Lumbhani
License: MIT
Supported Distros: Ubuntu, Debian, RHEL, Fedora, Rocky Linux, AlmaLinux, Arch Linux, CachyOS, openSUSE, Alpine Linux
Environments: Bare-Metal & Cloud VMs (Systemd) + Docker/LXC/Colab Containers (Non-Systemd)
Ingress Engine: Powered by TunnelMate (tunnelmate-cli)


🚀 Features

  • 🎯 Interactive Arrow-Key TUI Menu: Built with questionary and rich for seamless keyboard navigation over SSH.
  • 🖥️ 14 Desktop Environments & Window Managers:
    • Full Desktops: XFCE4 (Recommended), KDE Plasma, GNOME Shell, MATE, Cinnamon, LXQt, LXDE, Budgie, Deepin (DDE), Enlightenment.
    • Lightweight & Tiling WMs: i3wm, Openbox, IceWM, Fluxbox.
  • 🌐 6 Remote Access Protocols & Web Consoles:
    • XRDP Server (Port 3389): Microsoft Remote Desktop (mstsc.exe, Remmina, macOS RDP).
    • OpenSSH Server + X11 Forwarding (Port 22): Secure terminal with remote GUI application forwarding.
    • TigerVNC Server (Port 5901): Display :1 RFB protocol for standard VNC viewers.
    • noVNC HTML5 Web Desktop (Port 6080): Zero-install browser desktop over WebSocket.
    • X2Go Server (Port 22): Low-bandwidth high-speed remote session over SSH.
    • Cockpit Web Console (Port 9090): Modern web administration console.
  • ⚡ Built-In Public Cloud Ingress (Powered by TunnelMate):
    • TunnelMate Cloudflare TCP Tunnel (Windows RDP Port 3389): Exposes Microsoft Remote Desktop over Cloudflare TCP protocol. Connect with cloudflared access rdp --hostname <host> --url localhost:3389 and mstsc.exe.
    • TunnelMate Cloudflare HTTP Tunnel (Browser noVNC Port 6080): Instantly generates public HTTPS links (https://*.trycloudflare.com/vnc.html) for noVNC browser desktop.
  • 🛡️ Integrated Security & Firewall: 1-click port inspection and opening for UFW & Firewalld.
  • 👤 Multi-User & Session Manager: Automatic setup of ~/.xsession, ~/.xsessionrc, Polkit colord popup suppression, and DBus daemon handling.
  • 🧹 Complete Clean Wipe: Option to safely purge remote desktop services and restore server to clean state.

📦 Installation & Setup

Option 1: Install from PyPI

pip install linux-desktop-manager

Option 2: Install from Source

git clone https://github.com/shashansoni/linux-desktop-manager.git
cd linux-desktop-manager
pip install -e .

🎮 Usage

1. Interactive Arrow-Key TUI Menu (Default)

Launch the full interactive terminal menu with:

sudo linux-desktop-manager
# or short alias:
sudo ldm

Use your Up/Down arrow keys, Space to toggle checklist items, and Enter to select.


2. Command-Line (CLI) Automation

You can also use linux-desktop-manager in headless scripts, cloud deployment pipelines, and Docker containers:

# View real-time status of services, active DE, and listening ports:
sudo linux-desktop-manager --status

# Install a desktop environment:
sudo linux-desktop-manager --install-de xfce4

# Switch default active session for user:
sudo linux-desktop-manager --set-de xfce4 --user myuser

# Manage individual services:
sudo linux-desktop-manager --start xrdp
sudo linux-desktop-manager --stop xrdp
sudo linux-desktop-manager --restart tigervnc
sudo linux-desktop-manager --install-service novnc

# Control public cloud tunnels:
sudo linux-desktop-manager --tunnel rdp      # Start TunnelMate Cloudflare TCP tunnel for Windows RDP (Port 3389)
sudo linux-desktop-manager --tunnel cf       # Start TunnelMate Cloudflare HTTPS browser tunnel (Port 6080)
sudo linux-desktop-manager --tunnel stop     # Stop all public tunnels

# Open all remote desktop ports in firewall:
sudo linux-desktop-manager --allow-ports

# Clean wipe all remote desktop components:
sudo linux-desktop-manager --purge-all

🐍 Python Library API

You can import linux_desktop_manager directly in your Python projects and orchestration scripts:

from linux_desktop_manager import (
    ServerEnv,
    DesktopEnvManager,
    RemoteServiceManager,
    TunnelManager,
    FirewallManager,
    UserManager
)

# 1. Inspect Server Environment
env = ServerEnv()
print("OS:", env.os_info["pretty_name"])
print("Package Manager:", env.pkg_mgr)
print("Runtime Mode:", env.env_type)
print("Listening Ports:", env.get_listening_ports())

# 2. Manage Desktop Environments
de_mgr = DesktopEnvManager(env)
de_mgr.install_desktop("xfce4", target_user="ubuntu", set_as_default=True)

# 3. Manage Remote Services
svc_mgr = RemoteServiceManager(env)
svc_mgr.install_service("xrdp", target_user="ubuntu")
svc_mgr.start_service("xrdp")

# 4. Manage Cloudflare Tunnels (Powered by TunnelMate)
tunnel_mgr = TunnelManager()

# Browser noVNC HTTP Ingress
url = tunnel_mgr.start_cloudflare_tunnel(port=6080)
print(f"Web Browser Desktop URL: {url}/vnc.html")

# Windows RDP TCP Ingress
rdp_url = tunnel_mgr.start_rdp_tcp_tunnel(port=3389)
print(f"Windows RDP Cloudflare TCP Address: {rdp_url}")

📄 License

This project is licensed under the MIT License. Created by Shashan Lumbhani.

Metadata

Release files for linux-desktop-manager 1.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for linux-desktop-manager 1.0.8
File Size Uploaded
linux_desktop_manager-1.0.8.tar.gz 43.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for linux-desktop-manager 1.0.8
File Interpreter ABI Platform
linux_desktop_manager-1.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 89.0 kB

Release files / linux_desktop_manager-1.0.8.tar.gz

Download URL linux_desktop_manager-1.0.8.tar.gz
Size 43.3 kB
Tags Source
SHA-256 checksum
How to use checksums
20bab926e0e14e1e637ba141477616a646d9f52be693199ab0e7bea4e80f0085
BLAKE2b-256 checksum
How to use checksums
471b0af1f05b2763364196ad55322ca6195bd9c614d710525a7feed6cfea7d79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / linux_desktop_manager-1.0.8-py3-none-any.whl

Download URL linux_desktop_manager-1.0.8-py3-none-any.whl
Size 45.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9b678f00717a8ab3c95657baf5dfdba07f1a979cc3e777d7aceef01bf8347c9
BLAKE2b-256 checksum
How to use checksums
df84f702303a206409bd35a0105ba020a1b0a436b2ceba6f6ebde4392ee89b75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

1.0.9

2 release files

This release

1.0.8 This release

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page