transparent

Crates.iotransparent
lib.rstransparent
version0.4.0
sourcesrc
created_at2021-10-15 00:15:26.171848
updated_at2023-07-31 20:27:53.500555
descriptionA crate for running processes on a virtual desktop / virtual X server environment.
homepage
repositoryhttps://github.com/OpenByteDev/transparent
max_upload_size
id465177
size37,315
OpenByte (OpenByteDev)

documentation

https://docs.rs/transparent

README

transparent

CI crates.io Documentation dependency status MIT

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.

Command::new("some program")
    .spawn_transparent(&TransparentRunner::new())
    .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)

Commit count: 98

cargo fmt