mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-09-26 11:18:38 +00:00
fix: setcap wivrn-server
This commit is contained in:
parent
59b035c49d
commit
cd33a8abbd
2 changed files with 14 additions and 17 deletions
|
@ -533,21 +533,19 @@ impl AsyncComponent for App {
|
||||||
.sender()
|
.sender()
|
||||||
.emit(BuildWindowMsg::UpdateBuildStatus(BuildStatus::Done));
|
.emit(BuildWindowMsg::UpdateBuildStatus(BuildStatus::Done));
|
||||||
let profile = self.get_selected_profile();
|
let profile = self.get_selected_profile();
|
||||||
if profile.xrservice_type == XRServiceType::Monado {
|
if dep_pkexec().check() {
|
||||||
if dep_pkexec().check() {
|
self.setcap_confirm_dialog.present(Some(&self.app_win));
|
||||||
self.setcap_confirm_dialog.present(Some(&self.app_win));
|
} else {
|
||||||
} else {
|
alert_w_widget(
|
||||||
alert_w_widget(
|
"pkexec not found",
|
||||||
"pkexec not found",
|
Some(&format!(
|
||||||
Some(&format!(
|
"The build is complete, but we need to set certain capabilities (CAP_SYS_NICE=eip) on the OpenXR server executable.\n\n{APP_NAME} can do that using pkexec, but it doesn't seem to be installed on your system.\n\nYou can do this step on your own by running the following command:"
|
||||||
"The build is complete, but we need to set certain capabilities (CAP_SYS_NICE=eip) on the OpenXR server executable.\n\n{APP_NAME} can do that using pkexec, but it doesn't seem to be installed on your system.\n\nYou can do this step on your own by running the following command:"
|
)),
|
||||||
)),
|
Some(&copiable_code_snippet(
|
||||||
Some(&copiable_code_snippet(
|
&format!("sudo {}", setcap_cap_sys_nice_eip_cmd(&profile).join(" "))
|
||||||
&format!("sudo {}", setcap_cap_sys_nice_eip_cmd(&profile).join(" "))
|
)),
|
||||||
)),
|
Some(&self.app_win.clone().upcast())
|
||||||
Some(&self.app_win.clone().upcast())
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
self.build_window
|
self.build_window
|
||||||
.sender()
|
.sender()
|
||||||
|
|
|
@ -74,8 +74,7 @@ pub fn setcap_cap_sys_nice_eip_cmd(profile: &Profile) -> Vec<String> {
|
||||||
"CAP_SYS_NICE=eip".into(),
|
"CAP_SYS_NICE=eip".into(),
|
||||||
profile
|
profile
|
||||||
.prefix
|
.prefix
|
||||||
// not needed for wivrn, that's why monado is hardcoded
|
.join(profile.xrservice_binary())
|
||||||
.join("bin/monado-service")
|
|
||||||
.to_string_lossy()
|
.to_string_lossy()
|
||||||
.to_string(),
|
.to_string(),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue