mirror of
https://github.com/winapps-org/winapps.git
synced 2025-06-04 06:07: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 {}
|
||||
|
||||
impl RemoteClient for Freerdp {
|
||||
fn check_depends(&self, _config: Config) {
|
||||
fn check_depends(&self, config: Config) {
|
||||
let mut xfreerdp = Command::new("xfreerdp");
|
||||
xfreerdp.stdout(Stdio::null());
|
||||
xfreerdp.args(["-h"]);
|
||||
xfreerdp
|
||||
.spawn()
|
||||
.expect("Freerdp execution failed! It needs to be installed!");
|
||||
|
||||
println!("Freerdp 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) {
|
||||
todo!()
|
||||
fn run_app(&self, config: Config, _app: &str) {
|
||||
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)]
|
||||
pub struct RemoteConfig {
|
||||
#[new(value = "\"RDPWindows\".to_string()")]
|
||||
#[new(value = "\"127.0.0.1\".to_string()")]
|
||||
host: String,
|
||||
#[new(value = "\"WORKGROUP\".to_string()")]
|
||||
domain: String,
|
||||
#[new(value = "\"RDPUser\".to_string()")]
|
||||
#[new(value = "\"Quickemu\".to_string()")]
|
||||
username: String,
|
||||
#[new(value = "\"RDPPass\".to_string()")]
|
||||
#[new(value = "\"quickemu\".to_string()")]
|
||||
password: String,
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user