comp: Allow to specify different compositors

This commit is contained in:
Victoria Brekenfeld 2024-10-25 15:45:37 +02:00 committed by Ian Douglas Scott
parent 342369eaf9
commit c44946be82
2 changed files with 10 additions and 4 deletions

View file

@ -173,6 +173,8 @@ async fn send_fd(session_tx: &mut OwnedWriteHalf, stream: Vec<UnixStream>) -> Re
pub fn run_compositor(
process_manager: &ProcessManager,
exec: String,
args: Vec<String>,
_token: CancellationToken,
mut socket_rx: mpsc::UnboundedReceiver<Vec<UnixStream>>,
env_tx: oneshot::Sender<HashMap<String, String>>,
@ -200,7 +202,8 @@ pub fn run_compositor(
process_manager
.start_process(
Process::new()
.with_executable("cosmic-comp")
.with_executable(exec)
.with_args(args)
.with_env([("COSMIC_SESSION_SOCK", comp.as_raw_fd().to_string())])
.with_on_exit(move |pman, _, err_code, _will_restart| {
let session_dbus_tx = session_dbus_tx.clone();