mirror of
https://github.com/winapps-org/winapps.git
synced 2025-06-06 15:17:19 +02:00
Add basic connect command
This commit is contained in:
parent
15da1b7c8a
commit
437a43c7fe
@ -6,20 +6,34 @@ pub mod freerdp_back {
|
|||||||
pub struct Freerdp {}
|
pub struct Freerdp {}
|
||||||
|
|
||||||
impl RemoteClient for Freerdp {
|
impl RemoteClient for Freerdp {
|
||||||
fn check_depends(&self, _config: Config) {
|
fn check_depends(&self, config: Config) {
|
||||||
let mut xfreerdp = Command::new("xfreerdp");
|
let mut xfreerdp = Command::new("xfreerdp");
|
||||||
xfreerdp.stdout(Stdio::null());
|
xfreerdp.stdout(Stdio::null());
|
||||||
xfreerdp.args(["-h"]);
|
xfreerdp.args(["-h"]);
|
||||||
xfreerdp
|
xfreerdp
|
||||||
.spawn()
|
.spawn()
|
||||||
.expect("Freerdp execution failed! It needs to be installed!");
|
.expect("Freerdp execution failed! It needs to be installed!");
|
||||||
|
|
||||||
println!("Freerdp found!");
|
println!("Freerdp found!");
|
||||||
|
|
||||||
println!("All dependencies found!");
|
println!("All dependencies found!");
|
||||||
|
println!("Running explorer as test!");
|
||||||
|
|
||||||
|
self.run_app(config, "explorer");
|
||||||
|
|
||||||
|
println!("Test finished!");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run_app(&self, _config: Config, _app: &str) {
|
fn run_app(&self, config: Config, _app: &str) {
|
||||||
todo!()
|
let mut xfreerdp = Command::new("xfreerdp");
|
||||||
|
xfreerdp.args([
|
||||||
|
//"/app:".to_owned() + app,
|
||||||
|
"/d:".to_owned() + &config.rdp.domain,
|
||||||
|
"/u:".to_owned() + &config.rdp.username,
|
||||||
|
"/p:".to_owned() + &config.rdp.password,
|
||||||
|
"/v:".to_owned() + &config.rdp.host,
|
||||||
|
]);
|
||||||
|
xfreerdp.spawn().expect("Freerdp execution failed!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,13 +31,13 @@ pub struct HostConfig {
|
|||||||
|
|
||||||
#[derive(new, Debug, Deserialize, Serialize)]
|
#[derive(new, Debug, Deserialize, Serialize)]
|
||||||
pub struct RemoteConfig {
|
pub struct RemoteConfig {
|
||||||
#[new(value = "\"RDPWindows\".to_string()")]
|
#[new(value = "\"127.0.0.1\".to_string()")]
|
||||||
host: String,
|
host: String,
|
||||||
#[new(value = "\"WORKGROUP\".to_string()")]
|
#[new(value = "\"WORKGROUP\".to_string()")]
|
||||||
domain: String,
|
domain: String,
|
||||||
#[new(value = "\"RDPUser\".to_string()")]
|
#[new(value = "\"Quickemu\".to_string()")]
|
||||||
username: String,
|
username: String,
|
||||||
#[new(value = "\"RDPPass\".to_string()")]
|
#[new(value = "\"quickemu\".to_string()")]
|
||||||
password: String,
|
password: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user