RustDesk ist ein Hilfsprogramm zur Fernwartung,
ähnlich wie Teamviewer. Hier beschreibe ich, wie ich den Client- und den Serverteil
baue. Für “Dritte” wahrscheinlich eher uninteressant!
Client bauen
Ich habe mich grob an dieser Anleitung
orientiert.
Ausgangspunkt: Ubuntu-20.04-Container
Aktualisieren: sudo apt update; sudo apt upgrade -y
Zusatzpakete installieren:
1
2
3
4
5
6
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 libayatana-appindicator3-1 \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
libayatana-appindicator3-dev
1
2
3
4
5
6
7
8
9
mkdir git
cd git
git clone https://github.com/microsoft/vcpkg
cd vcpkg
git checkout 2021.12.01
cd ..
vcpkg/bootstrap-vcpkg.sh -disableMetrics
export VCPKG_ROOT=$(pwd)/vcpkg
vcpkg/vcpkg install libvpx libyuv opus
Rust einspielen:
“rustup-init.sh” herunterladen: https://sh.rustup.rs – wget -O rustup-init.sh https://sh.rustup.rs
Sichten! Virencheck!
Ausführen: sh <rustup-init.sh
Auch ausführen: source $HOME/.cargo/env
Github-Repos clonen:
1
2
cd $HOME/git
git clone git@github.com:rustdesk/rustdesk.git
Github-Clone anpassen: chmod +x rustdesk/res/DEBIAN/*
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/Cargo.toml b/Cargo.toml
index 062e32ab..34f70668 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rustdesk"
-version = "1.2.0"
+version = "1.2.0-pre-01"
authors = ["rustdesk <info@rustdesk.com>"]
edition = "2021"
build= "build.rs"
--- a/res/DEBIAN/postinst
+++ b/res/DEBIAN/postinst
@@ -7,7 +7,7 @@ if [ "$1" = configure ]; then
INITSYS=$(ls -al /proc/1/exe | awk -F' ' '{print $NF}' | awk -F'/' '{print $NF}')
if [ "systemd" == "$INITSYS" ]; then
- ln -s /usr/lib/rustdesk/flutter_hbb /usr/bin/rustdesk
+ #ln -s /usr/lib/rustdesk/flutter_hbb /usr/bin/rustdesk
if [ -e /etc/systemd/system/rustdesk.service ]; then
rm /etc/systemd/system/rustdesk.service /usr/lib/systemd/system/rustdesk.service /usr/lib/systemd/user/rustdesk.service >/dev/null 2>&1
1
2
3
4
5
6
7
8
9
10
11
12
cd $HOME/git/rustdesk
source $HOME/.cargo/env
export VCPKG_ROOT=${HOME}/git/vcpkg
cargo build
# Falls Fehler bzgl. hwcodec
cargo update -p hwcodec
cargo build
cargo install cargo-bundle
chmod +x res/DEBIAN/p*
./build.py
Am Ende liegt ein fertiges DEB-Paket bereit:
1
2
3
4
5
6
7
8
...
Finished release [optimized] target(s) in 1m 51s
Bundling rustdesk_1.2.0_amd64.deb
Finished 1 bundle at:
/home/ubuntu/build/rustdesk/target/release/bundle/deb/rustdesk_1.2.0_amd64.deb
dpkg-deb: building package 'rustdesk' in 'rustdesk.deb'.
ubuntu$ ls -l *deb
-rw-rw-r-- 1 ubuntu ubuntu 6304828 Sep 23 05:23 rustdesk-1.2.0.deb
Server bauen
Ich habe mich grob an dieser Anleitung
orientiert.
Ausgangspunkt: Ubuntu-20.04-Container
Clonen/Auschecken: git clone git@github.com:rustdesk/rustdesk-server.git
Bauen:
cd rustdesk-server
cargo build --release
–> erzeugt target/release/{hbbr,hbbs,rustdesk-utils}
Anpassen:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff --git a/debian/control.tpl b/debian/control.tpl
index f83460f..2b19cc8 100644
--- a/debian/control.tpl
+++ b/debian/control.tpl
@@ -8,20 +8,20 @@ Homepage: https://rustdesk.com/
Package: rustdesk-server-hbbs
Architecture:
-Depends: systemd ${misc:Depends}
+Depends: systemd, ${misc:Depends}, ${shlibs:Depends}
Description: RustDesk server
Self-host your own RustDesk server, it is free and open source.
Package: rustdesk-server-hbbr
Architecture:
-Depends: systemd ${misc:Depends}
+Depends: systemd, ${misc:Depends}, ${shlibs:Depends}
Description: RustDesk server
Self-host your own RustDesk server, it is free and open source.
This package contains the RustDesk relay server.
Package: rustdesk-server-utils
Architecture:
-Depends: ${misc:Depends}
+Depends: ${misc:Depends}, ${shlibs:Depends}
Description: RustDesk server
Self-host your own RustDesk server, it is free and open source.
This package contains the rustdesk-utils binary.
1
2
3
4
5
6
7
mkdir -p debian-build/amd64/bin
cp target/release/{hbbr,hbbs,rustdesk-utils} debian-build/amd64/bin/.
chmod -v a+x debian-build/amd64/bin/*
cp -vr debian systemd debian-build/amd64/
cat debian/control.tpl | sed 's//any/' > debian-build/amd64/debian/control
cd debian-build/amd64/
debuild -i -us -uc -b -aamd64
Sichten:
debian-build/rustdesk-server-hbbr_1.1.6_amd64.deb
debian-build/rustdesk-server-hbbs_1.1.6_amd64.deb
debian-build/rustdesk-server-utils_1.1.6_amd64.deb
Links
Historie und Anmerkung
2022-09-23: Erste Version