Merge branch 'master' into feat/autocomplete_mobile
This commit is contained in:
commit
70794c8eb5
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -4121,9 +4121,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.17.1"
|
||||
version = "1.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
|
||||
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
|
||||
|
||||
[[package]]
|
||||
name = "opaque-debug"
|
||||
|
28
README.md
28
README.md
@ -135,34 +135,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### Change Wayland to X11 (Xorg)
|
||||
|
||||
RustDesk does not support Wayland. Check [this](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) to configuring Xorg as the default GNOME session.
|
||||
|
||||
## Wayland support
|
||||
|
||||
Wayland does not seem to provide any API for sending keypresses to other windows. Therefore, the RustDesk uses an API from a lower level, namely the `/dev/uinput` device (Linux kernel level).
|
||||
|
||||
When Wayland is the controlled side, you have to start in the following way:
|
||||
```bash
|
||||
# Start uinput service
|
||||
$ sudo rustdesk --service
|
||||
$ rustdesk
|
||||
```
|
||||
**Notice**: Wayland screen recording uses different interfaces. RustDesk currently only supports 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
|
||||
```
|
||||
|
||||
## How to build with Docker
|
||||
|
||||
Begin by cloning the repository and building the Docker container:
|
||||
|
@ -118,10 +118,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### X11 (Xorg) إلى Wayland تغيير
|
||||
|
||||
افتراضية GNOME session ك Xorg إتبع [هذه](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) الخطوات لإعداد Wayland لا تدعم RustDesk
|
||||
|
||||
## Docker طريقة البناء باستخدام
|
||||
|
||||
ابدأ باستنساخ المستودع وبناء الكونتاينر:
|
||||
|
@ -111,10 +111,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### Změna z Wayland na X11 (Xorg)
|
||||
|
||||
RustDesk (zatím) nepodporuje zobrazovací server Wayland. Jak nastavit Xorg jako výchozí pro relace v prostředí GNOME naleznete [zde](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/).
|
||||
|
||||
## Jak sestavit prostřednictvím Docker kontejnerizace
|
||||
|
||||
Začněte tím, že si naklonujete tento repozitář a sestavíte docker kontejner:
|
||||
|
@ -108,33 +108,6 @@ mv libsciter-gtk.so target/debug
|
||||
cargo run
|
||||
```
|
||||
|
||||
### Skift Wayland til X11 (Xorg)
|
||||
|
||||
RustDesk understøtter ikke Wayland. Tjek [dette](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) for at konfigurere Xorg som standard GNOME-session.
|
||||
|
||||
## Wayland-support
|
||||
|
||||
Wayland ser ikke ud til at levere nogen API til at sende tastetryk til andre vinduer. Derfor bruger rustdesk et API fra et lavere niveau, nemlig `/dev/uinput`-enheden (Linux-kerneniveau).
|
||||
|
||||
Når wayland er den kontrollerede side, skal du starte på følgende måde:
|
||||
```bash
|
||||
# Start uinput service
|
||||
$ sudo rustdesk --service
|
||||
$ rustdesk
|
||||
```
|
||||
**Bemærk**: Wayland-skærmoptagelse bruger forskellige grænseflader. RustDesk understøtter i øjeblikket kun 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
|
||||
```
|
||||
## Sådan bygger du med Docker
|
||||
|
||||
```sh
|
||||
|
@ -133,34 +133,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### Wayland zu X11 (Xorg) ändern
|
||||
|
||||
RustDesk unterstützt Wayland nicht. Siehe [hier](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/), um Xorg als Standard-GNOME-Sitzung zu nutzen.
|
||||
|
||||
## Wayland-Unterstützung
|
||||
|
||||
Wayland scheint keine API für das Senden von Tastatureingaben an andere Fenster zu bieten. Daher verwendet RustDesk eine API von einer niedrigeren Ebene, nämlich dem Gerät `/dev/uinput` (Linux-Kernelebene).
|
||||
|
||||
Wenn Wayland die kontrollierte Seite ist, müssen Sie wie folgt vorgehen:
|
||||
```bash
|
||||
# Dienst uinput starten
|
||||
$ sudo rustdesk --service
|
||||
$ rustdesk
|
||||
```
|
||||
**Hinweis**: Die Wayland-Bildschirmaufnahme verwendet verschiedene Schnittstellen. RustDesk unterstützt derzeit nur 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
|
||||
# Keine Unterstützung
|
||||
Error org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.ScreenCast”
|
||||
# Unterstützung
|
||||
method return time=1662544486.931020 sender=:1.54 -> destination=:1.139 serial=257 reply_serial=2
|
||||
variant uint32 4
|
||||
```
|
||||
|
||||
## Auf Docker kompilieren
|
||||
|
||||
Beginnen Sie damit, das Repository zu klonen und den Docker-Container zu bauen:
|
||||
|
@ -104,10 +104,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### Ŝanĝi Wayland por X11 (Xorg)
|
||||
|
||||
RustDesk ne subtenas Wayland. Kontrolu [tion](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) por agordi Xorg kiel defaŭlta sesio GNOME.
|
||||
|
||||
## Kiel kompili kun Docker
|
||||
|
||||
Komencu klonante la deponejon kaj kompilu la konteneron Docker:
|
||||
|
@ -113,34 +113,6 @@ mv libsciter-gtk.so target/debug
|
||||
cargo run
|
||||
```
|
||||
|
||||
### Cambia Wayland a X11 (Xorg)
|
||||
|
||||
RustDesk no soporta Wayland. Lee [esto](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) para configurar Xorg en la sesión por defecto de GNOME.
|
||||
|
||||
## Soporte para Wayland
|
||||
|
||||
Wayland no parece proporcionar ninguna API para enviar pulsaciones de teclas a otras ventanas. Por lo tanto, rustdesk usa una API de nivel bajo, a saber, el dispositivo `/dev/uinput` (a nivel del kernel de Linux).
|
||||
|
||||
Cuando wayland esta del lado controlado, hay que iniciar de la siguiente manera:
|
||||
```bash
|
||||
# Empezar el servicio uinput
|
||||
$ sudo rustdesk --service
|
||||
$ rustdesk
|
||||
```
|
||||
**Aviso**: La grabación de pantalla de Wayland utiliza diferentes interfaces. RustDesk actualmente sólo soporta 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
|
||||
# No soportado
|
||||
Error org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.ScreenCast”
|
||||
# Soportado
|
||||
method return time=1662544486.931020 sender=:1.54 -> destination=:1.139 serial=257 reply_serial=2
|
||||
variant uint32 4
|
||||
```
|
||||
|
||||
## Como compilar con Docker
|
||||
|
||||
Empieza clonando el repositorio y compilando el contenedor de docker:
|
||||
|
@ -112,10 +112,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### تغییر Wayland به (X11 (Xorg
|
||||
|
||||
راستدسک از Wayland پشتیبانی نمی کند. برای جایگزنی Xorg به عنوان پیشفرض GNOM، [اینجا](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) را کلیک کنید.
|
||||
|
||||
## نحوه ساخت با داکر
|
||||
|
||||
این مخزن Git را دریافت کنید و کانتینر را به روش زیر بسازید
|
||||
|
@ -104,10 +104,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### Vaihda Wayland-ympäristö X11 (Xorg)-ympäristöön
|
||||
|
||||
RustDesk ei tue Waylandia. Tarkista [tämä](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) asettamalla Xorg oletus GNOME-istuntoon.
|
||||
|
||||
## Kuinka rakennetaan Dockerin kanssa
|
||||
|
||||
Aloita kloonaamalla tietovarasto ja rakentamalla docker-säiliö:
|
||||
|
@ -104,10 +104,6 @@ mv libsciter-gtk.so target/debug
|
||||
Exécution du cargo
|
||||
```
|
||||
|
||||
### Changer Wayland en X11 (Xorg)
|
||||
|
||||
RustDesk ne supporte pas Wayland. Lisez [cela](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) pour configurer Xorg comme la session GNOME par défaut.
|
||||
|
||||
## Comment construire avec Docker
|
||||
|
||||
Commencez par cloner le dépôt et construire le conteneur Docker :
|
||||
|
@ -133,34 +133,6 @@ mv libsciter-gtk.so target/debug
|
||||
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 περιβάλλον.
|
||||
|
||||
## Υποστήριξη Wayland
|
||||
|
||||
Το Wayland προς το παρόν δεν διαθέτει κάποιο API το οποίο να στέλνει τα πατήματα πλήκτρων στα υπόλοιπα παράθυρα. Για τον λόγο αυτό, το Rustdesk χρησιμοποιεί ένα API από κατώτερο επίπεδο, όπως το `/dev/uinput` (Linux kernel level).
|
||||
|
||||
Σε περίπτωση που το Wayland είναι η ελεγχόμενη πλευρά, θα πρέπει να ξεκινήσετε με τον παρακάτω τρόπο:
|
||||
```bash
|
||||
# Start uinput service
|
||||
$ sudo rustdesk --service
|
||||
$ rustdesk
|
||||
```
|
||||
**Σημείωση**: Η εγγραφή οθόνης του 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
|
||||
```
|
||||
|
||||
## Πως να κάνετε build στο Docker
|
||||
|
||||
Ξεκινήστε κλωνοποιώντας το αποθετήριο και κάνοντας build το docker container:
|
||||
|
@ -116,10 +116,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### Válts Wayland-ról X11-re (Xorg)
|
||||
|
||||
A RustDesk nem támogatja a Waylendet. [Itt](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) található egy tutorial amelynek segítségével beállíthatod a Xorg-ot mint alap GNOME session.
|
||||
|
||||
## Hogyan építs Dockerrel
|
||||
|
||||
Kezdjünk a repo clónozásával, majd pedig a Docker container megépítésével:
|
||||
|
@ -128,37 +128,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### Mengubah Wayland ke X11 (Xorg)
|
||||
|
||||
RustDesk tidak mendukung Wayland. Cek [ini](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) untuk mengonfigurasi Xorg sebagai sesi standar di GNOME.
|
||||
|
||||
## Kompatibilitas dengan Wayland
|
||||
|
||||
Sepertinya Wayland tidak memiliki API untuk mengirimkan ketukan tombol ke jendela lain. Maka dari itu, RustDesk menggunakan API dari level yang lebih rendah, lebih tepatnya perangkat `/dev/uinput` (linux kernel level)
|
||||
|
||||
Saat Wayland menjadi sisi yang dikendalikan atau sisi yang sedang diremote, kamu harus memulai dengan cara ini
|
||||
|
||||
```bash
|
||||
# Start uinput service
|
||||
$ sudo rustdesk --service
|
||||
$ rustdesk
|
||||
```
|
||||
|
||||
**Harap Diperhatikan**: Saat Perekaman layar menggunakan Wayland antarmuka (UI) yang ditampilkan akan berbeda. Untuk saat ini RustDesk hanya mendukung 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
|
||||
```
|
||||
|
||||
## Cara Build dengan Docker
|
||||
|
||||
Mulailah dengan melakukan kloning (clone) repositori dan build dengan docker container:
|
||||
|
@ -109,11 +109,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### Cambiare Wayland in X11 (Xorg)
|
||||
|
||||
RustDesk non supporta Wayland.
|
||||
Controlla [qui](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) per configurare Xorg come sessione predefinita di GNOME.
|
||||
|
||||
## Come compilare con Docker
|
||||
|
||||
Clona il repository e compila i container docker:
|
||||
|
@ -114,11 +114,6 @@ mv libsciter-gtk.so target/debug
|
||||
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セッションとして構成します。
|
||||
|
||||
## Dockerでビルドする方法
|
||||
|
||||
リポジトリのクローンを作成し、Dockerコンテナを構築することから始めます。
|
||||
|
@ -112,10 +112,6 @@ mv libsciter-gtk.so target/debug
|
||||
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 세션을 구성합니다.
|
||||
|
||||
## Docker에 빌드하는 방법
|
||||
|
||||
레포지토리를 클론하고, Docker 컨테이너 구성하는 것으로 시작합니다.
|
||||
|
@ -103,10 +103,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### വേലാൻഡ് X11 (Xorg) ആയി മാറ്റുക
|
||||
|
||||
RustDesk Wayland-നെ പിന്തുണയ്ക്കുന്നില്ല. സ്ഥിരസ്ഥിതി ഗ്നോം സെഷനായി Xorg കോൺഫിഗർ ചെയ്യുന്നതിന് [ഇത്](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) പരിശോധിക്കുക.
|
||||
|
||||
## ഡോക്കർ ഉപയോഗിച്ച് എങ്ങനെ നിർമ്മിക്കാം
|
||||
|
||||
റെപ്പോസിറ്റോറി ക്ലോണുചെയ്ത് ഡോക്കർ കണ്ടെയ്നർ നിർമ്മിക്കുന്നതിലൂടെ ആരംഭിക്കുക:
|
||||
|
@ -130,34 +130,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### Wissel van Wayland naar X11 (Xorg)
|
||||
|
||||
RustDesk ondersteunt Wayland niet. Lees [hier](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) hoe je Xorg als standaardsessie kunt instellen voor GNOME.
|
||||
|
||||
## Wayland support
|
||||
|
||||
Wayland lijkt geen API te bieden voor het verzenden van toetsaanslagen naar andere vensters. Daarom gebruikt de rustdesk een API van een lager niveau, namelijk het `/dev/uinput` apparaat (Linux kernel niveau).
|
||||
|
||||
Als wayland de gecontroleerde kant is, moet je op de volgende manier beginnen:
|
||||
```bash
|
||||
# Start uinput service
|
||||
$ sudo rustdesk --service
|
||||
$ rustdesk
|
||||
```
|
||||
**Let op**: Wayland schermopname gebruikt verschillende interfaces. RustDesk ondersteunt momenteel alleen 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
|
||||
```
|
||||
|
||||
## Bouwen met Docker
|
||||
|
||||
Begin met het klonen van de repository en het bouwen van de docker container:
|
||||
|
@ -128,34 +128,6 @@ mv libsciter-gtk.so target/debug
|
||||
cargo run
|
||||
```
|
||||
|
||||
### Zmień Wayland na X11 (Xorg)
|
||||
|
||||
RustDesk nie obsługuje Waylanda. Sprawdź [tutaj](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/), jak skonfigurować Xorg jako domyślną sesję GNOME.
|
||||
|
||||
## Wspracie Wayland
|
||||
|
||||
Wygląda na to, że Wayland nie wspiera żadnego API do wysyłania naciśnięć klawiszy do innych okien. Dlatego rustdesk używa API z niższego poziomu, urządzenia o nazwie `/dev/uinput` (poziom jądra Linux).
|
||||
|
||||
Gdy po stronie kontrolowanej pracuje Wayland, musisz uruchomić program w następujący sposób:
|
||||
```bash
|
||||
# Start uinput service
|
||||
$ sudo rustdesk --service
|
||||
$ rustdesk
|
||||
```
|
||||
**Uwaga**: Nagrywanie ekranu Wayland wykorzystuje różne interfejsy. RustDesk obecnie obsługuje tylko 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
|
||||
```
|
||||
|
||||
## Jak kompilować za pomocą Dockera
|
||||
|
||||
Rozpocznij od sklonowania repozytorium i stworzenia kontenera docker:
|
||||
|
@ -104,10 +104,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### Mude Wayland para X11 (Xorg)
|
||||
|
||||
RustDesk não suporta Wayland. Veja [esse link](https://docs.fedoraproject.org/pt_BR/quick-docs/configuring-xorg-as-default-gnome-session/) para configurar o Xorg como a sessão padrão do GNOME.
|
||||
|
||||
## Como compilar com Docker
|
||||
|
||||
Comece clonando o repositório e montando o container docker:
|
||||
|
@ -114,10 +114,6 @@ mv libsciter-gtk.so target/debug
|
||||
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 по умолчанию.
|
||||
|
||||
## Как собрать с помощью Docker
|
||||
|
||||
Начните с клонирования репозитория и создания docker-контейнера:
|
||||
|
@ -138,34 +138,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### Wayland'ı X11 (Xorg) Olarak Değiştirme
|
||||
|
||||
RustDesk, Wayland'ı desteklemez. Xorg'u GNOME oturumu olarak varsayılan olarak ayarlamak için [burayı](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) kontrol edin.
|
||||
|
||||
## Wayland Desteği
|
||||
|
||||
Wayland'ın diğer pencerelere tuş vuruşu göndermek için herhangi bir API sağlamadığı görünmektedir. Bu nedenle, RustDesk daha düşük bir seviyeden, yani Linux çekirdek seviyesindeki `/dev/uinput` cihazının API'sini kullanır.
|
||||
|
||||
Wayland tarafı kontrol edildiğinde, aşağıdaki şekilde başlatmanız gerekir:
|
||||
```bash
|
||||
# uinput servisini başlatın
|
||||
$ sudo rustdesk --service
|
||||
$ rustdesk
|
||||
```
|
||||
**Uyarı**: Wayland ekran kaydı farklı arayüzler kullanır. RustDesk şu anda yalnızca org.freedesktop.portal.ScreenCast'ı destekler.
|
||||
```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
|
||||
# Desteklenmez
|
||||
Error org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.ScreenCast”
|
||||
# Desteklenir
|
||||
method return time=1662544486.931020 sender=:1.54 -> destination=:1.139 serial=257 reply_serial=2
|
||||
variant uint32 4
|
||||
```
|
||||
|
||||
## Docker ile Derleme Nasıl Yapılır
|
||||
|
||||
Öncelikle deposunu klonlayın ve Docker konteynerini oluşturun:
|
||||
|
@ -131,10 +131,6 @@ mv libsciter-gtk.so target/debug
|
||||
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 за замовчуванням.
|
||||
|
||||
## Як зібрати за допомогою Docker
|
||||
|
||||
Почніть з клонування сховища та створення docker-контейнера:
|
||||
|
@ -116,10 +116,6 @@ mv libsciter-gtk.so target/debug
|
||||
VCPKG_ROOT=$HOME/vcpkg cargo run
|
||||
```
|
||||
|
||||
### Chuyển từ Wayland sang X11 (Xorg)
|
||||
|
||||
RustDesk hiện không hỗ trợ Wayland. Hãy xem [đường linh ở đây](https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/) cách để cài đặt Xorg làm session mặc định của GNOME.
|
||||
|
||||
## Cách để build sử dụng Docker
|
||||
|
||||
Bắt đầu bằng cách sao chép repo này về máy tính và build cái Docker cointainer:
|
||||
|
@ -134,39 +134,6 @@ mv libsciter-gtk.so target/debug
|
||||
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.
|
||||
|
||||
## 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 容器:
|
||||
|
@ -958,7 +958,7 @@ class CustomAlertDialog extends StatelessWidget {
|
||||
|
||||
void msgBox(SessionID sessionId, String type, String title, String text,
|
||||
String link, OverlayDialogManager dialogManager,
|
||||
{bool? hasCancel, ReconnectHandle? reconnect}) {
|
||||
{bool? hasCancel, ReconnectHandle? reconnect, int? reconnectTimeout}) {
|
||||
dialogManager.dismissAll();
|
||||
List<Widget> buttons = [];
|
||||
bool hasOk = false;
|
||||
@ -998,22 +998,21 @@ void msgBox(SessionID sessionId, String type, String title, String text,
|
||||
dialogManager.dismissAll();
|
||||
}));
|
||||
}
|
||||
if (reconnect != null && title == "Connection Error") {
|
||||
if (reconnect != null &&
|
||||
title == "Connection Error" &&
|
||||
reconnectTimeout != null) {
|
||||
// `enabled` is used to disable the dialog button once the button is clicked.
|
||||
final enabled = true.obs;
|
||||
final button = Obx(
|
||||
() => dialogButton(
|
||||
'Reconnect',
|
||||
isOutline: true,
|
||||
onPressed: enabled.isTrue
|
||||
? () {
|
||||
// Disable the button
|
||||
enabled.value = false;
|
||||
reconnect(dialogManager, sessionId, false);
|
||||
}
|
||||
: null,
|
||||
),
|
||||
);
|
||||
final button = Obx(() => _ReconnectCountDownButton(
|
||||
second: reconnectTimeout,
|
||||
onPressed: enabled.isTrue
|
||||
? () {
|
||||
// Disable the button
|
||||
enabled.value = false;
|
||||
reconnect(dialogManager, sessionId, false);
|
||||
}
|
||||
: null,
|
||||
));
|
||||
buttons.insert(0, button);
|
||||
}
|
||||
if (link.isNotEmpty) {
|
||||
@ -2745,3 +2744,56 @@ parseParamScreenRect(Map<String, dynamic> params) {
|
||||
}
|
||||
return screenRect;
|
||||
}
|
||||
|
||||
class _ReconnectCountDownButton extends StatefulWidget {
|
||||
_ReconnectCountDownButton({
|
||||
Key? key,
|
||||
required this.second,
|
||||
required this.onPressed,
|
||||
}) : super(key: key);
|
||||
final VoidCallback? onPressed;
|
||||
final int second;
|
||||
|
||||
@override
|
||||
State<_ReconnectCountDownButton> createState() =>
|
||||
_ReconnectCountDownButtonState();
|
||||
}
|
||||
|
||||
class _ReconnectCountDownButtonState extends State<_ReconnectCountDownButton> {
|
||||
late int _countdownSeconds = widget.second;
|
||||
|
||||
Timer? _timer;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_startCountdownTimer();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_timer?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _startCountdownTimer() {
|
||||
_timer = Timer.periodic(Duration(seconds: 1), (timer) {
|
||||
if (_countdownSeconds <= 0) {
|
||||
timer.cancel();
|
||||
} else {
|
||||
setState(() {
|
||||
_countdownSeconds--;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return dialogButton(
|
||||
'${translate('Reconnect')} (${_countdownSeconds}s)',
|
||||
onPressed: widget.onPressed,
|
||||
isOutline: true,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,6 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
Timer? _updateTimer;
|
||||
|
||||
final RxBool _idInputFocused = false.obs;
|
||||
final FocusNode _idFocusNode = FocusNode();
|
||||
|
||||
var svcStopped = Get.find<RxBool>(tag: 'stop-service');
|
||||
var svcIsUsingPublicServer = true.obs;
|
||||
@ -336,6 +335,7 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
optionsViewBuilder: (BuildContext context, AutocompleteOnSelected<Peer> onSelected, Iterable<Peer> options) {
|
||||
double maxHeight = options.length * 50;
|
||||
maxHeight = maxHeight > 200 ? 200 : maxHeight;
|
||||
|
||||
return Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: ClipRRect(
|
||||
|
@ -378,16 +378,39 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
// });
|
||||
// }
|
||||
} else if (Platform.isLinux) {
|
||||
final LinuxCards = <Widget>[];
|
||||
if (bind.isSelinuxEnforcing()) {
|
||||
// Check is SELinux enforcing, but show user a tip of is SELinux enabled for simple.
|
||||
final keyShowSelinuxHelpTip = "show-selinux-help-tip";
|
||||
if (bind.mainGetLocalOption(key: keyShowSelinuxHelpTip) != 'N') {
|
||||
LinuxCards.add(buildInstallCard(
|
||||
"Warning", "selinux_tip", "", () async {},
|
||||
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
|
||||
help: 'Help',
|
||||
link:
|
||||
'https://rustdesk.com/docs/en/client/linux/#permissions-issue',
|
||||
closeButton: true,
|
||||
closeOption: keyShowSelinuxHelpTip,
|
||||
));
|
||||
}
|
||||
}
|
||||
if (bind.mainCurrentIsWayland()) {
|
||||
return buildInstallCard(
|
||||
LinuxCards.add(buildInstallCard(
|
||||
"Warning", "wayland_experiment_tip", "", () async {},
|
||||
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
|
||||
help: 'Help',
|
||||
link: 'https://rustdesk.com/docs/en/manual/linux/#x11-required');
|
||||
link: 'https://rustdesk.com/docs/en/manual/linux/#x11-required'));
|
||||
} else if (bind.mainIsLoginWayland()) {
|
||||
return buildInstallCard("Warning",
|
||||
LinuxCards.add(buildInstallCard("Warning",
|
||||
"Login screen using Wayland is not supported", "", () async {},
|
||||
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
|
||||
help: 'Help',
|
||||
link: 'https://rustdesk.com/docs/en/manual/linux/#login-screen');
|
||||
link: 'https://rustdesk.com/docs/en/manual/linux/#login-screen'));
|
||||
}
|
||||
if (LinuxCards.isNotEmpty) {
|
||||
return Column(
|
||||
children: LinuxCards,
|
||||
);
|
||||
}
|
||||
}
|
||||
return Container();
|
||||
@ -395,17 +418,26 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
|
||||
Widget buildInstallCard(String title, String content, String btnText,
|
||||
GestureTapCallback onPressed,
|
||||
{String? help, String? link, bool? closeButton}) {
|
||||
void closeCard() {
|
||||
setState(() {
|
||||
isCardClosed = true;
|
||||
});
|
||||
{double marginTop = 20.0, String? help, String? link, bool? closeButton, String? closeOption}) {
|
||||
void closeCard() async {
|
||||
if (closeOption != null) {
|
||||
await bind.mainSetLocalOption(key: closeOption, value: 'N');
|
||||
if (bind.mainGetLocalOption(key: closeOption) == 'N') {
|
||||
setState(() {
|
||||
isCardClosed = true;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
setState(() {
|
||||
isCardClosed = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return Stack(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 20),
|
||||
margin: EdgeInsets.only(top: marginTop),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
|
@ -235,7 +235,7 @@ class _RemotePageState extends State<RemotePage> {
|
||||
clientClose(sessionId, gFFI.dialogManager);
|
||||
return false;
|
||||
},
|
||||
child: getRawPointerAndKeyBody(Scaffold(
|
||||
child: Scaffold(
|
||||
// workaround for https://github.com/rustdesk/rustdesk/issues/3131
|
||||
floatingActionButtonLocation: keyboardIsVisible
|
||||
? FABLocation(FloatingActionButtonLocation.endFloat, 0, -35)
|
||||
@ -281,7 +281,7 @@ class _RemotePageState extends State<RemotePage> {
|
||||
: Offstage(),
|
||||
],
|
||||
)),
|
||||
body: Overlay(
|
||||
body: getRawPointerAndKeyBody(Overlay(
|
||||
initialEntries: [
|
||||
OverlayEntry(builder: (context) {
|
||||
return Container(
|
||||
|
@ -512,7 +512,9 @@ class FfiModel with ChangeNotifier {
|
||||
String link, bool hasRetry, OverlayDialogManager dialogManager,
|
||||
{bool? hasCancel}) {
|
||||
msgBox(sessionId, type, title, text, link, dialogManager,
|
||||
hasCancel: hasCancel, reconnect: reconnect);
|
||||
hasCancel: hasCancel,
|
||||
reconnect: reconnect,
|
||||
reconnectTimeout: hasRetry ? _reconnects : null);
|
||||
_timer?.cancel();
|
||||
if (hasRetry) {
|
||||
_timer = Timer(Duration(seconds: _reconnects), () {
|
||||
@ -528,6 +530,7 @@ class FfiModel with ChangeNotifier {
|
||||
bool forceRelay) {
|
||||
bind.sessionReconnect(sessionId: sessionId, forceRelay: forceRelay);
|
||||
clearPermissions();
|
||||
dialogManager.dismissAll();
|
||||
dialogManager.showLoading(translate('Connecting...'),
|
||||
onCancel: closeConnection);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ impl Drop for SimpleCallOnReturn {
|
||||
pub fn global_init() -> bool {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
if !*IS_X11 {
|
||||
if !crate::platform::linux::is_x11() {
|
||||
crate::server::wayland::init();
|
||||
}
|
||||
}
|
||||
@ -956,7 +956,10 @@ pub async fn post_request_sync(url: String, body: String, header: &str) -> Resul
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn make_privacy_mode_msg_with_details(state: back_notification::PrivacyModeState, details: String) -> Message {
|
||||
pub fn make_privacy_mode_msg_with_details(
|
||||
state: back_notification::PrivacyModeState,
|
||||
details: String,
|
||||
) -> Message {
|
||||
let mut misc = Misc::new();
|
||||
let mut back_notification = BackNotification {
|
||||
details,
|
||||
@ -990,17 +993,6 @@ pub fn get_supported_keyboard_modes(version: i64) -> Vec<KeyboardMode> {
|
||||
.collect::<Vec<_>>()
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
lazy_static::lazy_static! {
|
||||
pub static ref IS_X11: bool = false;
|
||||
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
lazy_static::lazy_static! {
|
||||
pub static ref IS_X11: bool = hbb_common::platform::linux::is_x11_or_headless();
|
||||
}
|
||||
|
||||
pub fn make_fd_to_json(id: i32, path: String, entries: &Vec<FileEntry>) -> String {
|
||||
use serde_json::json;
|
||||
let mut fd_json = serde_json::Map::new();
|
||||
|
@ -1584,7 +1584,7 @@ pub fn main_is_installed() -> SyncReturn<bool> {
|
||||
|
||||
pub fn main_start_grab_keyboard() -> SyncReturn<bool> {
|
||||
#[cfg(target_os = "linux")]
|
||||
if !*crate::common::IS_X11 {
|
||||
if !crate::platform::linux::is_x11() {
|
||||
return SyncReturn(false);
|
||||
}
|
||||
crate::keyboard::client::start_grab_loop();
|
||||
@ -1935,6 +1935,17 @@ pub fn is_support_multi_ui_session(version: String) -> SyncReturn<bool> {
|
||||
SyncReturn(crate::common::is_support_multi_ui_session(&version))
|
||||
}
|
||||
|
||||
pub fn is_selinux_enforcing() -> SyncReturn<bool> {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
SyncReturn(crate::platform::linux::is_selinux_enforcing())
|
||||
}
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
SyncReturn(false)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
pub mod server_side {
|
||||
use hbb_common::{config, log};
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "在新的窗口中打开"),
|
||||
("Show displays as individual windows", "在单个窗口中打开显示器"),
|
||||
("Use all my displays for the remote session", "将我的所有显示器用于远程会话"),
|
||||
("selinux_tip", "SELinux 处于启用状态,RustDesk 可能无法作为被控正常运行。"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -555,15 +555,16 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Check for software update on startup", "Kontrola aktualizace softwaru při spuštění"),
|
||||
("upgrade_rustdesk_server_pro_to_{}_tip", "Aktualizujte prosím RustDesk Server Pro na verzi {} nebo novější!"),
|
||||
("pull_group_failed_tip", "Nepodařilo se obnovit skupinu"),
|
||||
("Filter by intersection", ""),
|
||||
("Remove wallpaper during incoming sessions", ""),
|
||||
("Test", ""),
|
||||
("switch_display_elevated_connections_tip", ""),
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("Filter by intersection", "Filtrovat podle průsečíku"),
|
||||
("Remove wallpaper during incoming sessions", "Odstranit tapetu během příchozích relací"),
|
||||
("Test", "Test"),
|
||||
("switch_display_elevated_connections_tip", "Přepnutí na jinou než primární obrazovku není podporováno ve zvýšeném režimu, pokud existuje více připojení. Pokud chcete ovládat více obrazovek, zkuste to po instalaci znovu."),
|
||||
("display_is_plugged_out_msg", "Obrazovka je odpojena, přepněte na první obrazovku."),
|
||||
("No displays", "Žádné obrazovky"),
|
||||
("elevated_switch_display_msg", "Přepnout na primární obrazovku, protože více obrazovek není podporováno ve zvýšeném režimu."),
|
||||
("Open in new window", "Otevřít v novém okně"),
|
||||
("Show displays as individual windows", "Zobrazit obrazovky jako jednotlivá okna"),
|
||||
("Use all my displays for the remote session", "Použít všechny mé obrazovky pro vzdálenou relaci"),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -440,7 +440,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Strong", "Stark"),
|
||||
("Switch Sides", "Seiten wechseln"),
|
||||
("Please confirm if you want to share your desktop?", "Bitte bestätigen Sie, wenn Sie Ihren Desktop freigeben möchten."),
|
||||
("Display", "Anzeige"),
|
||||
("Display", "Bildschirm"),
|
||||
("Default View Style", "Standard-Ansichtsstil"),
|
||||
("Default Scroll Style", "Standard-Scroll-Stil"),
|
||||
("Default Image Quality", "Standard-Bildqualität"),
|
||||
@ -476,7 +476,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Empty Password", "Leeres Passwort"),
|
||||
("Me", "Ich"),
|
||||
("identical_file_tip", "Diese Datei ist identisch mit der Datei der Gegenstelle."),
|
||||
("show_monitors_tip", "Monitore in der Symbolleiste anzeigen"),
|
||||
("show_monitors_tip", "Bildschirme in der Symbolleiste anzeigen"),
|
||||
("View Mode", "Ansichtsmodus"),
|
||||
("login_linux_tip", "Sie müssen sich an einem entfernten Linux-Konto anmelden, um eine X-Desktop-Sitzung zu eröffnen."),
|
||||
("verify_rustdesk_password_tip", "RustDesk-Passwort bestätigen"),
|
||||
@ -558,11 +558,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Filter by intersection", "Nach Schnittmenge filtern"),
|
||||
("Remove wallpaper during incoming sessions", "Hintergrundbild während eingehender Sitzungen entfernen"),
|
||||
("Test", "Test"),
|
||||
("switch_display_elevated_connections_tip", "Das Umschalten auf eine nicht primäre Anzeige wird mit erhöhten Rechten nicht unterstützt, wenn mehrere Verbindungen bestehen. Bitte versuchen Sie es nach der Installation erneut, wenn Sie mehrere Anzeigen steuern möchten."),
|
||||
("display_is_plugged_out_msg", "Das Anzeigegerät ist nicht angeschlossen, schalten Sie auf das erste Anzeigegerät um."),
|
||||
("No displays", "Keine Anzeigegeräte"),
|
||||
("elevated_switch_display_msg", "Wechseln Sie zur primären Anzeige, da die Mehrfachanzeige im erweiterten Modus nicht unterstützt wird."),
|
||||
("switch_display_elevated_connections_tip", "Das Umschalten auf einen sekundären Bildschirm wird mit erhöhten Rechten nicht unterstützt, wenn mehrere Verbindungen bestehen. Bitte versuchen Sie es nach der Installation erneut, wenn Sie mehrere Bildschirme steuern möchten."),
|
||||
("display_is_plugged_out_msg", "Der Bildschirm ist nicht angeschlossen, schalten Sie auf den ersten Bildschirm um."),
|
||||
("No displays", "Keine Bildschirme"),
|
||||
("elevated_switch_display_msg", "Wechseln Sie zum primären Bildschirm, da mehrere Bildschirme im erweiterten Modus nicht unterstützt werden."),
|
||||
("Open in new window", "In einem neuen Fenster öffnen"),
|
||||
("Show displays as individual windows", "Anzeigen als einzelne Fenster darstellen"),
|
||||
("Show displays as individual windows", "Jeden Bildschirm in einem eigenen Fenster anzeigen"),
|
||||
("Use all my displays for the remote session", "Alle meine Bildschirme für die Fernsitzung verwenden"),
|
||||
("selinux_tip", "SELinux ist auf Ihrem Gerät aktiviert, was dazu führen kann, dass RustDesk als kontrollierte Seite nicht richtig läuft."),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -225,5 +225,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("switch_display_elevated_connections_tip", "Switching to non-primary display is not supported in the elevated mode when there are multiple connections. Please try again after installation if you want to control multiple displays."),
|
||||
("display_is_plugged_out_msg", "The display is plugged out, switch to the first display."),
|
||||
("elevated_switch_display_msg", "Switch to the primary display because multiple displays are not supported in elevated mode."),
|
||||
("selinux_tip", "SELinux is enabled on your device, which may prevent RustDesk from running properly as controlled side."),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -555,15 +555,16 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Check for software update on startup", "Comprobar actualización al iniciar"),
|
||||
("upgrade_rustdesk_server_pro_to_{}_tip", "¡Por favor, actualiza RustDesk Server Pro a la versión {} o superior"),
|
||||
("pull_group_failed_tip", "No se ha podido refrescar el grupo"),
|
||||
("Filter by intersection", ""),
|
||||
("Remove wallpaper during incoming sessions", ""),
|
||||
("Test", ""),
|
||||
("switch_display_elevated_connections_tip", ""),
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("Filter by intersection", "Filtrar por intersección"),
|
||||
("Remove wallpaper during incoming sessions", "Quitar el fonde de pantalla durante sesiones entrantes"),
|
||||
("Test", "Probar"),
|
||||
("switch_display_elevated_connections_tip", "Cambiar a una pantalla no principal no está soportado en el modo elevado cuando hay múltiples conexiones. Por favor, inténtalo de nuevo tras la instalación si quieres controlar múltiples pantallas."),
|
||||
("display_is_plugged_out_msg", "La pantalla está desconectada, cambia a la principal."),
|
||||
("No displays", "No hay pantallas"),
|
||||
("elevated_switch_display_msg", "Cambiar a la pantalla principal porque mútliples pantallas no están soportadas en modo elevado."),
|
||||
("Open in new window", "Abrir en una nueva ventana"),
|
||||
("Show displays as individual windows", "Mostrar pantallas como ventanas individuales"),
|
||||
("Use all my displays for the remote session", "Usar todas mis pantallas para la sesión remota"),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "Buka di jendela baru"),
|
||||
("Show displays as individual windows", "Tampilkan dengan jendela terpisah"),
|
||||
("Use all my displays for the remote session", "Gunakan semua layar untuk sesi remote"),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Audio Input Device", "Dispositivo ingresso audio"),
|
||||
("Use IP Whitelisting", "Usa elenco IP autorizzati"),
|
||||
("Network", "Rete"),
|
||||
("Enable RDP", "Abilita RDP"),
|
||||
("Pin Toolbar", "Blocca barra strumenti"),
|
||||
("Unpin Toolbar", "Sblocca barra strumenti"),
|
||||
("Recording", "Registrazione"),
|
||||
@ -566,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "Apri in una nuova finestra"),
|
||||
("Show displays as individual windows", "Visualizza schermi come finestre individuali"),
|
||||
("Use all my displays for the remote session", "Usa tutti gli schermi per la sessione remota"),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "Atvērt jaunā logā"),
|
||||
("Show displays as individual windows", "Rādīt displejus kā atsevišķus logus"),
|
||||
("Use all my displays for the remote session", "Izmantot visus manus displejus attālajai sesijai"),
|
||||
("selinux_tip", "Jūsu ierīcē ir iespējots SELinux, kas var neļaut RustDesk pareizi darboties kā kontrolētajai pusei."),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -555,15 +555,16 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Check for software update on startup", "Checken voor updates bij opstarten"),
|
||||
("upgrade_rustdesk_server_pro_to_{}_tip", "Upgrade RustDesk Server Pro naar versie {} of nieuwer!"),
|
||||
("pull_group_failed_tip", "Vernieuwen van groep mislukt"),
|
||||
("Filter by intersection", ""),
|
||||
("Remove wallpaper during incoming sessions", ""),
|
||||
("Test", ""),
|
||||
("switch_display_elevated_connections_tip", ""),
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("Filter by intersection", "Filter op kruising"),
|
||||
("Remove wallpaper during incoming sessions", "Achtergrond verwijderen tijdens inkomende sessies"),
|
||||
("Test", "Test"),
|
||||
("switch_display_elevated_connections_tip", "Overschakelen naar een niet-hoofdbeeldscherm wordt niet ondersteund in de verhoogde modus wanneer er meerdere verbindingen zijn. Probeer het opnieuw na de installatie als je meerdere schermen wilt beheren."),
|
||||
("display_is_plugged_out_msg", "Beeldscherm is uitgeschakeld, schakel over naar het primaire beeldscherm."),
|
||||
("No displays", "Geen beeldschermen"),
|
||||
("elevated_switch_display_msg", "Schakel over naar het primaire beeldscherm, aangezien meerdere beeldschermen niet worden ondersteund in de modus met verhoogde rechten."),
|
||||
("Open in new window", "Open in een nieuw venster"),
|
||||
("Show displays as individual windows", "Beeldschermen weergeven als afzonderlijke vensters"),
|
||||
("Use all my displays for the remote session", "Gebruik al mijn beeldschermen voor de externe sessie"),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "Otwórz w nowym oknie"),
|
||||
("Show displays as individual windows", "Pokaż ekrany w osobnych oknach"),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "Открыть в новом окне"),
|
||||
("Show displays as individual windows", "Показывать дисплеи в отдельных окнах"),
|
||||
("Use all my displays for the remote session", "Использовать все мои дисплеи для удалённого сеанса"),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "Відкрити в новому вікні"),
|
||||
("Show displays as individual windows", "Відображати дисплеї в якості окремих вікон"),
|
||||
("Use all my displays for the remote session", "Використовувати всі мої дисплеї для віддаленого сеансу"),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -35,6 +35,10 @@ type Xdo = *const c_void;
|
||||
pub const PA_SAMPLE_RATE: u32 = 48000;
|
||||
static mut UNMODIFIED: bool = true;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
pub static ref IS_X11: bool = hbb_common::platform::linux::is_x11_or_headless();
|
||||
}
|
||||
|
||||
thread_local! {
|
||||
static XDO: RefCell<Xdo> = RefCell::new(unsafe { xdo_new(std::ptr::null()) });
|
||||
static DISPLAY: RefCell<*mut c_void> = RefCell::new(unsafe { XOpenDisplay(std::ptr::null())});
|
||||
@ -1360,3 +1364,26 @@ impl Drop for WallPaperRemover {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_x11() -> bool {
|
||||
*IS_X11
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_selinux_enforcing() -> bool {
|
||||
match run_cmds("getenforce") {
|
||||
Ok(output) => output.trim() == "Enforcing",
|
||||
Err(_) => match run_cmds("sestatus") {
|
||||
Ok(output) => {
|
||||
for line in output.lines() {
|
||||
if line.contains("Current mode:") {
|
||||
return line.contains("enforcing");
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
Err(_) => false,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,14 @@
|
||||
use super::*;
|
||||
#[cfg(target_os = "linux")]
|
||||
use crate::platform::linux::is_x11;
|
||||
#[cfg(all(windows, feature = "virtual_display_driver"))]
|
||||
use crate::virtual_display_manager;
|
||||
#[cfg(windows)]
|
||||
use hbb_common::get_version_number;
|
||||
use hbb_common::protobuf::MessageField;
|
||||
use scrap::Display;
|
||||
#[cfg(target_os = "linux")]
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
|
||||
// https://github.com/rustdesk/rustdesk/discussions/6042, avoiding dbus call
|
||||
#[cfg(target_os = "linux")]
|
||||
pub(super) static IS_X11: AtomicBool = AtomicBool::new(false);
|
||||
|
||||
pub const NAME: &'static str = "display";
|
||||
|
||||
@ -71,7 +69,7 @@ pub(super) fn check_display_changed(
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
// wayland do not support changing display for now
|
||||
if !IS_X11.load(Ordering::SeqCst) {
|
||||
if !is_x11() {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
@ -176,11 +174,6 @@ pub fn try_plug_out_virtual_display() {
|
||||
}
|
||||
|
||||
fn run(sp: EmptyExtraFieldService) -> ResultType<()> {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
IS_X11.store(scrap::is_x11(), Ordering::SeqCst);
|
||||
}
|
||||
|
||||
while sp.ok() {
|
||||
sp.snapshot(|sps| {
|
||||
if sps.has_subscribes() {
|
||||
@ -274,7 +267,7 @@ pub(super) fn check_update_displays(all: &Vec<Display>) {
|
||||
|
||||
pub fn is_inited_msg() -> Option<Message> {
|
||||
#[cfg(target_os = "linux")]
|
||||
if !IS_X11.load(Ordering::SeqCst) {
|
||||
if !is_x11() {
|
||||
return super::wayland::is_inited();
|
||||
}
|
||||
None
|
||||
@ -283,7 +276,7 @@ pub fn is_inited_msg() -> Option<Message> {
|
||||
pub async fn update_get_sync_displays() -> ResultType<Vec<DisplayInfo>> {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
if !IS_X11.load(Ordering::SeqCst) {
|
||||
if !is_x11() {
|
||||
return super::wayland::get_displays().await;
|
||||
}
|
||||
}
|
||||
@ -295,7 +288,7 @@ pub async fn update_get_sync_displays() -> ResultType<Vec<DisplayInfo>> {
|
||||
pub fn get_primary() -> usize {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
if !IS_X11.load(Ordering::SeqCst) {
|
||||
if !is_x11() {
|
||||
return match super::wayland::get_primary() {
|
||||
Ok(n) => n,
|
||||
Err(_) => 0,
|
||||
|
@ -1,8 +1,6 @@
|
||||
use super::*;
|
||||
#[cfg(target_os = "macos")]
|
||||
use crate::common::is_server;
|
||||
#[cfg(target_os = "linux")]
|
||||
use crate::common::IS_X11;
|
||||
use crate::input::*;
|
||||
#[cfg(target_os = "macos")]
|
||||
use dispatch::Queue;
|
||||
@ -1152,7 +1150,7 @@ fn map_keyboard_mode(evt: &KeyEvent) {
|
||||
|
||||
// Wayland
|
||||
#[cfg(target_os = "linux")]
|
||||
if !*IS_X11 {
|
||||
if !crate::platform::linux::is_x11() {
|
||||
let mut en = ENIGO.lock().unwrap();
|
||||
let code = evt.chr() as u16;
|
||||
|
||||
|
@ -18,8 +18,6 @@
|
||||
// to-do:
|
||||
// https://slhck.info/video/2017/03/01/rate-control.html
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
use super::display_service::IS_X11;
|
||||
use super::{
|
||||
display_service::{check_display_changed, get_display_info},
|
||||
service::ServiceTmpl,
|
||||
@ -28,6 +26,8 @@ use super::{
|
||||
};
|
||||
#[cfg(target_os = "linux")]
|
||||
use crate::common::SimpleCallOnReturn;
|
||||
#[cfg(target_os = "linux")]
|
||||
use crate::platform::linux::is_x11;
|
||||
#[cfg(windows)]
|
||||
use crate::{platform::windows::is_process_consent_running, privacy_win_mag};
|
||||
use hbb_common::{
|
||||
@ -46,8 +46,6 @@ use scrap::{
|
||||
vpxcodec::{VpxEncoderConfig, VpxVideoCodecId},
|
||||
CodecName, Display, TraitCapturer,
|
||||
};
|
||||
#[cfg(target_os = "linux")]
|
||||
use std::sync::atomic::Ordering;
|
||||
#[cfg(windows)]
|
||||
use std::sync::Once;
|
||||
use std::{
|
||||
@ -329,7 +327,7 @@ fn get_capturer(
|
||||
) -> ResultType<CapturerInfo> {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
if !IS_X11.load(Ordering::SeqCst) {
|
||||
if !is_x11() {
|
||||
return super::wayland::get_capturer();
|
||||
}
|
||||
}
|
||||
@ -571,7 +569,7 @@ fn run(vs: VideoService) -> ResultType<()> {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
would_block_count += 1;
|
||||
if !IS_X11.load(Ordering::SeqCst) {
|
||||
if !is_x11() {
|
||||
if would_block_count >= 100 {
|
||||
// to-do: Unknown reason for WouldBlock 100 times (seconds = 100 * 1 / fps)
|
||||
// https://github.com/rustdesk/rustdesk/blob/63e6b2f8ab51743e77a151e2b7ff18816f5fa2fb/libs/scrap/src/common/wayland.rs#L81
|
||||
@ -751,7 +749,7 @@ fn handle_one_frame(
|
||||
|
||||
pub fn is_inited_msg() -> Option<Message> {
|
||||
#[cfg(target_os = "linux")]
|
||||
if !IS_X11.load(Ordering::SeqCst) {
|
||||
if !is_x11() {
|
||||
return super::wayland::is_inited();
|
||||
}
|
||||
None
|
||||
|
@ -4,8 +4,11 @@ use scrap::{is_cursor_embedded, set_map_err, Capturer, Display, Frame, TraitCapt
|
||||
use std::io;
|
||||
use std::process::{Command, Output};
|
||||
|
||||
use crate::client::{
|
||||
SCRAP_OTHER_VERSION_OR_X11_REQUIRED, SCRAP_UBUNTU_HIGHER_REQUIRED, SCRAP_X11_REQUIRED,
|
||||
use crate::{
|
||||
client::{
|
||||
SCRAP_OTHER_VERSION_OR_X11_REQUIRED, SCRAP_UBUNTU_HIGHER_REQUIRED, SCRAP_X11_REQUIRED,
|
||||
},
|
||||
platform::linux::is_x11,
|
||||
};
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
@ -96,7 +99,7 @@ pub(super) async fn ensure_inited() -> ResultType<()> {
|
||||
}
|
||||
|
||||
pub(super) fn is_inited() -> Option<Message> {
|
||||
if scrap::is_x11() {
|
||||
if is_x11() {
|
||||
None
|
||||
} else {
|
||||
if *CAP_DISPLAY_INFO.read().unwrap() == 0 {
|
||||
@ -133,7 +136,7 @@ fn get_max_desktop_resolution() -> Option<String> {
|
||||
}
|
||||
|
||||
pub(super) async fn check_init() -> ResultType<()> {
|
||||
if !scrap::is_x11() {
|
||||
if !is_x11() {
|
||||
let mut minx = 0;
|
||||
let mut maxx = 0;
|
||||
let mut miny = 0;
|
||||
@ -246,7 +249,7 @@ pub(super) fn get_primary() -> ResultType<usize> {
|
||||
}
|
||||
|
||||
pub fn clear() {
|
||||
if scrap::is_x11() {
|
||||
if is_x11() {
|
||||
return;
|
||||
}
|
||||
let mut write_lock = CAP_DISPLAY_INFO.write().unwrap();
|
||||
@ -261,7 +264,7 @@ pub fn clear() {
|
||||
}
|
||||
|
||||
pub(super) fn get_capturer() -> ResultType<super::video_service::CapturerInfo> {
|
||||
if scrap::is_x11() {
|
||||
if is_x11() {
|
||||
bail!("Do not call this function if not wayland");
|
||||
}
|
||||
let addr = *CAP_DISPLAY_INFO.read().unwrap();
|
||||
|
Loading…
x
Reference in New Issue
Block a user