RustDesk - Open-Source Remote Desktop Setup with Sciter GUI

RustDesk - Open-Source Remote Desktop Setup with Sciter GUI

This guide provides step-by-step instructions for building the RustDesk project using the Sciter GUI. Sciter is a simple and beginner-friendly graphical user interface framework. While RustDesk also supports Flutter for GUI, this guide focuses exclusively on Sciter.

Prerequisites

Before starting, ensure you have the following:

  1. Rust Development Environment: Install Rust using rustup.

  2. C++ Build Environment: Install essential C++ tools (e.g., GCC, Clang, or MSVC depending on your OS).

  3. Vcpkg: Install and configure vcpkg for dependency management.

  4. Sciter Dynamic Library: Download the appropriate Sciter library for your platform from the official website.

Building on Windows

1. Install Dependencies

  • Install required libraries using vcpkg:

vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static opus:x64-windows-static aom:x64-windows-static

2. Run the Build

  • Clone the RustDesk repository:

git clone https://github.com/rustdesk/rustdesk

cd rustdesk

  • Run the application:

cargo run

Building on Linux

1. Install System Packages

Ubuntu/Debian:

sudo apt install -y zip g++ gcc git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev \

    libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake make \

    libclang-dev ninja-build libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libpam0g-dev

openSUSE:

sudo zypper install gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang libxcb-devel libXfixes-devel cmake alsa-lib-devel gstreamer-devel gstreamer-plugins-base-devel xdotool-devel pam-devel

Fedora/CentOS:

sudo yum -y install gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang libxcb-devel libxdo-devel \

    libXfixes-devel pulseaudio-libs-devel cmake alsa-lib-devel gstreamer1-devel gstreamer1-plugins-base-devel pam-devel

Arch/Manjaro:

sudo pacman -Syu --needed unzip git cmake gcc curl wget yasm nasm zip make pkg-config clang gtk3 xdotool \

    libxcb libxfixes alsa-lib pipewire

2. Install Vcpkg and Dependencies

  • Clone and bootstrap vcpkg:

git clone https://github.com/microsoft/vcpkg

cd vcpkg

git checkout 2023.04.15

./bootstrap-vcpkg.sh

export VCPKG_ROOT=$HOME/vcpkg

  • Install required libraries:

$VCPKG_ROOT/vcpkg install libvpx libyuv opus aom

3. Fix libvpx for Fedora (if needed)

cd $VCPKG_ROOT/buildtrees/libvpx/src/*

./configure

sed -i 's/CFLAGS+=-I/CFLAGS+=-fPIC -I/g' Makefile

sed -i 's/CXXFLAGS+=-I/CXXFLAGS+=-fPIC -I/g' Makefile

make

cp libvpx.a $VCPKG_ROOT/installed/x64-linux/lib/

4. Build and Run RustDesk

  • Clone the RustDesk repository:

git clone https://github.com/rustdesk/rustdesk

cd rustdesk

  • Set up Sciter library:

mkdir -p target/debug

wget https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.lnx/x64/libsciter-gtk.so

mv libsciter-gtk.so target/debug/

  • Run the application:

VCPKG_ROOT=$HOME/vcpkg cargo run

Building on macOS

Steps:

1.Install dependencies using vcpkg:

$VCPKG_ROOT/vcpkg install libvpx libyuv opus aom

2.Clone the RustDesk repository and build it as described in the Linux section.

Building with Docker

Steps:

1.Clone the repository and build the Docker container:

git clone https://github.com/rustdesk/rustdesk

cd rustdesk

docker build -t "rustdesk-builder" .

2.Build the application using Docker:

docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user/.cargo/git \

    -v rustdesk-registry-cache:/home/user/.cargo/registry \

    -e PUID="$(id -u)" -e PGID="$(id -g)" rustdesk-builder --release

3.The resulting executable will be available in target/release/rustdesk.

File Structure Overview

Directory/File

Description

libs/hbb_common

Video codec, config, TCP/UDP wrapper, protobuf, file transfer utilities

libs/scrap

Screen capture functionality

libs/enigo

Platform-specific keyboard/mouse control

libs/clipboard

File copy-paste implementation for Windows, Linux, macOS

src/ui

Deprecated Sciter UI code

src/server

Audio, clipboard, input/video services, and network connections

src/client.rs

Peer connection initialization

src/rendezvous_mediator.rs

Communication with RustDesk server for connection handling

src/platform

Platform-specific code

flutter

Flutter code for desktop and mobile

By following this guide, you should be able to successfully build and run RustDesk with Sciter GUI on your platform of choice! You can learn more and Download RustDesk in GitHub.

Upgrade Your Cybersecurity Skills EHA: Learn 150+ Practical Cyber Security Courses Online With Life Time Access - Enroll Here

 

Back to blog