Introduction to xdg-utils

xdg-utils is a a set of command line tools that assist applications with a variety of desktop integration tasks. It is required for Linux Standards Base (LSB) conformance.



A security vulnerability exists in all versions of xdg-utils from version 1.1.0rc1 when handling mailto: URIs. An attacker could potentially send a victim a URI that automatically attaches a sensitive file to a new email. If a victim user does not notice that an attachment was added and sends the email, this could result in sensitive information disclosure.

To mitigate this flaw, either do not use mailto links at all, or always double-check in the user interface that there are no unwanted attachments before sending emails, especially when the email originates from clicking on a mailto link.

This package is known to build and work properly using an LFS-11.2 platform.

Package Information

xdg-utils Dependencies


xmlto-0.0.28 with one of Lynx-2.8.9rel.1, Links-2.27, or W3m

Required (runtime)

Xorg Applications

Optional (runtime)


User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/xdg-utils

Installation of xdg-utils

Compile xdg-utils with the following commands:

./configure --prefix=/usr --mandir=/usr/share/man &&


The tests for the scripts must be made from an X-Window based session. There are several run-time requirements to run the tests including a browser and an MTA. Running the tests as root user is not recommended.

To run the tests, issue: make -k test.

Now install it as the root user:

make install


Installed Programs: xdg-desktop-menu, xdg-desktop-icon, xdg-mime, xdg-icon-resource, xdg-open, xdg-email, xdg-screensaver, xdg-settings
Installed Libraries: None
Installed Directories: None

Short Descriptions


is a command line tool for (un)installing desktop menu items


is a command line tool for (un)installing icons to the desktop


is a command line tool for querying information about file type handling and adding descriptions for new file types


is a command line tool for (un)installing icon resources


opens a file or URL in the user's preferred application


opens the user's preferred e-mail composer in order to send a mail message


is a command line tool for controlling the screensaver


is a command line tool for managing various settings from the desktop environment