transparent

CI crates.io Documentation dependency status MIT

A crate for running processes on a virtual desktop / X server environment.

Usage

This will spawn some program on a new virtual desktop / X server environment. rs Command::new("some program") .spawn_transparent(&TransparentRunner::new()) .unwrap() .wait() .unwrap();

How it works

Windows

On windows transparent uses CreateProcessW to create a new desktop and then spawns a child process using CreateProcessW with lpStartupInfo.lpDesktop set to the new desktop. (Actually a helper process is spawned which then in turn spawns the target process; see virtual-desktop-runner).

Unix

On unix transparent uses xvfb-run which runs the target application in a virtual X server environment.

Known issues

It is currently impossible to determine the specified Stdio of a Command without using mem::transmute or similar, which is why transparent always uses Stdio::piped().

License

Licensed under the MIT license (LICENSE or http://opensource.org/licenses/MIT)