diff --git a/src/main.rs b/src/main.rs index 394a520..d3ab868 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,9 +30,19 @@ fn make_temp_location(path: &str) -> String { fn launch_hydrus(config: &Config) { println!("Launching hydrus..."); - let hydrus = Command::new(&config.hydrus_exec_location) - .status() - .expect("Failed to run hydrus"); + let mut hydrus = Command::new(&config.hydrus_exec_location); + let hydrus = hydrus.args(["-d", &config.hydrus_db_location]); + + if cfg!(unix) { + hydrus + .env("QT_QPA_PLATFORM", "xcb") + .status() + .expect("Failed to run hydrus"); + } else { + hydrus + .status() + .expect("Failed to run hydrus"); + } } fn is_locked(config: &Config) -> bool {