@@ -7,9 +7,7 @@ use std::process::Command;
77use anyhow:: { anyhow, Context , Result } ;
88use byteorder:: { BigEndian , ReadBytesExt , WriteBytesExt } ;
99
10- use super :: socket:: setup_socket_proxy;
11-
12- use crate :: utils:: env:: find_in_path;
10+ use crate :: env:: find_muvm_exec;
1311
1412pub fn setup_x11_forwarding < P > ( run_path : P ) -> Result < bool >
1513where
@@ -26,18 +24,10 @@ where
2624 }
2725 let host_display = & host_display[ 1 ..] ;
2826
29- let x112virtgpu_path =
30- find_in_path ( "x112virtgpu" ) . context ( "Failed to check existence of `x112virtgpu`" ) ?;
31-
32- if x112virtgpu_path. is_some ( ) {
33- let mut cmd = Command :: new ( x112virtgpu_path. unwrap ( ) ) ;
34- cmd. args ( [ "--listen-display" , ":1" ] ) ;
27+ let mut cmd = Command :: new ( find_muvm_exec ( "muvm-x11bridge" ) ?) ;
28+ cmd. args ( [ "--listen-display" , ":1" ] ) ;
3529
36- cmd. spawn ( ) . context ( "Failed to spawn `x112virtgpu`" ) ?;
37- } else {
38- log:: error!( "x112virtgpu not available, X11 forwarding will operate in socket forwarding mode. This is probably not what you want." ) ;
39- setup_socket_proxy ( Path :: new ( "/tmp/.X11-unix/X1" ) , 6000 ) ?;
40- }
30+ cmd. spawn ( ) . context ( "Failed to spawn `muvm-x11bridge`" ) ?;
4131
4232 // SAFETY: Safe if and only if `muvm-guest` program is not multithreaded.
4333 // See https://doc.rust-lang.org/std/env/fn.set_var.html#safety
0 commit comments