Skip to content

Instantly share code, notes, and snippets.

@R0GGER
Last active April 4, 2025 11:02
Show Gist options
  • Save R0GGER/ff39de853003c25d078cf9ead78bfba8 to your computer and use it in GitHub Desktop.
Save R0GGER/ff39de853003c25d078cf9ead78bfba8 to your computer and use it in GitHub Desktop.
Rustdesk - install oneliner

RustDesk Installation Script

This script provides an easy way to install and uninstall RustDesk on Debian-based Linux systems (Ubuntu, Linux Mint, etc.).

Features

  • Automatic detection of the latest RustDesk version
  • Architecture detection (x86_64, aarch64, etc.)
  • Handles all dependencies
  • Supports both install and uninstall

Requirements

  • Debian-based Linux system
  • Root privileges (sudo)
  • Internet connection

Usage

Install

To install the latest version of RustDesk, run:

sudo wget -O - https://gist.githubusercontent.com/R0GGER/ff39de853003c25d078cf9ead78bfba8/raw/6fee04063f0b74901d71e866fbfd122bc84da06b/rustdesk.sh | bash

Uninstall

To remove RustDesk from your system, run:

sudo wget -O - https://gist.githubusercontent.com/R0GGER/ff39de853003c25d078cf9ead78bfba8/raw/6fee04063f0b74901d71e866fbfd122bc84da06b/rustdesk.sh | bash -s uninstall

What the script does

Install:

  1. Checks for root privileges
  2. Fetches the latest RustDesk version from GitHub
  3. Installs required dependencies
  4. Downloads and installs the RustDesk package
  5. Cleans up temporary files

Uninstall:

  1. Removes RustDesk package
  2. Removes any unused dependencies

Support

For RustDesk related issues, please visit the RustDesk GitHub repository.

#!/bin/bash
# If not running with sudo, restart the script with sudo
if [ "$EUID" -ne 0 ]; then
echo "Requesting sudo privileges..."
exec sudo "$0" "$@"
exit $?
fi
ARCH=$(uname -m)
VERSION=$(curl -s https://api.github.com/repos/rustdesk/rustdesk/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' || echo "1.3.9")
URL="https://github.com/rustdesk/rustdesk/releases/download/$VERSION/rustdesk-$VERSION-$ARCH.deb"
echo "RustDesk version: $VERSION"
# Check for uninstall parameter
if [ "$1" = "uninstall" ]; then
echo "Uninstalling RustDesk..."
apt-get remove -y rustdesk
apt-get autoremove -y
echo "RustDesk $VERSION has been successfully uninstalled from your system!"
exit 0
fi
echo "Installing RustDesk dependencies..."
apt-get update
apt-get install -y curl libxdo3 desktop-file-utils gnome-menus hicolor-icon-theme
# Download RustDesk
echo "Downloading RustDesk..."
curl -L -o /tmp/rustdesk.deb $URL
# Install RustDesk
echo "Installing RustDesk..."
dpkg -i /tmp/rustdesk.deb
# Fix any potential dependency issues
apt-get install -f -y
# Clean up
rm /tmp/rustdesk.deb
echo "RustDesk $VERSION has been successfully installed! You can now start RustDesk from your applications menu."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment