{"id":37180250,"url":"https://github.com/rymdport/portal","last_synced_at":"2026-01-14T20:57:27.986Z","repository":{"id":207983416,"uuid":"720555932","full_name":"rymdport/portal","owner":"rymdport","description":"Toolkit agnostic and easy to use Go module for the XDG Desktop Portal API.","archived":false,"fork":false,"pushed_at":"2025-08-30T10:05:28.000Z","size":2262,"stargazers_count":28,"open_issues_count":6,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-30T11:23:35.415Z","etag":null,"topics":["dbus","go","xdg-desktop-portal"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/rymdport/portal","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rymdport.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-18T20:56:14.000Z","updated_at":"2025-08-30T10:05:28.000Z","dependencies_parsed_at":"2024-03-20T19:59:57.758Z","dependency_job_id":"4c5268f6-709f-4962-b381-a1e06edd56ae","html_url":"https://github.com/rymdport/portal","commit_stats":null,"previous_names":["rymdport/portal"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/rymdport/portal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rymdport%2Fportal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rymdport%2Fportal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rymdport%2Fportal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rymdport%2Fportal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rymdport","download_url":"https://codeload.github.com/rymdport/portal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rymdport%2Fportal/sbom","scorecard":{"id":462038,"data":{"date":"2025-08-11","repo":{"name":"github.com/rymdport/portal","commit":"abf3ce2c06ceeaa3a8e5305361f31c5822253015"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.9,"checks":[{"name":"Maintained","score":10,"reason":"18 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Code-Review","score":0,"reason":"Found 2/21 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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/analysis.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/rymdport/portal/analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/analysis.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/rymdport/portal/analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/rymdport/portal/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/rymdport/portal/tests.yml/main?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/analysis.yml:20","Warn: goCommand not pinned by hash: .github/workflows/analysis.yml:21","Warn: goCommand not pinned by hash: .github/workflows/analysis.yml:22","Warn: goCommand not pinned by hash: .github/workflows/analysis.yml:23","Warn: goCommand not pinned by hash: .github/workflows/analysis.yml:24","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 goCommand dependencies pinned"],"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/analysis.yml:4","Info: topLevel 'contents' permission set to 'read': .github/workflows/tests.yml:4","Info: no jobLevel write permissions found"],"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":"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":"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: Apache License 2.0: 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 'main'"],"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":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T11:21:37.805Z","repository_id":207983416,"created_at":"2025-08-19T11:21:37.805Z","updated_at":"2025-08-19T11:21:37.805Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dbus","go","xdg-desktop-portal"],"created_at":"2026-01-14T20:57:27.405Z","updated_at":"2026-01-14T20:57:27.980Z","avatar_url":"https://github.com/rymdport.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go API Reference](https://img.shields.io/badge/go-documentation-blue.svg?style=flat)](https://pkg.go.dev/github.com/rymdport/portal)\n[![Tests](https://github.com/rymdport/portal/actions/workflows/tests.yml/badge.svg)](https://github.com/rymdport/portal/actions/workflows/tests.yml)\n[![Analysis](https://github.com/rymdport/portal/actions/workflows/analysis.yml/badge.svg)](https://github.com/rymdport/portal/actions/workflows/analysis.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/rymdport/portal)](https://goreportcard.com/report/github.com/rymdport/portal)\n\n# Portal\n\nPortal is a Go module providing developer friendly functions for accessing the [XDG Desktop Protocol](https://flatpak.github.io/xdg-desktop-portal/) D-Bus API. The goal of this project is to be toolkit agnostic and allow using the portals without needing to access [libportal](https://github.com/flatpak/libportal) through CGo.\n\nUsing the portals allow applications to request information from the user even when running inside a sandbox like Flatpak. As such, it is possible to open file dialogs, open links in the browser, send notifications and much more in a way that integrates well with the desktop environment. This also avoids needing to open up permissions in the sandbox.\n\n## API\n\nThe api of this Go module is designed to closely follow the structure naming of the upstream APIs. This means, in practice, that each D-Bus interface is implemented as its own package here. However, care is taken to be developer friendly and integrate seamlessly with native Go types.\n\n- Documentation for this module and all of its packages can be found on pkg.go.dev: https://pkg.go.dev/github.com/rymdport/portal\n- Documentation for the D-Bus protocol of the portals: https://flatpak.github.io/xdg-desktop-portal/docs/api-reference.html\n\n\nThe version of this module's API is still in a `v0.X.Y` state and is subject to change in the future.\nA release with breaking changes will increment X while Y will be incremented when there are minor bug or feature improvements.\n\n### Window Handles\n\nThe portal APIs often provide a `windowHandle` parameter that allow dialogs and other actions to be attached to a specific window.\n\n#### From Fyne\n\nWith Fyne running in X11 mode it is easy to get the window handle like below. However, note that the snippet will not work with `-tags wayland`.\n\n```go\n// based on https://github.com/fyne-io/fyne/blob/19dcdbdb5f5a9b293a21a29b5235c163345b36d0/dialog/file_xdg_flatpak.go#L124\nfunc getWindowHandle(window fyne.Window) string {\n\twindowHandle := \"\"\n\twindow.(driver.NativeWindow).RunNative(func(context any) {\n\t\thandle := context.(driver.X11WindowContext).WindowHandle\n\t\twindowHandle = portal.FormatX11WindowHandle(handle)\n\t})\n\n\treturn windowHandle\n}\n```\n\n## Example\n\nThe following example showcases how a file chooser can be opened for selecting one or more files.\n\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/rymdport/portal/filechooser\"\n)\n\nfunc main() {\n\toptions := filechooser.OpenFileOptions{Multiple: true}\n\tfiles, err := filechooser.OpenFile(\"\", \"Select files\", \u0026options)\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\n\tfmt.Println(files)\n}\n```\n\n## Supported Portal Interfaces\n\nThe list below contains all of the portal interfaces available within the project. Checked boxes are partially or completely implemented within this project. Note that this list usually refers to the state of the `main` branch and not necessarily the latest release.\n\n- [x] Account\n- [x] Background\n- [ ] Camera\n- [ ] Clipboard\n- [ ] Documents\n- [ ] Dynamic Launcher\n- [ ] Email\n- [x] File Chooser\n- [ ] File Transfer\n- [ ] Game Mode\n- [ ] Global Shortcuts\n- [ ] Inhibit\n- [ ] Input Capture\n- [x] Location\n- [x] Memory Monitor\n- [x] Network Monitor\n- [x] Notification\n- [x] OpenURI\n- [x] Power Profile Monitor\n- [ ] Print\n- [x] Proxy Resolver\n- [ ] Realtime\n- [ ] Remote Desktop\n- [x] Request\n- [ ] ScreenCast\n- [x] Screenshot\n- [x] Secret\n- [x] Session\n- [x] Settings\n- [x] Trash\n- [ ] Usb\n- [x] Wallpaper\n\n\n## Used by other projects\n\nThis section is meant as a reference to where this project is being used. Feel free to add yours if desired.\n\n- This project is used as of the [v2.5.0](https://github.com/fyne-io/fyne/releases/tag/v2.5.0) release of [Fyne](https://fyne.io).\n  - All the old theme watching code has been replaced by the `settings` package (and `appearance` subpackage) from this module. The `filechooser` and `notification` packages replace the old Fyne-code when compiling with `-tags flatpak`.\n\n## Contributing\n\nContributions are strongly appreciated. Everything from creating bug reports to contributing code will help the project a lot, so please feel free to help in any way, shape, or form that you feel comfortable with.\n\n## License\n- Portal is licensed under `Apache License Version 2.0` and will forever continue to be free and open source.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frymdport%2Fportal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frymdport%2Fportal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frymdport%2Fportal/lists"}