{"id":15680911,"url":"https://github.com/mike10004/xvfb-manager-java","last_synced_at":"2025-08-22T05:06:03.632Z","repository":{"id":50333229,"uuid":"73097094","full_name":"mike10004/xvfb-manager-java","owner":"mike10004","description":"Library that manages an xvfb process and a JUnit rule that employs the library.","archived":false,"fork":false,"pushed_at":"2021-04-26T16:19:54.000Z","size":370,"stargazers_count":11,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T03:53:48.847Z","etag":null,"topics":["java","junit","selenium","xvfb"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mike10004.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-07T16:15:22.000Z","updated_at":"2025-02-03T01:45:54.000Z","dependencies_parsed_at":"2022-09-26T21:50:16.849Z","dependency_job_id":null,"html_url":"https://github.com/mike10004/xvfb-manager-java","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/mike10004/xvfb-manager-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike10004%2Fxvfb-manager-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike10004%2Fxvfb-manager-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike10004%2Fxvfb-manager-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike10004%2Fxvfb-manager-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mike10004","download_url":"https://codeload.github.com/mike10004/xvfb-manager-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike10004%2Fxvfb-manager-java/sbom","scorecard":{"id":645098,"data":{"date":"2025-08-11","repo":{"name":"github.com/mike10004/xvfb-manager-java","commit":"72f56f11286f5b6695b1d515920f2e72a10feab7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"19 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-4jrv-ppp4-jm57","Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-mvr2-9pj6-7w5j","Warn: Project is vulnerable to: GHSA-w33c-445m-f8w7","Warn: Project is vulnerable to: GHSA-78wr-2p64-hpwj","Warn: Project is vulnerable to: GHSA-gwrp-pvrq-jmwv","Warn: Project is vulnerable to: GHSA-pwm3-776c-8q7q","Warn: Project is vulnerable to: GHSA-4g9r-vxhx-9pgx","Warn: Project is vulnerable to: GHSA-53x6-4x5p-rrvv","Warn: Project is vulnerable to: GHSA-7hfm-57qf-j43q","Warn: Project is vulnerable to: GHSA-crv7-7245-f45f","Warn: Project is vulnerable to: GHSA-mc84-pj99-q6hh","Warn: Project is vulnerable to: GHSA-xqfj-vm6h-2x34","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-7r82-7xv7-xcpj","Warn: Project is vulnerable to: GHSA-gp7f-rwcx-9369","Warn: Project is vulnerable to: GHSA-m72m-mhq2-9p6c","Warn: Project is vulnerable to: GHSA-269g-pwp5-87pp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T11:57:02.016Z","repository_id":50333229,"created_at":"2025-08-21T11:57:02.016Z","updated_at":"2025-08-21T11:57:02.016Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271588743,"owners_count":24785751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","junit","selenium","xvfb"],"created_at":"2024-10-03T16:46:08.969Z","updated_at":"2025-08-22T05:06:03.607Z","avatar_url":"https://github.com/mike10004.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Travis build status](https://img.shields.io/travis/mike10004/xvfb-manager-java.svg)](https://travis-ci.org/mike10004/xvfb-manager-java)\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.mike10004/xvfb-manager-parent.svg)](https://repo1.maven.org/maven2/com/github/mike10004/xvfb-manager-parent/)\n\nxvfb-manager\n============\n\nJava Xvfb manager. A library for managing an Xvfb process and a JUnit \nrule for using that library in unit or integration tests.\n\nQuickstart - Core Library\n-------------------------\n\n### Maven\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.github.mike10004\u003c/groupId\u003e\n        \u003cartifactId\u003exvfb-manager\u003c/artifactId\u003e\n        \u003cversion\u003e0.14\u003c/version\u003e\n    \u003c/dependency\u003e\n\n### Code\n\n    XvfbManager manager = new XvfbManager();\n    try (final XvfbController controller = manager.start()) {\n        controller.waitUntilReady();\n        // start a graphical program on a different thread\n        Future\u003cProcess\u003e processFuture = Executors.newSingleThreadExecutor().submit(new Callable\u003cProcess\u003e(){\n            @Override\n            public Process call() throws Exception {\n                ProcessBuilder pb = new ProcessBuilder();\n                pb.environment().put(\"DISPLAY\", controller.getDisplay());\n                return pb.command(\"xclock\").start();\n            }\n        });\n        Screenshot screenshot = controller.getScreenshooter().capture();\n        // do something with screenshot\n        processFuture.cancel(true);\n    }\n\nQuickstart - JUnit Rule\n-----------------------\n\n### Maven\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.github.mike10004\u003c/groupId\u003e\n        \u003cartifactId\u003exvfb-testing\u003c/artifactId\u003e\n        \u003cversion\u003e0.4\u003c/version\u003e\n    \u003c/dependency\u003e\n\n### Code\n\n    @Rule\n    public XvfbRule xvfb = new XvfbRule();\n    \n    @Test\n    public void testSomething() throws Exception {\n        XvfbController controller = xvfb.getController();\n        // use controller as in the core library example above\n    }\n\nModules\n-------\n\nThe purpose of each module is as follows:\n\n* **xvfb-manager**: core library\n* **xvfb-testing**: JUnit Rule\n* **xvfb-unittest-tools**: library only used by above projects for testing\n* **xvfb-manager-example**: executable program demonstrating Selenium usage\n\nUsing with Selenium\n-------------------\n\nTo use an `XvfbManager` instance with Selenium, start the virtual framebuffer \nand then configure the webdriver process's environment with the appropriate \ndisplay. (There used to be an **xvfb-selenium** artifact that had a convenience\nmethod for this, but I didn't like keeping up with the Selenium API changes.)\n\n### Chrome\n\n    ChromeDriverService service = new ChromeDriverService.Builder()\n            .usingAnyFreePort()\n            .withEnvironment(ImmutableMap.of(\"DISPLAY\", display))\n            .build();\n    return new ChromeDriver(service);\n\n### Firefox\n\n    GeckoDriverService service = new GeckoDriverService.Builder()\n            .usingAnyFreePort()\n            .withEnvironment(ImmutableMap.of(\"DISPLAY\", display))\n            .build();\n    FirefoxDriver driver = new FirefoxDriver(service);\n\nNotes\n-----\n\n### Automatic Display Selection\n\nVersions of Xvfb prior to 1.13 did not support the `-displayfd` option \nthat allows automatic selection of an open display number. If your \nversion of Xvfb is lower than 1.13, then you must specify a display \nnumber. If using the core library, you would do that like this:\n\n     XvfbManager manager = new XvfbManager();\n     XvfbController controller = manager.start(99); \n\nIf using the JUnit rule, then the display number is specified like this:\n\n     public XvfbRule xvfb = XvfbRule.builder().onDisplay(99).build();\n\nThe display number `99` corresponds to the `DISPLAY` environment \nvariable value `:99`.\n\n### Unit tests with Selenium\n\nThe unit tests that involve Selenium make use of [WebDriverManager]\nto manage webdrivers for Chrome and Firefox. This library queries the \nGitHub API and occasionally gets a 403 response due to [rate-limiting]\nof anonymous requests. To make your requests non-anonymous and prevent\nthe rate-limiting from breaking the build:\n\n1. Create a pair token/secret in your [GitHub account]\n2. Set system properties `wdm.gitHubTokenName` and `wdm.gitHubTokenSecret`\n   for the build\n\nSupported Operating Systems\n---------------------------\n\nCurrently only Linux is supported, and the library has only been tested\non Ubuntu. In theory, it should work on Fedora-like platforms. Support\nfor MacOS has not been investigated. Support for Windows probably \nwouldn't make sense.\n\nRuntime and Unit Test Requirements\n----------------------------------\n\nSome programs are required to be installed at runtime, and many tests \nwill be skipped if certain programs are not available in the build \nenvironment. These prerequisites are listed in the table below by \ndistribution.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cb\u003eUbuntu 16.04\u003c/b\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cb\u003eFedora 24\u003c/b\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cb\u003eScope\u003c/b\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003exvfb\u003c/td\u003e\n    \u003ctd\u003exorg-x11-server-Xvfb\u003c/td\u003e\n    \u003ctd\u003eruntime\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003enetpbm\u003c/td\u003e\n    \u003ctd\u003enetpbm-progs\u003c/td\u003e\n    \u003ctd\u003eruntime\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ex11-utils\u003c/td\u003e\n    \u003ctd\u003exorg-x11-utils\u003c/td\u003e\n    \u003ctd\u003eruntime\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ex11-apps\u003c/td\u003e\n    \u003ctd\u003exorg-x11-apps\u003c/td\u003e\n    \u003ctd\u003etest\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003exdotool\u003c/td\u003e\n    \u003ctd\u003exdotool\u003c/td\u003e\n    \u003ctd\u003etest\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eimagemagick\u003c/td\u003e\n    \u003ctd\u003eImageMagick\u003c/td\u003e\n    \u003ctd\u003etest\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003efirefox\u003c/td\u003e\n    \u003ctd\u003efirefox\u003c/td\u003e\n    \u003ctd\u003etest\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003egoogle-chrome or chromium\u003c/td\u003e\n    \u003ctd\u003egoogle-chrome or chromium\u003c/td\u003e\n    \u003ctd\u003etest\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nFAQ\n---\n\n### Does it work on MacOS?\n\nNot really, but you might be able to shoehorn it. You can install [XQuartz] \n(see [Homebrew instructions]), but that version of Xvfb requires being\nrun as root (for the creation of secure directories in /tmp), and you should\nbe justifiably skeptical of anyone suggesting you run your unit tests as root.\nYou might be able to get around this be manually creating `/tmp/.X11-unix` as\nroot and setting its permissions to 1777 *before* you run your tests.\n\nAcknowledgements\n----------------\n\nThe photo used in the unit tests is by George Chernilevsky - Own work, \nCC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=34785750.\n\n[WebDriverManager]: https://github.com/bonigarcia/webdrivermanager\n[rate-limiting]: https://developer.github.com/v3/#rate-limiting\n[GitHub account]: https://github.com/settings/tokens\n[Homebrew instructions]: http://macappstore.org/xquartz/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike10004%2Fxvfb-manager-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmike10004%2Fxvfb-manager-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike10004%2Fxvfb-manager-java/lists"}