From 1b22bf0e082ff566ebd8304065e837e6a37b3532 Mon Sep 17 00:00:00 2001 From: flusheDData <116861809+flusheDData@users.noreply.github.com> Date: Thu, 19 Oct 2023 18:32:06 +0200 Subject: [PATCH 01/18] Update es.rs New terms added --- src/lang/es.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lang/es.rs b/src/lang/es.rs index 30bee3ace..1ea917d13 100644 --- a/src/lang/es.rs +++ b/src/lang/es.rs @@ -555,15 +555,15 @@ 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"), ].iter().cloned().collect(); } From 4dcc368378d99a697eb3db98079a730fb5e27ce2 Mon Sep 17 00:00:00 2001 From: Mr-Update <37781396+Mr-Update@users.noreply.github.com> Date: Thu, 19 Oct 2023 20:50:08 +0200 Subject: [PATCH 02/18] Update de.rs --- src/lang/de.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lang/de.rs b/src/lang/de.rs index b67ef32b3..6324a2a61 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -564,5 +564,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("elevated_switch_display_msg", "Wechseln Sie zur primären Anzeige, da die Mehrfachanzeige im erweiterten Modus nicht unterstützt wird."), ("Open in new window", "In einem neuen Fenster öffnen"), ("Show displays as individual windows", "Anzeigen als einzelne Fenster darstellen"), + ("Use all my displays for the remote session", "Alle meine Anzeigen für die Fernsitzung verwenden"), ].iter().cloned().collect(); } From d8f808bf38c3b4df114e2df5177db168a84b0232 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Fri, 20 Oct 2023 13:59:48 +0800 Subject: [PATCH 03/18] Update es.rs --- src/lang/es.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/es.rs b/src/lang/es.rs index 1ea917d13..093298835 100644 --- a/src/lang/es.rs +++ b/src/lang/es.rs @@ -561,7 +561,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("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.""), + ("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"), From db3978fd4e0cfdcadeb588cade8dce4426e5480e Mon Sep 17 00:00:00 2001 From: FastAct <93490087+FastAct@users.noreply.github.com> Date: Fri, 20 Oct 2023 11:24:55 +0200 Subject: [PATCH 04/18] Update nl.rs --- src/lang/nl.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lang/nl.rs b/src/lang/nl.rs index 6eee21410..7a8189682 100644 --- a/src/lang/nl.rs +++ b/src/lang/nl.rs @@ -555,15 +555,15 @@ 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"), ].iter().cloned().collect(); } From 869d9d487b1a6a18f20d2e671f439bf876840840 Mon Sep 17 00:00:00 2001 From: Mr-Update <37781396+Mr-Update@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:06:04 +0200 Subject: [PATCH 05/18] Update de.rs --- src/lang/de.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lang/de.rs b/src/lang/de.rs index 6324a2a61..b15023495 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -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,12 +558,12 @@ 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"), - ("Use all my displays for the remote session", "Alle meine Anzeigen für die Fernsitzung verwenden"), + ("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"), ].iter().cloned().collect(); } From aa3c58917b8e085ac546e3791e1282f3244194da Mon Sep 17 00:00:00 2001 From: rustdesk Date: Fri, 20 Oct 2023 19:09:13 +0800 Subject: [PATCH 06/18] remove wayland related from readme --- README.md | 28 ---------------------------- docs/README-AR.md | 4 ---- docs/README-CS.md | 4 ---- docs/README-DA.md | 27 --------------------------- docs/README-DE.md | 28 ---------------------------- docs/README-EO.md | 4 ---- docs/README-ES.md | 28 ---------------------------- docs/README-FA.md | 4 ---- docs/README-FI.md | 4 ---- docs/README-FR.md | 4 ---- docs/README-GR.md | 28 ---------------------------- docs/README-HU.md | 4 ---- docs/README-ID.md | 31 ------------------------------- docs/README-IT.md | 5 ----- docs/README-JP.md | 5 ----- docs/README-KR.md | 4 ---- docs/README-ML.md | 4 ---- docs/README-NL.md | 28 ---------------------------- docs/README-PL.md | 28 ---------------------------- docs/README-PTBR.md | 4 ---- docs/README-RU.md | 4 ---- docs/README-TR.md | 28 ---------------------------- docs/README-UA.md | 4 ---- docs/README-VN.md | 4 ---- docs/README-ZH.md | 33 --------------------------------- 25 files changed, 349 deletions(-) diff --git a/README.md b/README.md index 019442872..c00bc88f0 100644 --- a/README.md +++ b/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: diff --git a/docs/README-AR.md b/docs/README-AR.md index 80948fb39..9b72eb18d 100644 --- a/docs/README-AR.md +++ b/docs/README-AR.md @@ -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 طريقة البناء باستخدام ابدأ باستنساخ المستودع وبناء الكونتاينر: diff --git a/docs/README-CS.md b/docs/README-CS.md index 15e576c47..e7cf998f3 100644 --- a/docs/README-CS.md +++ b/docs/README-CS.md @@ -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: diff --git a/docs/README-DA.md b/docs/README-DA.md index af2f5937f..e0bc11829 100644 --- a/docs/README-DA.md +++ b/docs/README-DA.md @@ -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 diff --git a/docs/README-DE.md b/docs/README-DE.md index 5ac370a87..066c13f99 100644 --- a/docs/README-DE.md +++ b/docs/README-DE.md @@ -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: diff --git a/docs/README-EO.md b/docs/README-EO.md index be1538089..2cfc9ee6a 100644 --- a/docs/README-EO.md +++ b/docs/README-EO.md @@ -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: diff --git a/docs/README-ES.md b/docs/README-ES.md index 19a7335d3..02424ec00 100644 --- a/docs/README-ES.md +++ b/docs/README-ES.md @@ -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: diff --git a/docs/README-FA.md b/docs/README-FA.md index 989b0047c..d07dadd09 100644 --- a/docs/README-FA.md +++ b/docs/README-FA.md @@ -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 را دریافت کنید و کانتینر را به روش زیر بسازید diff --git a/docs/README-FI.md b/docs/README-FI.md index 195d29c84..988729a0f 100644 --- a/docs/README-FI.md +++ b/docs/README-FI.md @@ -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ö: diff --git a/docs/README-FR.md b/docs/README-FR.md index 39f09a625..ea55ec468 100644 --- a/docs/README-FR.md +++ b/docs/README-FR.md @@ -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 : diff --git a/docs/README-GR.md b/docs/README-GR.md index c720dd823..f324cfa95 100644 --- a/docs/README-GR.md +++ b/docs/README-GR.md @@ -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: diff --git a/docs/README-HU.md b/docs/README-HU.md index 8965a9b1e..d47a775d0 100644 --- a/docs/README-HU.md +++ b/docs/README-HU.md @@ -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: diff --git a/docs/README-ID.md b/docs/README-ID.md index 9999eb72f..be8003798 100644 --- a/docs/README-ID.md +++ b/docs/README-ID.md @@ -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: diff --git a/docs/README-IT.md b/docs/README-IT.md index c1c46bfed..6cef02804 100644 --- a/docs/README-IT.md +++ b/docs/README-IT.md @@ -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: diff --git a/docs/README-JP.md b/docs/README-JP.md index 44f811eec..d822cff17 100644 --- a/docs/README-JP.md +++ b/docs/README-JP.md @@ -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コンテナを構築することから始めます。 diff --git a/docs/README-KR.md b/docs/README-KR.md index dacb092e7..829f00fe9 100644 --- a/docs/README-KR.md +++ b/docs/README-KR.md @@ -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 컨테이너 구성하는 것으로 시작합니다. diff --git a/docs/README-ML.md b/docs/README-ML.md index a73fd7815..6aaaf6077 100644 --- a/docs/README-ML.md +++ b/docs/README-ML.md @@ -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/) പരിശോധിക്കുക. - ## ഡോക്കർ ഉപയോഗിച്ച് എങ്ങനെ നിർമ്മിക്കാം റെപ്പോസിറ്റോറി ക്ലോണുചെയ്‌ത് ഡോക്കർ കണ്ടെയ്‌നർ നിർമ്മിക്കുന്നതിലൂടെ ആരംഭിക്കുക: diff --git a/docs/README-NL.md b/docs/README-NL.md index bec83a285..ee5e98a85 100644 --- a/docs/README-NL.md +++ b/docs/README-NL.md @@ -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: diff --git a/docs/README-PL.md b/docs/README-PL.md index ba27af04d..3809c58bd 100644 --- a/docs/README-PL.md +++ b/docs/README-PL.md @@ -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: diff --git a/docs/README-PTBR.md b/docs/README-PTBR.md index 6e6f01fce..3ae092db8 100644 --- a/docs/README-PTBR.md +++ b/docs/README-PTBR.md @@ -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: diff --git a/docs/README-RU.md b/docs/README-RU.md index 01710f084..959c33b10 100644 --- a/docs/README-RU.md +++ b/docs/README-RU.md @@ -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-контейнера: diff --git a/docs/README-TR.md b/docs/README-TR.md index 590ead0df..3afae98b0 100644 --- a/docs/README-TR.md +++ b/docs/README-TR.md @@ -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: diff --git a/docs/README-UA.md b/docs/README-UA.md index 01914cfc2..275033977 100644 --- a/docs/README-UA.md +++ b/docs/README-UA.md @@ -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-контейнера: diff --git a/docs/README-VN.md b/docs/README-VN.md index ea2c62ead..de6d6b800 100644 --- a/docs/README-VN.md +++ b/docs/README-VN.md @@ -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: diff --git a/docs/README-ZH.md b/docs/README-ZH.md index 7967f7d30..1229f8ad5 100644 --- a/docs/README-ZH.md +++ b/docs/README-ZH.md @@ -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 容器: From 85eb82e69d084e50811b95dc34e5fbe3a21830e2 Mon Sep 17 00:00:00 2001 From: leroyloren <57643470+leroyloren@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:31:49 +0200 Subject: [PATCH 07/18] Update cs.rs --- src/lang/cs.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lang/cs.rs b/src/lang/cs.rs index 3ba2c4a23..bd2b8cee3 100644 --- a/src/lang/cs.rs +++ b/src/lang/cs.rs @@ -556,14 +556,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("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", ""), + ("Remove wallpaper during incoming sessions", "Odstrait 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"), ].iter().cloned().collect(); } From 82e1fe3f8be32ac1269a223606a0c2d63a09f60e Mon Sep 17 00:00:00 2001 From: leroyloren <57643470+leroyloren@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:34:12 +0200 Subject: [PATCH 08/18] Update cs.rs --- src/lang/cs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lang/cs.rs b/src/lang/cs.rs index bd2b8cee3..00eb95248 100644 --- a/src/lang/cs.rs +++ b/src/lang/cs.rs @@ -555,8 +555,8 @@ 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", "Odstrait tapetu během příchozích relací"), + ("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."), From b3948910ff8b4d9abee83a08484819412e5d1ea3 Mon Sep 17 00:00:00 2001 From: dignow Date: Sat, 21 Oct 2023 13:10:51 +0800 Subject: [PATCH 09/18] fix is x11, on conn Signed-off-by: dignow --- src/common.rs | 18 +++++------------- src/flutter_ffi.rs | 2 +- src/platform/linux.rs | 9 +++++++++ src/server/display_service.rs | 19 ++++++------------- src/server/input_service.rs | 4 +--- src/server/video_service.rs | 12 +++++------- src/server/wayland.rs | 15 +++++++++------ 7 files changed, 36 insertions(+), 43 deletions(-) diff --git a/src/common.rs b/src/common.rs index 3b2f5ca3e..cf75fab1b 100644 --- a/src/common.rs +++ b/src/common.rs @@ -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 { .collect::>() } -#[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) -> String { use serde_json::json; let mut fd_json = serde_json::Map::new(); diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rs index f1d7e5923..efd2a3e82 100644 --- a/src/flutter_ffi.rs +++ b/src/flutter_ffi.rs @@ -1584,7 +1584,7 @@ pub fn main_is_installed() -> SyncReturn { pub fn main_start_grab_keyboard() -> SyncReturn { #[cfg(target_os = "linux")] - if !*crate::common::IS_X11 { + if !crate::platform::linux::is_x11() { return SyncReturn(false); } crate::keyboard::client::start_grab_loop(); diff --git a/src/platform/linux.rs b/src/platform/linux.rs index 37b27cf64..87dc8d071 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -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 = RefCell::new(unsafe { xdo_new(std::ptr::null()) }); static DISPLAY: RefCell<*mut c_void> = RefCell::new(unsafe { XOpenDisplay(std::ptr::null())}); @@ -1360,3 +1364,8 @@ impl Drop for WallPaperRemover { } } } + +#[inline] +pub fn is_x11() -> bool { + *IS_X11 +} diff --git a/src/server/display_service.rs b/src/server/display_service.rs index 780833f78..62f5cac3d 100644 --- a/src/server/display_service.rs +++ b/src/server/display_service.rs @@ -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) { pub fn is_inited_msg() -> Option { #[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 { pub async fn update_get_sync_displays() -> ResultType> { #[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> { 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, diff --git a/src/server/input_service.rs b/src/server/input_service.rs index d40bf02c1..a90a0005d 100644 --- a/src/server/input_service.rs +++ b/src/server/input_service.rs @@ -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; diff --git a/src/server/video_service.rs b/src/server/video_service.rs index c2a9b6113..d5f39a2c6 100644 --- a/src/server/video_service.rs +++ b/src/server/video_service.rs @@ -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 { #[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 { #[cfg(target_os = "linux")] - if !IS_X11.load(Ordering::SeqCst) { + if !is_x11() { return super::wayland::is_inited(); } None diff --git a/src/server/wayland.rs b/src/server/wayland.rs index 38edc4472..f869266bc 100644 --- a/src/server/wayland.rs +++ b/src/server/wayland.rs @@ -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 { - 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 { } 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 { } 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 { - if scrap::is_x11() { + if is_x11() { bail!("Do not call this function if not wayland"); } let addr = *CAP_DISPLAY_INFO.read().unwrap(); From c268a0ab145fabff8c08ab3a2736b54cfd730a7d Mon Sep 17 00:00:00 2001 From: 21pages Date: Sat, 21 Oct 2023 15:25:01 +0800 Subject: [PATCH 10/18] show reconnect timeout and dismiss all dialog when show reconnecting Signed-off-by: 21pages --- flutter/lib/common.dart | 82 ++++++++++++++++++++++++++++------- flutter/lib/models/model.dart | 5 ++- 2 files changed, 71 insertions(+), 16 deletions(-) diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index 834b3bec3..0ab790720 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -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 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 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, + ); + } +} diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dart index 433d3c2d4..0d257eaf0 100644 --- a/flutter/lib/models/model.dart +++ b/flutter/lib/models/model.dart @@ -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); } From f531cd23ee0a68976f6d9c35ac71dd88ce362610 Mon Sep 17 00:00:00 2001 From: fufesou Date: Sat, 21 Oct 2023 23:24:54 +0800 Subject: [PATCH 11/18] add selinux tip Signed-off-by: fufesou --- Cargo.lock | 164 +++++++++++++----- Cargo.toml | 1 + .../lib/desktop/pages/connection_page.dart | 7 +- .../lib/desktop/pages/desktop_home_page.dart | 49 ++++-- src/flutter_ffi.rs | 11 ++ src/lang/ar.rs | 1 + src/lang/ca.rs | 1 + src/lang/cn.rs | 1 + src/lang/cs.rs | 1 + src/lang/da.rs | 1 + src/lang/de.rs | 1 + src/lang/el.rs | 1 + src/lang/en.rs | 1 + src/lang/eo.rs | 1 + src/lang/es.rs | 1 + src/lang/fa.rs | 1 + src/lang/fr.rs | 1 + src/lang/hu.rs | 1 + src/lang/id.rs | 1 + src/lang/it.rs | 2 +- src/lang/ja.rs | 1 + src/lang/ko.rs | 1 + src/lang/kz.rs | 1 + src/lang/lt.rs | 1 + src/lang/lv.rs | 1 + src/lang/nl.rs | 1 + src/lang/pl.rs | 1 + src/lang/pt_PT.rs | 1 + src/lang/ptbr.rs | 1 + src/lang/ro.rs | 1 + src/lang/ru.rs | 1 + src/lang/sk.rs | 1 + src/lang/sl.rs | 1 + src/lang/sq.rs | 1 + src/lang/sr.rs | 1 + src/lang/sv.rs | 1 + src/lang/template.rs | 1 + src/lang/th.rs | 1 + src/lang/tr.rs | 1 + src/lang/tw.rs | 1 + src/lang/ua.rs | 1 + src/lang/vn.rs | 1 + src/platform/linux.rs | 8 + 43 files changed, 216 insertions(+), 62 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b606cdb21..b93fa4752 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -83,7 +83,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8512c9117059663fb5606788fbca3619e2a91dac0e3fe516242eab1fa6be5e44" dependencies = [ "alsa-sys", - "bitflags", + "bitflags 1.3.2", "libc", "nix 0.24.3", ] @@ -375,7 +375,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39991bc421ddf72f70159011b323ff49b0f783cc676a7287c59453da2e2531cf" dependencies = [ "atk-sys", - "bitflags", + "bitflags 1.3.2", "glib 0.16.7", "libc", ] @@ -466,7 +466,7 @@ version = "0.59.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cexpr", "clang-sys", "clap 2.34.0", @@ -489,7 +489,7 @@ version = "0.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36d860121800b2a9a94f9b5604b332d5cffb234ce17609ea479d723dbc9d3885" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cexpr", "clang-sys", "lazy_static", @@ -511,7 +511,7 @@ version = "0.64.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cexpr", "clang-sys", "lazy_static", @@ -531,7 +531,30 @@ version = "0.65.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" dependencies = [ - "bitflags", + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "prettyplease", + "proc-macro2 1.0.63", + "quote 1.0.27", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.15", + "which", +] + +[[package]] +name = "bindgen" +version = "0.66.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +dependencies = [ + "bitflags 2.4.1", "cexpr", "clang-sys", "lazy_static", @@ -560,6 +583,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + [[package]] name = "bitvec" version = "1.0.1" @@ -683,7 +712,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3125b15ec28b84c238f6f476c6034016a5f6cc0221cb514ca46c532139fc97d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-sys-rs", "glib 0.16.7", "libc", @@ -854,7 +883,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags", + "bitflags 1.3.2", "strsim 0.8.0", "textwrap 0.11.0", "unicode-width", @@ -868,7 +897,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "atty", - "bitflags", + "bitflags 1.3.2", "clap_lex 0.2.4", "indexmap", "strsim 0.10.0", @@ -895,7 +924,7 @@ checksum = "914c8c79fb560f238ef6429439a30023c862f7a28e688c58f7203f12b29970bd" dependencies = [ "anstream", "anstyle", - "bitflags", + "bitflags 1.3.2", "clap_lex 0.4.1", "strsim 0.10.0", ] @@ -956,7 +985,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -974,7 +1003,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "cocoa-foundation", "core-foundation", @@ -990,7 +1019,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "core-foundation", "core-graphics-types", @@ -1144,7 +1173,7 @@ version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-graphics-types", "foreign-types", @@ -1157,7 +1186,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "foreign-types", "libc", @@ -1169,7 +1198,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb17e2d1795b1996419648915df94bc7103c28f7b48062d7acf4652fc371b2ff" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation-sys 0.6.2", "coreaudio-sys", ] @@ -1753,6 +1782,12 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + [[package]] name = "dylib_virtual_display" version = "0.1.0" @@ -1933,7 +1968,7 @@ version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20df693c700404f7e19d4d6fae6b15215d2913c27955d2b9d6f2c0f537511cd0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", ] @@ -2331,7 +2366,7 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9cb33da481c6c040404a11f8212d193889e9b435db2c14fd86987f630d3ce1" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "gdk-pixbuf", "gdk-sys", @@ -2347,7 +2382,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3578c60dee9d029ad86593ed88cb40f35c1b83360e12498d055022385dd9a05" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gdk-pixbuf-sys", "gio", "glib 0.16.7", @@ -2466,7 +2501,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a1c84b4534a290a29160ef5c6eff2a9c95833111472e824fc5cb78b513dd092" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-core", "futures-io", @@ -2499,7 +2534,7 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf7f68c2995f392c49fffb4f95ae2c873297830eb25c6bc4c114ce8f4562acc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "libgit2-sys", "log", @@ -2512,7 +2547,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c685013b7515e668f1b57a165b009d4d28cb139a8a989bbd699c10dad29d0c5" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-core", "futures-executor", @@ -2531,7 +2566,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddd4df61a866ed7259d6189b8bcb1464989a77f1d85d25d002279bbe9dd38b2f" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-core", "futures-executor", @@ -2632,7 +2667,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ff5d0f7ff308ae37e6eb47b6ded17785bdea06e438a708cd09e0288c1862f33" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "futures-channel", "futures-core", @@ -2656,7 +2691,7 @@ version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc80888271338c3ede875d8cafc452eb207476ff5539dcbe0018a8f5b827af0e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-core", "futures-sink", "glib 0.10.3", @@ -2689,7 +2724,7 @@ version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bafd01c56f59cb10f4b5a10f97bb4bdf8c2b2784ae5b04da7e2d400cf6e6afcf" dependencies = [ - "bitflags", + "bitflags 1.3.2", "glib 0.10.3", "glib-sys 0.10.1", "gobject-sys 0.10.0", @@ -2730,7 +2765,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7bbb1485d87469849ec45c08e03c2f280d3ea20ff3c439d03185be54e3ce98e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-util", "glib 0.10.3", @@ -2766,7 +2801,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4d3507d43908c866c805f74c9dd593c0ce7ba5c38e576e41846639cdcd4bee6" dependencies = [ "atk", - "bitflags", + "bitflags 1.3.2", "cairo-rs", "field-offset", "futures-channel", @@ -3140,7 +3175,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf888f9575c290197b2c948dc9e9ff10bd1a39ad1ea8585f734585fa6b9d3f9" dependencies = [ - "bitflags", + "bitflags 1.3.2", "inotify-sys", "libc", ] @@ -3336,7 +3371,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7668b7cff6a51fe61cdde64cd27c8a220786f399501b57ebe36f7d8112fd68" dependencies = [ - "bitflags", + "bitflags 1.3.2", "serde 1.0.163", "unicode-segmentation", ] @@ -3442,7 +3477,7 @@ version = "2.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1745b20bfc194ac12ef828f144f0ec2d4a7fe993281fa3567a0bd4969aee6890" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "libpulse-sys", "num-derive", @@ -3779,7 +3814,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "jni-sys", "ndk-sys", "num_enum", @@ -3821,7 +3856,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea993e32c77d87f01236c38f572ecb6c311d592e56a06262a007fd2a6e31253c" dependencies = [ "anyhow", - "bitflags", + "bitflags 1.3.2", "byteorder", "libc", "netlink-packet-core", @@ -3857,7 +3892,7 @@ version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cc", "cfg-if 1.0.0", "libc", @@ -3870,7 +3905,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "libc", "memoffset 0.6.5", @@ -3882,7 +3917,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "libc", "memoffset 0.7.1", @@ -4121,9 +4156,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" @@ -4236,7 +4271,7 @@ version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdff66b271861037b89d028656184059e03b0b6ccb36003820be19f7200b1e94" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gio", "glib 0.16.7", "libc", @@ -4442,7 +4477,7 @@ version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", @@ -4456,7 +4491,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg 1.1.0", - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "concurrent-queue", "libc", @@ -4935,7 +4970,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -4944,7 +4979,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -4958,6 +4993,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "reference-counted-singleton" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bfbf25d7eb88ddcbb1ec3d755d0634da8f7657b2cb8b74089121409ab8228f" + [[package]] name = "regex" version = "1.8.1" @@ -5207,6 +5248,7 @@ dependencies = [ "samplerate", "sciter-rs", "scrap", + "selinux", "serde 1.0.163", "serde_derive", "serde_json 1.0.96", @@ -5265,7 +5307,7 @@ version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -5442,7 +5484,7 @@ version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys 0.8.4", "libc", @@ -5459,6 +5501,32 @@ dependencies = [ "libc", ] +[[package]] +name = "selinux" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80b091d970bd4a17a59cb1b7c537786f2bee4292abb5ec89ee3b7f17e9077138" +dependencies = [ + "bitflags 2.4.1", + "libc", + "once_cell", + "reference-counted-singleton", + "selinux-sys", + "thiserror", +] + +[[package]] +name = "selinux-sys" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56602385930248c57e45f6174a6a48e12b723d0cc2ae8f467fcbe80c0d06f41" +dependencies = [ + "bindgen 0.66.1", + "cc", + "dunce", + "walkdir", +] + [[package]] name = "semver" version = "1.0.17" @@ -5858,7 +5926,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d75182f12f490e953596550b65ee31bda7c8e043d9386174b353bda50838c3fd" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "system-configuration-sys", ] @@ -5916,7 +5984,7 @@ name = "tao" version = "0.22.2" source = "git+https://github.com/rustdesk-org/tao?branch=dev#1e5b97258cf42a30f80f85a6aa0b1a4aece1977e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "cc", "cocoa", @@ -6935,7 +7003,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd9db37ecb5b13762d95468a2fc6009d4b2c62801243223aabd44fca13ad13c8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "widestring", "windows-sys 0.45.0", ] diff --git a/Cargo.toml b/Cargo.toml index f6c014483..711a1caca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -132,6 +132,7 @@ dbus = "0.9" dbus-crossroads = "0.5" pam = { git="https://github.com/fufesou/pam", optional = true } users = { version = "0.11" } +selinux = "0.4.2" [target.'cfg(target_os = "android")'.dependencies] android_logger = "0.13" diff --git a/flutter/lib/desktop/pages/connection_page.dart b/flutter/lib/desktop/pages/connection_page.dart index 859fd0d70..272fd7c7b 100644 --- a/flutter/lib/desktop/pages/connection_page.dart +++ b/flutter/lib/desktop/pages/connection_page.dart @@ -37,7 +37,6 @@ class _ConnectionPageState extends State Timer? _updateTimer; final RxBool _idInputFocused = false.obs; - final FocusNode _idFocusNode = FocusNode(); var svcStopped = Get.find(tag: 'stop-service'); var svcIsUsingPublicServer = true.obs; @@ -334,8 +333,10 @@ class _ConnectionPageState extends State optionsViewBuilder: (BuildContext context, AutocompleteOnSelected onSelected, Iterable options) { double maxHeight = 0; for (var peer in options) { - if (maxHeight < 200) - maxHeight += 50; }; + if (maxHeight < 200) { + maxHeight += 50; + } + } return Align( alignment: Alignment.topLeft, child: ClipRRect( diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart index 8633af1d3..74002dfc2 100644 --- a/flutter/lib/desktop/pages/desktop_home_page.dart +++ b/flutter/lib/desktop/pages/desktop_home_page.dart @@ -378,16 +378,36 @@ class _DesktopHomePageState extends State // }); // } } else if (Platform.isLinux) { + final LinuxCards = []; if (bind.mainCurrentIsWayland()) { - return buildInstallCard( + LinuxCards.add(buildInstallCard( "Warning", "wayland_experiment_tip", "", () async {}, 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 {}, help: 'Help', - link: 'https://rustdesk.com/docs/en/manual/linux/#login-screen'); + link: 'https://rustdesk.com/docs/en/manual/linux/#login-screen')); + } + if (bind.isSelinuxEnabled()) { + 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 (LinuxCards.isNotEmpty) { + return Column( + children: LinuxCards, + ); } } return Container(); @@ -395,17 +415,26 @@ class _DesktopHomePageState extends State 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( diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rs index efd2a3e82..7e1aa44e4 100644 --- a/src/flutter_ffi.rs +++ b/src/flutter_ffi.rs @@ -1935,6 +1935,17 @@ pub fn is_support_multi_ui_session(version: String) -> SyncReturn { SyncReturn(crate::common::is_support_multi_ui_session(&version)) } +pub fn is_selinux_enabled() -> SyncReturn { + #[cfg(target_os = "linux")] + { + SyncReturn(crate::platform::linux::is_selinux_enabled()) + } + #[cfg(not(target_os = "linux"))] + { + SyncReturn(false) + } +} + #[cfg(target_os = "android")] pub mod server_side { use hbb_common::{config, log}; diff --git a/src/lang/ar.rs b/src/lang/ar.rs index 4b80047d5..425f49d3a 100644 --- a/src/lang/ar.rs +++ b/src/lang/ar.rs @@ -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(); } diff --git a/src/lang/ca.rs b/src/lang/ca.rs index bd62b21c7..8057430e5 100644 --- a/src/lang/ca.rs +++ b/src/lang/ca.rs @@ -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(); } diff --git a/src/lang/cn.rs b/src/lang/cn.rs index 2893eb9a5..0a4f5beea 100644 --- a/src/lang/cn.rs +++ b/src/lang/cn.rs @@ -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(); } diff --git a/src/lang/cs.rs b/src/lang/cs.rs index 00eb95248..c7e620665 100644 --- a/src/lang/cs.rs +++ b/src/lang/cs.rs @@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("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(); } diff --git a/src/lang/da.rs b/src/lang/da.rs index 2f1076fd1..634c7e8a9 100644 --- a/src/lang/da.rs +++ b/src/lang/da.rs @@ -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(); } diff --git a/src/lang/de.rs b/src/lang/de.rs index b15023495..6b5beb305 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Open in new window", "In einem neuen Fenster öffnen"), ("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", ""), ].iter().cloned().collect(); } diff --git a/src/lang/el.rs b/src/lang/el.rs index 940889e16..baf16f82e 100644 --- a/src/lang/el.rs +++ b/src/lang/el.rs @@ -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(); } diff --git a/src/lang/en.rs b/src/lang/en.rs index 56dc8a122..6dc185f99 100644 --- a/src/lang/en.rs +++ b/src/lang/en.rs @@ -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."), ].iter().cloned().collect(); } diff --git a/src/lang/eo.rs b/src/lang/eo.rs index 8685fa567..5c3c3eec1 100644 --- a/src/lang/eo.rs +++ b/src/lang/eo.rs @@ -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(); } diff --git a/src/lang/es.rs b/src/lang/es.rs index 093298835..426e80a8e 100644 --- a/src/lang/es.rs +++ b/src/lang/es.rs @@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("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(); } diff --git a/src/lang/fa.rs b/src/lang/fa.rs index 845cb1868..28acc2c13 100644 --- a/src/lang/fa.rs +++ b/src/lang/fa.rs @@ -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(); } diff --git a/src/lang/fr.rs b/src/lang/fr.rs index 9f1954f7d..a2bc13a77 100644 --- a/src/lang/fr.rs +++ b/src/lang/fr.rs @@ -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(); } diff --git a/src/lang/hu.rs b/src/lang/hu.rs index 882663b7e..e56cad01e 100644 --- a/src/lang/hu.rs +++ b/src/lang/hu.rs @@ -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(); } diff --git a/src/lang/id.rs b/src/lang/id.rs index 21ba8a86a..f0306b962 100644 --- a/src/lang/id.rs +++ b/src/lang/id.rs @@ -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(); } diff --git a/src/lang/it.rs b/src/lang/it.rs index 617e0f0c5..738dfa79e 100644 --- a/src/lang/it.rs +++ b/src/lang/it.rs @@ -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(); } diff --git a/src/lang/ja.rs b/src/lang/ja.rs index 059b355db..51496107f 100644 --- a/src/lang/ja.rs +++ b/src/lang/ja.rs @@ -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(); } diff --git a/src/lang/ko.rs b/src/lang/ko.rs index 0a7affb3b..49cfd2931 100644 --- a/src/lang/ko.rs +++ b/src/lang/ko.rs @@ -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(); } diff --git a/src/lang/kz.rs b/src/lang/kz.rs index 73fc04469..5fc4a4795 100644 --- a/src/lang/kz.rs +++ b/src/lang/kz.rs @@ -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(); } diff --git a/src/lang/lt.rs b/src/lang/lt.rs index 39747e0d4..2c3551989 100644 --- a/src/lang/lt.rs +++ b/src/lang/lt.rs @@ -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(); } diff --git a/src/lang/lv.rs b/src/lang/lv.rs index 6dd5a2b0b..d7783e052 100644 --- a/src/lang/lv.rs +++ b/src/lang/lv.rs @@ -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", ""), ].iter().cloned().collect(); } diff --git a/src/lang/nl.rs b/src/lang/nl.rs index 7a8189682..0365206a9 100644 --- a/src/lang/nl.rs +++ b/src/lang/nl.rs @@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("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(); } diff --git a/src/lang/pl.rs b/src/lang/pl.rs index 91c508aaa..f82cd4588 100644 --- a/src/lang/pl.rs +++ b/src/lang/pl.rs @@ -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(); } diff --git a/src/lang/pt_PT.rs b/src/lang/pt_PT.rs index 9c3c01660..979add253 100644 --- a/src/lang/pt_PT.rs +++ b/src/lang/pt_PT.rs @@ -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(); } diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rs index 9b052947f..fac32ccf1 100644 --- a/src/lang/ptbr.rs +++ b/src/lang/ptbr.rs @@ -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(); } diff --git a/src/lang/ro.rs b/src/lang/ro.rs index 61d44813d..83392ed77 100644 --- a/src/lang/ro.rs +++ b/src/lang/ro.rs @@ -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(); } diff --git a/src/lang/ru.rs b/src/lang/ru.rs index af7bf5cf3..82c9a9601 100644 --- a/src/lang/ru.rs +++ b/src/lang/ru.rs @@ -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(); } diff --git a/src/lang/sk.rs b/src/lang/sk.rs index b124aed71..07029c213 100644 --- a/src/lang/sk.rs +++ b/src/lang/sk.rs @@ -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(); } diff --git a/src/lang/sl.rs b/src/lang/sl.rs index e1bf2ab8e..83594ea75 100755 --- a/src/lang/sl.rs +++ b/src/lang/sl.rs @@ -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(); } diff --git a/src/lang/sq.rs b/src/lang/sq.rs index 1d9b218a6..f9f49345d 100644 --- a/src/lang/sq.rs +++ b/src/lang/sq.rs @@ -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(); } diff --git a/src/lang/sr.rs b/src/lang/sr.rs index 754192fc3..956be5e33 100644 --- a/src/lang/sr.rs +++ b/src/lang/sr.rs @@ -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(); } diff --git a/src/lang/sv.rs b/src/lang/sv.rs index 007e180bb..7a1faa19a 100644 --- a/src/lang/sv.rs +++ b/src/lang/sv.rs @@ -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(); } diff --git a/src/lang/template.rs b/src/lang/template.rs index f14c3e206..6b6f28e5f 100644 --- a/src/lang/template.rs +++ b/src/lang/template.rs @@ -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(); } diff --git a/src/lang/th.rs b/src/lang/th.rs index bb13d82b6..89b753bc6 100644 --- a/src/lang/th.rs +++ b/src/lang/th.rs @@ -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(); } diff --git a/src/lang/tr.rs b/src/lang/tr.rs index 394b9bca9..b1f3f3cd2 100644 --- a/src/lang/tr.rs +++ b/src/lang/tr.rs @@ -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(); } diff --git a/src/lang/tw.rs b/src/lang/tw.rs index cdc900ae2..cb7d7516a 100644 --- a/src/lang/tw.rs +++ b/src/lang/tw.rs @@ -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(); } diff --git a/src/lang/ua.rs b/src/lang/ua.rs index 02c4e2349..05a74f633 100644 --- a/src/lang/ua.rs +++ b/src/lang/ua.rs @@ -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(); } diff --git a/src/lang/vn.rs b/src/lang/vn.rs index 0e0cf6a05..9c259b8fa 100644 --- a/src/lang/vn.rs +++ b/src/lang/vn.rs @@ -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(); } diff --git a/src/platform/linux.rs b/src/platform/linux.rs index 87dc8d071..bb3474d41 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -1369,3 +1369,11 @@ impl Drop for WallPaperRemover { pub fn is_x11() -> bool { *IS_X11 } + +#[inline] +pub fn is_selinux_enabled() -> bool { + match selinux::kernel_support() { + selinux::KernelSupport::Unsupported => false, + _ => selinux::current_mode() == selinux::SELinuxMode::Enforcing, + } +} From 827c32fafd7c5373f664a9edf36dbd44fabbe885 Mon Sep 17 00:00:00 2001 From: fufesou Date: Sun, 22 Oct 2023 10:56:41 +0800 Subject: [PATCH 12/18] add deps Signed-off-by: fufesou --- .github/workflows/flutter-build.yml | 16 ++++++------- .../lib/desktop/pages/desktop_home_page.dart | 24 ++++++++++--------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index 2aa6e564a..7761518e7 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -526,7 +526,7 @@ jobs: - name: Install dependencies run: | sudo apt update - sudo apt-get -qq install -y 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 libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libpam0g-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ libc6-dev gcc-multilib g++-multilib openjdk-11-jdk-headless + sudo apt-get -qq install -y 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 libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libpam0g-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ libc6-dev gcc-multilib g++-multilib openjdk-11-jdk-headless libselinux1-dev - name: Checkout source code uses: actions/checkout@v3 - name: Install flutter @@ -760,7 +760,7 @@ jobs: install: | apt update -y echo -e "installing deps" - apt-get -qq install -y 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 libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libpam0g-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ gcc libvpx-dev tree > /dev/null + apt-get -qq install -y 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 libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libpam0g-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ gcc libvpx-dev tree libselinux1-dev > /dev/null # we have libopus compiled by us. apt remove -y libopus-dev || true # output devs @@ -909,7 +909,7 @@ jobs: install: | apt update -y echo -e "installing deps" - apt-get -qq install -y 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 libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libpam0g-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ gcc libvpx-dev tree > /dev/null + apt-get -qq install -y 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 libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libpam0g-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ gcc libvpx-dev tree libselinux1-dev > /dev/null # we have libopus compiled by us. apt remove -y libopus-dev || true # output devs @@ -1028,7 +1028,7 @@ jobs: apt update -y apt-get -qq install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev rpm libclang-dev apt-get -qq install -y libdbus-1-dev pkg-config nasm yasm libglib2.0-dev libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev - apt-get -qq install -y libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvpx-dev libvdpau-dev libva-dev libpam0g-dev + apt-get -qq install -y libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvpx-dev libvdpau-dev libva-dev libpam0g-dev libselinux1-dev run: | # disable git safe.directory git config --global --add safe.directory "*" @@ -1134,7 +1134,7 @@ jobs: - name: Prepare env run: | sudo apt update -y - sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools + sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools libselinux1-dev mkdir -p ./target/release/ - name: Restore the rustdesk lib file @@ -1172,7 +1172,7 @@ jobs: shell: /bin/bash install: | apt update -y - apt-get -qq install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev rpm + apt-get -qq install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev rpm libselinux1-dev run: | # disable git safe.directory git config --global --add safe.directory "*" @@ -1394,7 +1394,7 @@ jobs: - name: Prepare env run: | sudo apt update -y - sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools + sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools libselinux1-dev mkdir -p ./target/release/ - name: Restore the rustdesk lib file @@ -1418,7 +1418,7 @@ jobs: shell: /bin/bash install: | apt update -y - apt-get -qq install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev rpm + apt-get -qq install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev rpm libselinux1-dev run: | # disable git safe.directory git config --global --add safe.directory "*" diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart index 74002dfc2..def0d8453 100644 --- a/flutter/lib/desktop/pages/desktop_home_page.dart +++ b/flutter/lib/desktop/pages/desktop_home_page.dart @@ -379,17 +379,6 @@ class _DesktopHomePageState extends State // } } else if (Platform.isLinux) { final LinuxCards = []; - if (bind.mainCurrentIsWayland()) { - LinuxCards.add(buildInstallCard( - "Warning", "wayland_experiment_tip", "", () async {}, - help: 'Help', - link: 'https://rustdesk.com/docs/en/manual/linux/#x11-required')); - } else if (bind.mainIsLoginWayland()) { - LinuxCards.add(buildInstallCard("Warning", - "Login screen using Wayland is not supported", "", () async {}, - help: 'Help', - link: 'https://rustdesk.com/docs/en/manual/linux/#login-screen')); - } if (bind.isSelinuxEnabled()) { final keyShowSelinuxHelpTip = "show-selinux-help-tip"; if (bind.mainGetLocalOption(key: keyShowSelinuxHelpTip) != 'N') { @@ -404,6 +393,19 @@ class _DesktopHomePageState extends State )); } } + if (bind.mainCurrentIsWayland()) { + 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')); + } else if (bind.mainIsLoginWayland()) { + 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')); + } if (LinuxCards.isNotEmpty) { return Column( children: LinuxCards, From 842255766fcffe189fc72b6b496cbe9137474557 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Sun, 22 Oct 2023 13:05:37 +0800 Subject: [PATCH 13/18] Update en.rs --- src/lang/en.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/en.rs b/src/lang/en.rs index 6dc185f99..209772ccc 100644 --- a/src/lang/en.rs +++ b/src/lang/en.rs @@ -225,6 +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."), + ("selinux_tip", "SELinux is enabled on your device, which may prevent RustDesk from running properly as controlled side."), ].iter().cloned().collect(); } From 4633a0450cb22c777fcc14c743e789892f7ec73d Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Sun, 22 Oct 2023 13:06:17 +0800 Subject: [PATCH 14/18] Update cn.rs --- src/lang/cn.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/cn.rs b/src/lang/cn.rs index 0a4f5beea..0be9738e8 100644 --- a/src/lang/cn.rs +++ b/src/lang/cn.rs @@ -565,6 +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 可能无法正常运行。"), + ("selinux_tip", "SELinux 处于启用状态,RustDesk 可能无法作为被控正常运行。"), ].iter().cloned().collect(); } From 5c23dfd63333524fb17c249db803ecaa4ca6099f Mon Sep 17 00:00:00 2001 From: fufesou Date: Sun, 22 Oct 2023 14:22:15 +0800 Subject: [PATCH 15/18] selinux tip, remove rust dep 'selinux' Signed-off-by: fufesou --- .github/workflows/flutter-build.yml | 16 +- Cargo.lock | 160 +++++------------- Cargo.toml | 1 - .../lib/desktop/pages/desktop_home_page.dart | 3 +- src/flutter_ffi.rs | 4 +- src/platform/linux.rs | 18 +- 6 files changed, 72 insertions(+), 130 deletions(-) diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index 7761518e7..2aa6e564a 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -526,7 +526,7 @@ jobs: - name: Install dependencies run: | sudo apt update - sudo apt-get -qq install -y 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 libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libpam0g-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ libc6-dev gcc-multilib g++-multilib openjdk-11-jdk-headless libselinux1-dev + sudo apt-get -qq install -y 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 libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libpam0g-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ libc6-dev gcc-multilib g++-multilib openjdk-11-jdk-headless - name: Checkout source code uses: actions/checkout@v3 - name: Install flutter @@ -760,7 +760,7 @@ jobs: install: | apt update -y echo -e "installing deps" - apt-get -qq install -y 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 libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libpam0g-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ gcc libvpx-dev tree libselinux1-dev > /dev/null + apt-get -qq install -y 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 libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libpam0g-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ gcc libvpx-dev tree > /dev/null # we have libopus compiled by us. apt remove -y libopus-dev || true # output devs @@ -909,7 +909,7 @@ jobs: install: | apt update -y echo -e "installing deps" - apt-get -qq install -y 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 libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libpam0g-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ gcc libvpx-dev tree libselinux1-dev > /dev/null + apt-get -qq install -y 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 libclang-dev ninja-build libappindicator3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvdpau-dev libva-dev libpam0g-dev libclang-dev llvm-dev libclang-10-dev llvm-10-dev pkg-config tree g++ gcc libvpx-dev tree > /dev/null # we have libopus compiled by us. apt remove -y libopus-dev || true # output devs @@ -1028,7 +1028,7 @@ jobs: apt update -y apt-get -qq install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev rpm libclang-dev apt-get -qq install -y libdbus-1-dev pkg-config nasm yasm libglib2.0-dev libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev - apt-get -qq install -y libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvpx-dev libvdpau-dev libva-dev libpam0g-dev libselinux1-dev + apt-get -qq install -y libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libvpx-dev libvdpau-dev libva-dev libpam0g-dev run: | # disable git safe.directory git config --global --add safe.directory "*" @@ -1134,7 +1134,7 @@ jobs: - name: Prepare env run: | sudo apt update -y - sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools libselinux1-dev + sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools mkdir -p ./target/release/ - name: Restore the rustdesk lib file @@ -1172,7 +1172,7 @@ jobs: shell: /bin/bash install: | apt update -y - apt-get -qq install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev rpm libselinux1-dev + apt-get -qq install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev rpm run: | # disable git safe.directory git config --global --add safe.directory "*" @@ -1394,7 +1394,7 @@ jobs: - name: Prepare env run: | sudo apt update -y - sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools libselinux1-dev + sudo apt-get -qq install -y git curl wget nasm yasm libgtk-3-dev libarchive-tools mkdir -p ./target/release/ - name: Restore the rustdesk lib file @@ -1418,7 +1418,7 @@ jobs: shell: /bin/bash install: | apt update -y - apt-get -qq install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev rpm libselinux1-dev + apt-get -qq install -y git cmake g++ gcc build-essential nasm yasm curl unzip xz-utils python3 wget pkg-config ninja-build pkg-config libgtk-3-dev liblzma-dev clang libappindicator3-dev rpm run: | # disable git safe.directory git config --global --add safe.directory "*" diff --git a/Cargo.lock b/Cargo.lock index b93fa4752..4e34f5bb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -83,7 +83,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8512c9117059663fb5606788fbca3619e2a91dac0e3fe516242eab1fa6be5e44" dependencies = [ "alsa-sys", - "bitflags 1.3.2", + "bitflags", "libc", "nix 0.24.3", ] @@ -375,7 +375,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39991bc421ddf72f70159011b323ff49b0f783cc676a7287c59453da2e2531cf" dependencies = [ "atk-sys", - "bitflags 1.3.2", + "bitflags", "glib 0.16.7", "libc", ] @@ -466,7 +466,7 @@ version = "0.59.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cexpr", "clang-sys", "clap 2.34.0", @@ -489,7 +489,7 @@ version = "0.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36d860121800b2a9a94f9b5604b332d5cffb234ce17609ea479d723dbc9d3885" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cexpr", "clang-sys", "lazy_static", @@ -511,7 +511,7 @@ version = "0.64.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cexpr", "clang-sys", "lazy_static", @@ -531,30 +531,7 @@ version = "0.65.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "prettyplease", - "proc-macro2 1.0.63", - "quote 1.0.27", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.15", - "which", -] - -[[package]] -name = "bindgen" -version = "0.66.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" -dependencies = [ - "bitflags 2.4.1", + "bitflags", "cexpr", "clang-sys", "lazy_static", @@ -583,12 +560,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - [[package]] name = "bitvec" version = "1.0.1" @@ -712,7 +683,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3125b15ec28b84c238f6f476c6034016a5f6cc0221cb514ca46c532139fc97d" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cairo-sys-rs", "glib 0.16.7", "libc", @@ -883,7 +854,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags 1.3.2", + "bitflags", "strsim 0.8.0", "textwrap 0.11.0", "unicode-width", @@ -897,7 +868,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "atty", - "bitflags 1.3.2", + "bitflags", "clap_lex 0.2.4", "indexmap", "strsim 0.10.0", @@ -924,7 +895,7 @@ checksum = "914c8c79fb560f238ef6429439a30023c862f7a28e688c58f7203f12b29970bd" dependencies = [ "anstream", "anstyle", - "bitflags 1.3.2", + "bitflags", "clap_lex 0.4.1", "strsim 0.10.0", ] @@ -985,7 +956,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] @@ -1003,7 +974,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" dependencies = [ - "bitflags 1.3.2", + "bitflags", "block", "cocoa-foundation", "core-foundation", @@ -1019,7 +990,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" dependencies = [ - "bitflags 1.3.2", + "bitflags", "block", "core-foundation", "core-graphics-types", @@ -1173,7 +1144,7 @@ version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "core-graphics-types", "foreign-types", @@ -1186,7 +1157,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "foreign-types", "libc", @@ -1198,7 +1169,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb17e2d1795b1996419648915df94bc7103c28f7b48062d7acf4652fc371b2ff" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation-sys 0.6.2", "coreaudio-sys", ] @@ -1782,12 +1753,6 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" -[[package]] -name = "dunce" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" - [[package]] name = "dylib_virtual_display" version = "0.1.0" @@ -1968,7 +1933,7 @@ version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20df693c700404f7e19d4d6fae6b15215d2913c27955d2b9d6f2c0f537511cd0" dependencies = [ - "bitflags 1.3.2", + "bitflags", "libc", ] @@ -2366,7 +2331,7 @@ version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9cb33da481c6c040404a11f8212d193889e9b435db2c14fd86987f630d3ce1" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cairo-rs", "gdk-pixbuf", "gdk-sys", @@ -2382,7 +2347,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3578c60dee9d029ad86593ed88cb40f35c1b83360e12498d055022385dd9a05" dependencies = [ - "bitflags 1.3.2", + "bitflags", "gdk-pixbuf-sys", "gio", "glib 0.16.7", @@ -2501,7 +2466,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a1c84b4534a290a29160ef5c6eff2a9c95833111472e824fc5cb78b513dd092" dependencies = [ - "bitflags 1.3.2", + "bitflags", "futures-channel", "futures-core", "futures-io", @@ -2534,7 +2499,7 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf7f68c2995f392c49fffb4f95ae2c873297830eb25c6bc4c114ce8f4562acc" dependencies = [ - "bitflags 1.3.2", + "bitflags", "libc", "libgit2-sys", "log", @@ -2547,7 +2512,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c685013b7515e668f1b57a165b009d4d28cb139a8a989bbd699c10dad29d0c5" dependencies = [ - "bitflags 1.3.2", + "bitflags", "futures-channel", "futures-core", "futures-executor", @@ -2566,7 +2531,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddd4df61a866ed7259d6189b8bcb1464989a77f1d85d25d002279bbe9dd38b2f" dependencies = [ - "bitflags 1.3.2", + "bitflags", "futures-channel", "futures-core", "futures-executor", @@ -2667,7 +2632,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ff5d0f7ff308ae37e6eb47b6ded17785bdea06e438a708cd09e0288c1862f33" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cfg-if 1.0.0", "futures-channel", "futures-core", @@ -2691,7 +2656,7 @@ version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc80888271338c3ede875d8cafc452eb207476ff5539dcbe0018a8f5b827af0e" dependencies = [ - "bitflags 1.3.2", + "bitflags", "futures-core", "futures-sink", "glib 0.10.3", @@ -2724,7 +2689,7 @@ version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bafd01c56f59cb10f4b5a10f97bb4bdf8c2b2784ae5b04da7e2d400cf6e6afcf" dependencies = [ - "bitflags 1.3.2", + "bitflags", "glib 0.10.3", "glib-sys 0.10.1", "gobject-sys 0.10.0", @@ -2765,7 +2730,7 @@ version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7bbb1485d87469849ec45c08e03c2f280d3ea20ff3c439d03185be54e3ce98e" dependencies = [ - "bitflags 1.3.2", + "bitflags", "futures-channel", "futures-util", "glib 0.10.3", @@ -2801,7 +2766,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4d3507d43908c866c805f74c9dd593c0ce7ba5c38e576e41846639cdcd4bee6" dependencies = [ "atk", - "bitflags 1.3.2", + "bitflags", "cairo-rs", "field-offset", "futures-channel", @@ -3175,7 +3140,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf888f9575c290197b2c948dc9e9ff10bd1a39ad1ea8585f734585fa6b9d3f9" dependencies = [ - "bitflags 1.3.2", + "bitflags", "inotify-sys", "libc", ] @@ -3371,7 +3336,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7668b7cff6a51fe61cdde64cd27c8a220786f399501b57ebe36f7d8112fd68" dependencies = [ - "bitflags 1.3.2", + "bitflags", "serde 1.0.163", "unicode-segmentation", ] @@ -3477,7 +3442,7 @@ version = "2.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1745b20bfc194ac12ef828f144f0ec2d4a7fe993281fa3567a0bd4969aee6890" dependencies = [ - "bitflags 1.3.2", + "bitflags", "libc", "libpulse-sys", "num-derive", @@ -3814,7 +3779,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ - "bitflags 1.3.2", + "bitflags", "jni-sys", "ndk-sys", "num_enum", @@ -3856,7 +3821,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea993e32c77d87f01236c38f572ecb6c311d592e56a06262a007fd2a6e31253c" dependencies = [ "anyhow", - "bitflags 1.3.2", + "bitflags", "byteorder", "libc", "netlink-packet-core", @@ -3892,7 +3857,7 @@ version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cc", "cfg-if 1.0.0", "libc", @@ -3905,7 +3870,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cfg-if 1.0.0", "libc", "memoffset 0.6.5", @@ -3917,7 +3882,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cfg-if 1.0.0", "libc", "memoffset 0.7.1", @@ -4271,7 +4236,7 @@ version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdff66b271861037b89d028656184059e03b0b6ccb36003820be19f7200b1e94" dependencies = [ - "bitflags 1.3.2", + "bitflags", "gio", "glib 0.16.7", "libc", @@ -4477,7 +4442,7 @@ version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa" dependencies = [ - "bitflags 1.3.2", + "bitflags", "crc32fast", "fdeflate", "flate2", @@ -4491,7 +4456,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg 1.1.0", - "bitflags 1.3.2", + "bitflags", "cfg-if 1.0.0", "concurrent-queue", "libc", @@ -4970,7 +4935,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] @@ -4979,7 +4944,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] @@ -4993,12 +4958,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "reference-counted-singleton" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bfbf25d7eb88ddcbb1ec3d755d0634da8f7657b2cb8b74089121409ab8228f" - [[package]] name = "regex" version = "1.8.1" @@ -5248,7 +5207,6 @@ dependencies = [ "samplerate", "sciter-rs", "scrap", - "selinux", "serde 1.0.163", "serde_derive", "serde_json 1.0.96", @@ -5307,7 +5265,7 @@ version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ - "bitflags 1.3.2", + "bitflags", "errno", "io-lifetimes", "libc", @@ -5484,7 +5442,7 @@ version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "core-foundation-sys 0.8.4", "libc", @@ -5501,32 +5459,6 @@ dependencies = [ "libc", ] -[[package]] -name = "selinux" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80b091d970bd4a17a59cb1b7c537786f2bee4292abb5ec89ee3b7f17e9077138" -dependencies = [ - "bitflags 2.4.1", - "libc", - "once_cell", - "reference-counted-singleton", - "selinux-sys", - "thiserror", -] - -[[package]] -name = "selinux-sys" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56602385930248c57e45f6174a6a48e12b723d0cc2ae8f467fcbe80c0d06f41" -dependencies = [ - "bindgen 0.66.1", - "cc", - "dunce", - "walkdir", -] - [[package]] name = "semver" version = "1.0.17" @@ -5926,7 +5858,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d75182f12f490e953596550b65ee31bda7c8e043d9386174b353bda50838c3fd" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "system-configuration-sys", ] @@ -5984,7 +5916,7 @@ name = "tao" version = "0.22.2" source = "git+https://github.com/rustdesk-org/tao?branch=dev#1e5b97258cf42a30f80f85a6aa0b1a4aece1977e" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cairo-rs", "cc", "cocoa", @@ -7003,7 +6935,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd9db37ecb5b13762d95468a2fc6009d4b2c62801243223aabd44fca13ad13c8" dependencies = [ - "bitflags 1.3.2", + "bitflags", "widestring", "windows-sys 0.45.0", ] diff --git a/Cargo.toml b/Cargo.toml index 711a1caca..f6c014483 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -132,7 +132,6 @@ dbus = "0.9" dbus-crossroads = "0.5" pam = { git="https://github.com/fufesou/pam", optional = true } users = { version = "0.11" } -selinux = "0.4.2" [target.'cfg(target_os = "android")'.dependencies] android_logger = "0.13" diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart index def0d8453..59118f7cd 100644 --- a/flutter/lib/desktop/pages/desktop_home_page.dart +++ b/flutter/lib/desktop/pages/desktop_home_page.dart @@ -379,7 +379,8 @@ class _DesktopHomePageState extends State // } } else if (Platform.isLinux) { final LinuxCards = []; - if (bind.isSelinuxEnabled()) { + 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( diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rs index 7e1aa44e4..9661aa8b3 100644 --- a/src/flutter_ffi.rs +++ b/src/flutter_ffi.rs @@ -1935,10 +1935,10 @@ pub fn is_support_multi_ui_session(version: String) -> SyncReturn { SyncReturn(crate::common::is_support_multi_ui_session(&version)) } -pub fn is_selinux_enabled() -> SyncReturn { +pub fn is_selinux_enforcing() -> SyncReturn { #[cfg(target_os = "linux")] { - SyncReturn(crate::platform::linux::is_selinux_enabled()) + SyncReturn(crate::platform::linux::is_selinux_enforcing()) } #[cfg(not(target_os = "linux"))] { diff --git a/src/platform/linux.rs b/src/platform/linux.rs index bb3474d41..0d97b317a 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -1371,9 +1371,19 @@ pub fn is_x11() -> bool { } #[inline] -pub fn is_selinux_enabled() -> bool { - match selinux::kernel_support() { - selinux::KernelSupport::Unsupported => false, - _ => selinux::current_mode() == selinux::SELinuxMode::Enforcing, +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, + }, } } From 352865ddaaa6308a5e5f5face5bd534921e82a53 Mon Sep 17 00:00:00 2001 From: Mr-Update <37781396+Mr-Update@users.noreply.github.com> Date: Sun, 22 Oct 2023 09:50:27 +0200 Subject: [PATCH 16/18] Update de.rs --- src/lang/de.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/de.rs b/src/lang/de.rs index 6b5beb305..9bc00212f 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -565,6 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Open in new window", "In einem neuen Fenster öffnen"), ("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_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(); } From c518521d7485886d661e81bf815f326ab7c9dfb6 Mon Sep 17 00:00:00 2001 From: fufesou Date: Sun, 22 Oct 2023 20:35:43 +0800 Subject: [PATCH 17/18] fix, android physical mouse, click events, penetrated Signed-off-by: fufesou --- flutter/lib/mobile/pages/remote_page.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flutter/lib/mobile/pages/remote_page.dart b/flutter/lib/mobile/pages/remote_page.dart index ff71c9347..83a3f77c5 100644 --- a/flutter/lib/mobile/pages/remote_page.dart +++ b/flutter/lib/mobile/pages/remote_page.dart @@ -235,7 +235,7 @@ class _RemotePageState extends State { 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 { : Offstage(), ], )), - body: Overlay( + body: getRawPointerAndKeyBody(Overlay( initialEntries: [ OverlayEntry(builder: (context) { return Container( From c878c91e1188e3dac4239c65735e12151eee4aff Mon Sep 17 00:00:00 2001 From: Kleofass Date: Sun, 22 Oct 2023 16:51:38 +0300 Subject: [PATCH 18/18] Update lv.rs --- src/lang/lv.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/lv.rs b/src/lang/lv.rs index d7783e052..47aa9c22d 100644 --- a/src/lang/lv.rs +++ b/src/lang/lv.rs @@ -565,6 +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", ""), + ("selinux_tip", "Jūsu ierīcē ir iespējots SELinux, kas var neļaut RustDesk pareizi darboties kā kontrolētajai pusei."), ].iter().cloned().collect(); }