transparent
A crate for running processes on a virtual desktop / virtual X server environment.
Usage
This will spawn some program on a new virtual desktop / virtual X server environment.
new
.spawn_transparent
.unwrap
.wait
.unwrap;
How it works
Windows
On windows transparent uses CreateDesktopW 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)