Skip to content
@go-freedesktop

go‑freedesktop

go-freedesktop

go-freedesktop

Pure-Go implementations of the freedesktop.org specifications — no cgo, no D-Bus C library, no external tools.

docs site modules Go license


What is this?

go-freedesktop is a family of independent, dependency-light Go modules that implement the freedesktop.org specifications a launcher, file manager or desktop shell relies on — enumerating installed applications, resolving icons, classifying files by MIME type, choosing the application that opens a type, building the category menu, and serving desktop notifications. Every module is pure Go, CGO_ENABLED=0, and reuses the standard XDG base-directory resolution rather than reinventing it.

They are the desktop-integration layer beneath go-widgets launchers and shells: each spec is one small module, so a caller pulls in only what it needs.

Modules (9)

Module freedesktop specification What it gives you
desktopentry Desktop Entry Enumerate the installed applications and expand their Exec= launch commands (field codes, TryExec, actions) — the piece a dock or app menu needs.
icontheme Icon Theme Resolve an icon name (e.g. a .desktop Icon= value) to a file path at a target size and scale, following theme inheritance and the hicolor fallback.
mime Shared MIME-info Database Answer "what type is this file?" — resolve a canonical MIME type from a file's name, its content (magic), or both, against the on-disk shared database.
mimeapps MIME Applications Associations Given a MIME type, the default application and the ordered list of candidates (mimeapps.list), with round-trippable edits — the engine behind "Open With…".
menu Desktop Menu Turn applications.menu XML into a resolved, categorized tree of app entries (Accessories, Graphics, System, …) for a launcher.
notifications Desktop Notifications The org.freedesktop.Notifications D-Bus service side — decode Notify calls (notify-send, libnotify, …) and render them as go-widgets Toasts.
secretservice Secret Service Store and read secrets where the desktop already keeps them — the org.freedesktop.Secret.Service D-Bus client that GNOME Keyring and KWallet answer. The Linux half of go-keyring.
screencast not a spec — X11 Capture the pixels of displays and windows: MIT-SHM 1.2 with descriptor passing, GetImage fallback, RANDR 1.5 / XINERAMA, XFIXES cursor. Wayland is not implemented, and Diagnose() says so rather than failing obscurely.
x11 not a spec — the protocol itself The foundation every X11 client needs first: wire codec, .Xauthority, connection setup, the MIT-SHM segment, the SCM_RIGHTS transport. Shared with go-widgets/window, so one protocol parser cannot drift into two.

The list reflects the repos that actually exist in the org today. More freedesktop layers are added over time. Two entries are marked not a spec: x11 is the X11 protocol's byte layer and screencast is the capture built on it. They live here because they are what a Linux desktop needs next, but the column heading would be a lie if they were left blank.

Design

  • Pure Go, CGO_ENABLED=0 — one portable module per spec; cross-compiles to a static binary.
  • Reuse, don't reinvent — XDG base-directory resolution comes from adrg/xdg; the later waves build on the earlier ones (mimeapps and menu stand on desktopentry) instead of re-parsing .desktop files.
  • 100% test coverage is the bar, error branches included, on native amd64/arm64 plus emulated 64-bit targets.
  • BSD-3-Clause throughout.

Links


Branding in go-freedesktop/brand.

Popular repositories Loading

  1. mime mime Public

    Pure-Go, CGO-free freedesktop Shared MIME-info Database: resolve a MIME type by name, content, or both.

    Go 2

  2. desktopentry desktopentry Public

    Freedesktop Desktop Entry layer for launchers: enumerate installed apps + expand launch commands (pure-Go, CGO=0)

    Go

  3. icontheme icontheme Public

    Pure-Go freedesktop.org Icon Theme Specification lookup: resolve an icon name to a file path at a target size/scale.

    Go

  4. mimeapps mimeapps Public

    Freedesktop MIME-type ↔ application association layer (mimeapps.list): default app + ordered candidates + round-trippable edits, pure-Go CGO=0

    Go

  5. menu menu Public

    Pure-Go freedesktop.org Desktop Menu Specification: applications.menu XML -> a categorized tree of app entries for a launcher (CGO=0).

    Go

  6. notifications notifications Public

    Pure-Go org.freedesktop.Notifications D-Bus service feeding the go-widgets Toast widget

    Go

Repositories

Showing 10 of 14 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…