From 7f539a2de3f2fdd4362f199c863824622c92fd91 Mon Sep 17 00:00:00 2001 From: GC Chen Date: Sun, 16 Jul 2023 22:09:11 +0800 Subject: [PATCH] Update README-ZH.md Update README-ZH to match the current README.md. --- docs/README-ZH.md | 100 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 77 insertions(+), 23 deletions(-) diff --git a/docs/README-ZH.md b/docs/README-ZH.md index d6d7d214e..b66c32d43 100644 --- a/docs/README-ZH.md +++ b/docs/README-ZH.md @@ -1,8 +1,8 @@

RustDesk - Your remote desktop
- 服务器 • + 服务器编译 • - Docker • + Docker结构截图
[English] | [Українська] | [česky] | [Magyar] | [Español] | [فارسی] | [Français] | [Deutsch] | [Polski] | [Indonesian] | [Suomi] | [മലയാളം] | [日本語] | [Nederlands] | [Italiano] | [Русский] | [Português (Brasil)] | [Esperanto] | [한국어] | [العربي] | [Tiếng Việt] | [Ελληνικά]
@@ -16,9 +16,19 @@ Chat with us: [知乎](https://www.zhihu.com/people/rustdesk) | [Discord](https: 或者[自己设置](https://rustdesk.com/server), 亦或者[开发您的版本](https://github.com/rustdesk/rustdesk-server-demo)。 -欢迎大家贡献代码, 请看 [`docs/CONTRIBUTING.md`](CONTRIBUTING.md). +![image](https://user-images.githubusercontent.com/71636191/171661982-430285f0-2e12-4b1d-9957-4a58e375304d.png) -[**可执行程序下载**](https://github.com/rustdesk/rustdesk/releases) +RustDesk 期待各位的贡献. 如何参与开发? 详情请看 [CONTRIBUTING.md](docs/CONTRIBUTING.md). + +[**FAQ**](https://github.com/rustdesk/rustdesk/wiki/FAQ) + +[**BINARY DOWNLOAD**](https://github.com/rustdesk/rustdesk/releases) + +[**NIGHTLY BUILD**](https://github.com/rustdesk/rustdesk/releases/tag/nightly) + +[Get it on F-Droid](https://f-droid.org/en/packages/com.carriez.flutter_hbb) ## 免费的公共服务器 @@ -26,8 +36,17 @@ Chat with us: [知乎](https://www.zhihu.com/people/rustdesk) | [Discord](https: | Location | Vendor | Specification | | --------- | ------------- | ------------------ | -| Germany | Hetzner | 2 vCPU / 4GB RAM | -| Germany | Codext | 4 vCPU / 8GB RAM | +| Germany | [Hetzner](https://www.hetzner.com) | 2 vCPU / 4 GB RAM | +| Germany | [Codext](https://codext.de) | 4 vCPU / 8 GB RAM | +| Ukraine (Kyiv) | [dc.volia](https://dc.volia.com) | 2 vCPU / 4 GB RAM | + +## Dev Container + +[![在 Dev Containers 中打开](https://img.shields.io/static/v1?label=Dev%20Container&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/rustdesk/rustdesk) + +如果你已经安装了 VS Code 和 Docker, 你可以点击上面的徽章开始使用. 点击后, VS Code 将自动安装 Dev Containers 扩展(如果需要),将源代码克隆到容器卷中, 并启动一个 Dev 容器供使用. + +Go through [DEVCONTAINER.md](docs/DEVCONTAINER.md) for more info. ## 依赖 @@ -37,16 +56,14 @@ Chat with us: [知乎](https://www.zhihu.com/people/rustdesk) | [Discord](https: [Linux](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.lnx/x64/libsciter-gtk.so) | [macOS](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.osx/libsciter.dylib) -移动版本使用Flutter,未来会将桌面版本从Sciter迁移到Flutter。 - ## 基本构建步骤 -- 请准备好 Rust 开发环境和 C++编译环境 +- 请准备好 Rust 开发环境和 C++ 编译环境 -- 安装[vcpkg](https://github.com/microsoft/vcpkg), 正确设置`VCPKG_ROOT`环境变量 +- 安装 [vcpkg](https://github.com/microsoft/vcpkg), 正确设置 `VCPKG_ROOT` 环境变量 - Windows: vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static opus:x64-windows-static aom:x64-windows-static - - Linux/Osx: vcpkg install libvpx libyuv opus aom + - Linux/macOS: vcpkg install libvpx libyuv opus aom - 运行 `cargo run` @@ -57,7 +74,15 @@ Chat with us: [知乎](https://www.zhihu.com/people/rustdesk) | [Discord](https: ### Ubuntu 18 (Debian 10) ```sh -sudo apt install -y 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 +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 +``` + +### openSUSE Tumbleweed + +```sh +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 ``` ### Fedora 28 (CentOS 8) @@ -107,24 +132,52 @@ cd rustdesk 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 -cargo run +VCPKG_ROOT=$HOME/vcpkg cargo run ``` ### 把 Wayland 修改成 X11 (Xorg) RustDesk 暂时不支持 Wayland,不过正在积极开发中。 > [点我](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) -查看 如何将Xorg设置成默认的GNOME session +查看如何将 Xorg 设置成默认的 GNOME session. + +## Wayland 支持 + +Wayland 似乎没有提供任何将按键发送到其他窗口的 API. 因此, RustDesk 使用较低级别的 API, 即 `/dev/uinput` devices (Linux kernal level). + +当 Wayland 是受控方时,您必须以下列方式开始操作: + +```bash +# Start uinput service +$ sudo rustdesk --service +$ rustdesk +``` + +**Notice**: Wayland 屏幕录制使用不同的接口. RustDesk 目前只支持 org.freedesktop.portal.ScreenCast. + +```bash +$ dbus-send --session --print-reply \ + --dest=org.freedesktop.portal.Desktop \ + /org/freedesktop/portal/desktop \ + org.freedesktop.DBus.Properties.Get \ + string:org.freedesktop.portal.ScreenCast string:version +# Not support +Error org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.ScreenCast” +# Support +method return time=1662544486.931020 sender=:1.54 -> destination=:1.139 serial=257 reply_serial=2 + variant uint32 4 +``` ## 使用 Docker 编译 -### 构建Docker容器 +克隆版本库并构建 Docker 容器: ```sh git clone https://github.com/rustdesk/rustdesk # 克隆Github存储库 cd rustdesk # 进入文件夹 docker build -t "rustdesk-builder" . # 构建容器 ``` + 请注意: * 针对国内网络访问问题,可以做以下几点优化: 1. Dockerfile 中修改系统的源到国内镜像 @@ -163,8 +216,9 @@ docker build -t "rustdesk-builder" . # 构建容器 docker build -t "rustdesk-builder" . --build-arg http_proxy=http://host:port --build-arg https_proxy=http://host:port ``` -### 构建RustDesk程序 -容器构建完成后,运行下列指令以完成对RustDesk应用程序的构建: +### 构建 RustDesk 程序 + +然后, 每次需要构建应用程序时, 运行以下命令: ```sh 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 @@ -179,25 +233,25 @@ docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user groupmod: Permission denied. groupmod: cannot lock /etc/group; try again later. ``` - > **原因:** 容器的entrypoint脚本会检测UID和GID,在度判和给定的环境变量的不一致时,会强行修改user的UID和GID并重新运行。但在重启后读不到环境中的UID和GID,然后再次进入判错重启环节 + > **原因:** 容器的 entrypoint 脚本会检测 UID 和 GID,在度判和给定的环境变量的不一致时,会强行修改 user 的 UID 和 GID 并重新运行。但在重启后读不到环境中的 UID 和 GID,然后再次进入判错重启环节 -### 运行RustDesk程序 +### 运行 RustDesk 程序 -生成的可执行程序在target目录下,可直接通过指令运行调试(Debug)版本的RustDesk: +生成的可执行程序在 target 目录下,可直接通过指令运行调试 (Debug) 版本的 RustDesk: ```sh target/debug/rustdesk ``` -或者您想运行发行(Release)版本: +或者您想运行发行 (Release) 版本: ```sh target/release/rustdesk ``` 请注意: -* 请保证您运行的目录是在RustDesk库的根目录内,否则软件会读不到文件。 -* `install`、`run`等Cargo的子指令在容器内不可用,宿主机才行。 +* 请保证您运行的目录是在 RustDesk 库的根目录内,否则软件会读不到文件。 +* `install`、`run`等 Cargo 的子指令在容器内不可用,宿主机才行。 ## 文件结构