Home

xdgutils

xdg-utils is a collection of cross-desktop command-line tools designed to simplify common desktop integration tasks on Unix-like systems. Maintained under the Freedesktop.org umbrella, the utilities provide a stable, desktop-agnostic interface for applications to interact with the user’s environment. They enable operations such as opening files or URLs with the default application, querying and setting MIME type associations, and performing basic desktop-related queries and actions without tying software to a specific desktop environment.

The most commonly used tools include xdg-open, which launches the default program for a given file or

xdg-utils is widely distributed with many Linux distributions and is frequently invoked by package managers and

While useful for interoperability, xdg-utils implementations can vary between environments, and some desktop features may be

URL;
xdg-mime,
which
queries
or
registers
handlers
for
MIME
types;
and
xdg-email,
which
opens
the
default
mail
client
with
a
composed
message.
Additional
helpers
such
as
xdg-settings,
xdg-desktop-icon,
and
xdg-desktop-menu
provide
access
to
certain
desktop
preferences
and
to
the
installation
of
desktop
entries
and
menu
items.
installers
to
ensure
consistent
behavior
across
environments.
It
relies
on
freedesktop.org
specifications
for
desktop
integration
and
on
the
system’s
installed
MIME
handlers
and
desktop
entries
to
determine
the
appropriate
actions.
provided
more
fully
by
environment-specific
tools.
The
project
remains
a
reference
implementation
for
basic
desktop
integration
tasks
and
is
updated
as
standards
evolve.