diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/linux.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/linux.rs b/src/linux.rs index 286d387..411d529 100644 --- a/src/linux.rs +++ b/src/linux.rs @@ -762,8 +762,17 @@ fn create_wayland_device( .collect::<Option<Vec<_>>>() .ok_or(Error::InvalidWaylandPath)?; - let dev = virtio::Controller::new(cfg.wayland_socket_paths.clone(), socket, resource_bridge) - .map_err(Error::WaylandDeviceNew)?; + let mut path = std::env::var("XDG_RUNTIME_DIR").expect("XDG_RUNTIME_DIR missing"); + path.push_str("/crosvm-wl.sock"); + let seq_socket = UnixSeqpacket::connect(&path).expect("connect failed"); + let msg_socket = MsgSocket::new(seq_socket); + let dev = virtio::Controller::new( + cfg.wayland_socket_paths.clone(), + socket, + resource_bridge, + msg_socket, + ) + .map_err(Error::WaylandDeviceNew)?; let jail = match simple_jail(&cfg, "wl_device")? { Some(mut jail) => { |