Crate transparent[−][src]
Expand description
A crate for running processes on a virtual desktop / virtual X server environment.
Usage
This will spawn some program on a virtual desktop / virtual X server environment.
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)
Structs
Representation of a running or exited child process that was spawned using TransparentRunner::spawn_transparent.
Platform-dependent state required to run processes transparently.