commit
bc950ee40a
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -4121,9 +4121,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.17.1"
|
||||
version = "1.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
|
||||
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
|
||||
|
||||
[[package]]
|
||||
name = "opaque-debug"
|
||||
|
@ -37,7 +37,6 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
Timer? _updateTimer;
|
||||
|
||||
final RxBool _idInputFocused = false.obs;
|
||||
final FocusNode _idFocusNode = FocusNode();
|
||||
|
||||
var svcStopped = Get.find<RxBool>(tag: 'stop-service');
|
||||
var svcIsUsingPublicServer = true.obs;
|
||||
@ -334,8 +333,10 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
optionsViewBuilder: (BuildContext context, AutocompleteOnSelected<Peer> onSelected, Iterable<Peer> 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(
|
||||
|
@ -378,16 +378,39 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
// });
|
||||
// }
|
||||
} else if (Platform.isLinux) {
|
||||
final LinuxCards = <Widget>[];
|
||||
if (bind.isSelinuxEnforcing()) {
|
||||
// Check is SELinux enforcing, but show user a tip of is SELinux enabled for simple.
|
||||
final keyShowSelinuxHelpTip = "show-selinux-help-tip";
|
||||
if (bind.mainGetLocalOption(key: keyShowSelinuxHelpTip) != 'N') {
|
||||
LinuxCards.add(buildInstallCard(
|
||||
"Warning", "selinux_tip", "", () async {},
|
||||
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
|
||||
help: 'Help',
|
||||
link:
|
||||
'https://rustdesk.com/docs/en/client/linux/#permissions-issue',
|
||||
closeButton: true,
|
||||
closeOption: keyShowSelinuxHelpTip,
|
||||
));
|
||||
}
|
||||
}
|
||||
if (bind.mainCurrentIsWayland()) {
|
||||
return buildInstallCard(
|
||||
LinuxCards.add(buildInstallCard(
|
||||
"Warning", "wayland_experiment_tip", "", () async {},
|
||||
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
|
||||
help: 'Help',
|
||||
link: 'https://rustdesk.com/docs/en/manual/linux/#x11-required');
|
||||
link: 'https://rustdesk.com/docs/en/manual/linux/#x11-required'));
|
||||
} else if (bind.mainIsLoginWayland()) {
|
||||
return buildInstallCard("Warning",
|
||||
LinuxCards.add(buildInstallCard("Warning",
|
||||
"Login screen using Wayland is not supported", "", () async {},
|
||||
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
|
||||
help: 'Help',
|
||||
link: 'https://rustdesk.com/docs/en/manual/linux/#login-screen');
|
||||
link: 'https://rustdesk.com/docs/en/manual/linux/#login-screen'));
|
||||
}
|
||||
if (LinuxCards.isNotEmpty) {
|
||||
return Column(
|
||||
children: LinuxCards,
|
||||
);
|
||||
}
|
||||
}
|
||||
return Container();
|
||||
@ -395,17 +418,26 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
|
||||
Widget buildInstallCard(String title, String content, String btnText,
|
||||
GestureTapCallback onPressed,
|
||||
{String? help, String? link, bool? closeButton}) {
|
||||
void closeCard() {
|
||||
setState(() {
|
||||
isCardClosed = true;
|
||||
});
|
||||
{double marginTop = 20.0, String? help, String? link, bool? closeButton, String? closeOption}) {
|
||||
void closeCard() async {
|
||||
if (closeOption != null) {
|
||||
await bind.mainSetLocalOption(key: closeOption, value: 'N');
|
||||
if (bind.mainGetLocalOption(key: closeOption) == 'N') {
|
||||
setState(() {
|
||||
isCardClosed = true;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
setState(() {
|
||||
isCardClosed = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return Stack(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 20),
|
||||
margin: EdgeInsets.only(top: marginTop),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
|
@ -1935,6 +1935,17 @@ pub fn is_support_multi_ui_session(version: String) -> SyncReturn<bool> {
|
||||
SyncReturn(crate::common::is_support_multi_ui_session(&version))
|
||||
}
|
||||
|
||||
pub fn is_selinux_enforcing() -> SyncReturn<bool> {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
SyncReturn(crate::platform::linux::is_selinux_enforcing())
|
||||
}
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
SyncReturn(false)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
pub mod server_side {
|
||||
use hbb_common::{config, log};
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "在新的窗口中打开"),
|
||||
("Show displays as individual windows", "在单个窗口中打开显示器"),
|
||||
("Use all my displays for the remote session", "将我的所有显示器用于远程会话"),
|
||||
("selinux_tip", "SELinux 处于启用状态,RustDesk 可能无法作为被控正常运行。"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "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();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -225,5 +225,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("switch_display_elevated_connections_tip", "Switching to non-primary display is not supported in the elevated mode when there are multiple connections. Please try again after installation if you want to control multiple displays."),
|
||||
("display_is_plugged_out_msg", "The display is plugged out, switch to the first display."),
|
||||
("elevated_switch_display_msg", "Switch to the primary display because multiple displays are not supported in elevated mode."),
|
||||
("selinux_tip", "SELinux is enabled on your device, which may prevent RustDesk from running properly as controlled side."),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "Buka di jendela baru"),
|
||||
("Show displays as individual windows", "Tampilkan dengan jendela terpisah"),
|
||||
("Use all my displays for the remote session", "Gunakan semua layar untuk sesi remote"),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Audio Input Device", "Dispositivo ingresso audio"),
|
||||
("Use IP Whitelisting", "Usa elenco IP autorizzati"),
|
||||
("Network", "Rete"),
|
||||
("Enable RDP", "Abilita RDP"),
|
||||
("Pin Toolbar", "Blocca barra strumenti"),
|
||||
("Unpin Toolbar", "Sblocca barra strumenti"),
|
||||
("Recording", "Registrazione"),
|
||||
@ -566,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "Apri in una nuova finestra"),
|
||||
("Show displays as individual windows", "Visualizza schermi come finestre individuali"),
|
||||
("Use all my displays for the remote session", "Usa tutti gli schermi per la sessione remota"),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "Atvērt jaunā logā"),
|
||||
("Show displays as individual windows", "Rādīt displejus kā atsevišķus logus"),
|
||||
("Use all my displays for the remote session", "Izmantot visus manus displejus attālajai sesijai"),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "Otwórz w nowym oknie"),
|
||||
("Show displays as individual windows", "Pokaż ekrany w osobnych oknach"),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "Открыть в новом окне"),
|
||||
("Show displays as individual windows", "Показывать дисплеи в отдельных окнах"),
|
||||
("Use all my displays for the remote session", "Использовать все мои дисплеи для удалённого сеанса"),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", "Відкрити в новому вікні"),
|
||||
("Show displays as individual windows", "Відображати дисплеї в якості окремих вікон"),
|
||||
("Use all my displays for the remote session", "Використовувати всі мої дисплеї для віддаленого сеансу"),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -565,5 +565,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
("Use all my displays for the remote session", ""),
|
||||
("selinux_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -1369,3 +1369,21 @@ impl Drop for WallPaperRemover {
|
||||
pub fn is_x11() -> bool {
|
||||
*IS_X11
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_selinux_enforcing() -> bool {
|
||||
match run_cmds("getenforce") {
|
||||
Ok(output) => output.trim() == "Enforcing",
|
||||
Err(_) => match run_cmds("sestatus") {
|
||||
Ok(output) => {
|
||||
for line in output.lines() {
|
||||
if line.contains("Current mode:") {
|
||||
return line.contains("enforcing");
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
Err(_) => false,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user