XDG-WHEREIS(1)

πŸ“¦ version 1.12, in nixos 26.05, nixpkgs unstable

πŸ’… xdg-whereis(1) β€” the girlies' guide to finding your desktop files

okay so bestie, welcome to xdg-whereis β€” the manual page, the myth, the legend. It's a User Commands situation, section 1, and it's here to help you track down desktop entry files for an application id. Think of it as Find My Friends but for your .desktop files. No cap. πŸ”βœ¨


πŸŽ€ NAME πŸŽ€

xdg-whereis β€” locate desktop entry files for an application id.

Like, it literally finds where your app's stuff lives. Iconic behaviour.


🌸 SYNOPSIS 🌸

xdg-whereis [options] [--] APPID [...]

That's it. That's the whole ritual. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: xdg-whereis locates the desktop entry, binary, source and manual files for the application identifiers you hand it. She's thorough like that.

First, the names you supply get stripped β€” leading path-name components get yeeted, and any (single) trailing extension of the form .ext (for example: .c) gets chopped off too. Then xdg-whereis goes hunting for the entry you want in the standard Linux places, plus the places spelled out by "XDG_CONFIG_DIRS", "XDG_DATA_DIRS", "XDG_CONFIG_HOME", "XDG_DATA_HOME", "PATH" and "MANPATH".

Bestie she is searching searching. πŸ§šβ€β™€οΈ


πŸ’– ARGUMENTS πŸ’–

The program accepts the following arguments:

  • APPID β€” specifies the application identifier of an XDG desktop application to locate. And APPID can be one of the following:
    1. the name of a desktop entry file without the .desktop suffix (e.g. "gvim"); the name may contain a "/" if it is specified relative to a user or system application directory, in which case it must not start with a "/" or ".".
    2. the name of a desktop entry file with the .desktop suffix (e.g. "gvim.desktop"); the same restrictions as (1), above, apply; or,
    3. the full path (absolute or relative) and filename of a desktop entry file (e.g. /usr/share/applications/gvim.desktop); the full path must contain at least one "/" and start with either a "/" or a ".".
⚠️ Providing a non-option application identifier argument is mandatory unless the --exec or --appid options are specified. Don't leave her hanging with no APPID, she will not know what to do with herself. 😭

✨ OPTIONS ✨

The options detailed below are recognized by xdg-whereis. And here's a fun fact for the group chat: xdg-whereis uses getopt_long_only(3), so unambiguous abbreviations of long options β€” and long options with a single dash β€” are also supported. Fancy! πŸ‘‘

πŸ”₯ COMMAND OPTIONS πŸ”₯

The default vibe is to match the APPID and provide output. But when any of the following options are specified, the command mode changes β€” main character switch-up:

  • -l, --list β€” output list of effective lookup paths that xdg-whereis is using. Basically she shows you her whole search itinerary. πŸ—ΊοΈ
  • -h, --help β€” prints usage information to standard output and exits.
  • -V, --version β€” prints detailed version information and exits.
  • -C, --copying β€” prints detailed copying permissions and exits.

πŸ’œ GENERAL OPTIONS πŸ’œ

The following general options are recognized:

  • -X, --xsession β€” treat APPID as an "XSession" identifier instead of an "Application" identifier.
  • -U, --autostart β€” treat APPID as an "Autostart" identifier instead of an "Application" identifier.

🌈 ENVIRONMENT 🌈

The following environment variables are examined by xdg-whereis:

  • HOME β€” used by xdg-whereis to determine the user's home directory.
  • XDG_DATA_HOME β€” used by xdg-whereis to determine the user's XDG data directory. This defaults to $HOME/.local/share. The applications subdirectory under this directory is the first searched to locate desktop entry files. See the XDG Desktop Entry file specification for more information.
  • XDG_DATA_DIRS β€” used by xdg-whereis to determine the system XDG data directories. This defaults to /usr/local/share:/usr/share. The applications subdirectory under these directories are searched in order to locate desktop entry files. See the XDG Desktop Entry file specification for more information.
  • XDG_CONFIG_HOME β€” used by xdg-whereis to determine the user's XDG configuration directory. This defaults to $HOME/.config. The autostart subdirectory under this directory is the first searched to locate desktop entry files. See the XDG Desktop Entry file specification for more information.
  • XDG_CONFIG_DIRS β€” used by xdg-whereis to determine the system XDG configuration directories. This defaults to /etc/xdg. The autostart subdirectory under these directories are searched in order to locate desktop entry files. See the XDG Desktop Entry file specification for more information.
🫢 note the difference bestie: XDG_DATA_* looks in applications, XDG_CONFIG_* looks in autostart. Different subdirectories, different eras.

πŸ’€ BUGS πŸ’€

xdg-whereis has no known bugs. Not one! She's flawless, she woke up like this. πŸ™ˆ

Please report bugs to the source code repository at <https://github.com/bbidulock/xdg-launch/issues>.


⭐ SEE ALSO ⭐

whereis(1), xdg-which(1).

(The holy trinity of "where is it though". iykyk.)


πŸ‘‘ AUTHOR πŸ‘‘

Brian Bidulock <mailto:bidulock@openss7.org>


and that's the whole page, bestie β€” no notes, ate and left no crumbs. πŸ“

xdg-launch 1.12, dated 2022-01-28 β€” that's the source/version and date, and yes we're crediting her properly because she deserves it. mwah πŸ’‹πŸŒ·

πŸ“¦ where this page comes from